5

I know practically nothing about meshes, so I was wondering whether it's possible in Mathematica to convert a 2D mesh, embedded in 3 dimensions, to a 3D mesh? The 2D mesh was generated by a CAD program in STL format.

Domen
  • 23,608
  • 1
  • 27
  • 45
Cassini
  • 5,556
  • 5
  • 28
  • 38

1 Answers1

6

If the 2D mesh is watertight, you can create a BoundaryMeshRegion from it and then call DiscretizeRegion on it. The result fills the region enclosed by the surface mesh with a tet-mesh.

Something like this should work:

R = DiscretizeRegion[Import["file.stl", "BoundaryMeshRegion"]]
Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309