Not accurate mesh creation

I’ve found an issue reproducible by using the attached file. surfaceToMeshIssue.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,

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…