1
$\begingroup$

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert into a MeshRegion object using DiscretizeGraphics (see https://reference.wolfram.com/language/ref/DiscretizeGraphics.html).

In particular, I would like to control the mesh density. The above link tells me to use the MaxCellMeasure option, but it doesn't seem to make any difference to my graphics!

Thus,

Table[DiscretizeGraphics[g, 
  MaxCellMeasure -> {"Area" -> m}], {m, {0.3, 0.01, 0.001}}]

gives: enter image description here

As you can see, the meshing is unchanged. It doesn't matter if I replace "Area" by "Volume" or "Length".

Can someone please tell me how to do this properly? Is this happening because my Graphics is already made up of triangles?

$\endgroup$
0
1
$\begingroup$

I just learnt from this post (Possible Bug in DiscretizeRegion with Option MaxCellMeasure) that this might be a bug in Mathematica.

Using one of the solutions recommended here, I applied DiscretizeRegion with the MaxCellMeasure option to the meshed object produced by DiscretizeGraphics:

mr = DiscretizeGraphics[g];
DiscretizeRegion[mr, MaxCellMeasure -> {"Area" -> #}] & /@ {0.1, 
  0.01, 0.005}

And this time, it works: enter image description here

Should I report this bug to Mathematica? The previous bug, mentioned in the post, was solved several years ago.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.