# Not accurate mesh creation

**URL:** <https://discourse.mcneel.com/t/not-accurate-mesh-creation/124466>\
**Category:** Rhino for Windows\
**Tags:** windows\
**Created:** [May 19, 2021, 12:56pm UTC](https://discourse.mcneel.com/t/not-accurate-mesh-creation/124466 "2021-05-19T12:56:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![margari](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/margari/32/774896_2.png) [@margari](https://discourse.mcneel.com/u/margari)\
**Post date:** [May 19, 2021, 12:56pm UTC](https://discourse.mcneel.com/t/not-accurate-mesh-creation/124466/1 "2021-05-19T12:56:21Z")

</div>

Hello,  
I’ve found an issue reproducible by using the attached file. [surfaceToMeshIssue.3dm](https://discourse.mcneel.com/uploads/short-url/msVnxkxErgWMMPCBnHaGASuT4FM.3dm) (478.8 KB)

I have to create a mesh, starting from an almost flat surface.  
I set the ‘Maximum distance, edge to surface’ parameter to 0.01mm but the output mesh results far from the surface (more then 0.01mm in some areas).

I discover that setting the ‘Maximum aspect ratio’ parameter to 0 (instead of the default value 6) then the output mesh results close enough to the surface.

The question is: why in the first case is the ‘Maximum distance, edge to surface’ parameter not respected, even though, at least in my example, it would be possible to create a mesh respecting both the constraints (‘Maximum distance, edge to surface’ to 0.01mm and ‘Maximum aspect ratio’ to 6)?  
I use these parameters in a static setting and using 0 for the ‘Maximum aspect ratio’ parameter often leads to a much slower computation of the procedure I have to perform on the mesh.

All the parameters setting used for the mesh creation follows:

- Density: 0.5;
- Maximum angle: 0.0;
- Maximum aspect ratio: 6.0;
- Minimum edge length: 0.0;
- Maximum edge length: 0.0;
- Maximum distance, edge to surface: 0.01;
- Minimum initial grid quads: 0;
- Refine mesh: true;
- Jagged seams: false;
- Simple planes: false;
- Pack textures: true.

Extra questions:

- What does the ‘Density’ parameter do? I didn’t find the documentation about it.
- My surface mustn’t be far from the surface more then 0.01mm, should I pay attention to other parameters that can nullify the ‘Maximum distance, edge to surface’ parameter?

Thank you,  
Alberto.

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [May 19, 2021, 2:26pm UTC](https://discourse.mcneel.com/t/not-accurate-mesh-creation/124466/2 "2021-05-19T14:26:49Z")

</div>

Hi Alberto - the Aspect ratio setting is messy with linear surfaces and extrusions - it was recently tuned for the opposite problem - far too dense meshes, I’ll add this example for the developer. If you set aspect ratio to zero, it should make the mesh you want.  
Density is a ‘black box’ that calculates, per object, based on bounding box size and other things that I cannot recall if I ever knew, a ‘reasonable’ Maximum distance edge to surface’ distance. It checks the number it finds against the user’s (if non-zero) maximum distance setting and uses the smaller of the two.  
The Density number is not that distance but a scale for the black box to use in its per object magic - loose to tight…

-Pascal
