2
$\begingroup$

I need to be able to produce Minkowski difference of an arbitrary BoundaryMeshRegion and a cylinder.

Needs["NDSolve`FEM`"];
c1 = BoundaryMeshRegion[ToBoundaryMesh[Cylinder[{{0, 0, -5}, {0, 0, 5}}, 5]]];
c2 = BoundaryMeshRegion[ToBoundaryMesh[Cylinder[{{0, 0, -1}, {0, 0, 1}}, 1]]];
RegionErosion[c1, c2]

It produces nothing:

enter image description here

However,

RegionErosion[Cylinder[{{0, 0, -5}, {0, 0, 5}}, 5], Cylinder[{{0, 0, -1}, {0, 0, 1}}, 1]]

does work:

enter image description here

So, is there any way to apply erosion to a mesh, or it's just not possible with current RegionErosion implementation?

$\endgroup$
3
  • $\begingroup$ A shot in the blue: try to use a ToElementMesh with mesh order 1 and convert that to a mesh region. $\endgroup$
    – user21
    Dec 30, 2022 at 7:04
  • $\begingroup$ @user21 naahh, no go either. $\endgroup$
    – Anton
    Dec 30, 2022 at 10:09
  • $\begingroup$ I think this is not implemented for discretized regions. $\endgroup$
    – user21
    Jan 5 at 6:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.