Message Boards Message Boards

Export MeshRegion with its inner points and elements?


I want to use Mathematica to mesh a 3D solid region for FEM calculation. So I use DiscretizeRegion to generate a MeshRegion object. It contains points, lines, triangles and tetrahedrons information.

But when I export the MeshRegion into a .stl or .obj file, there is only surface data left and inner data is lost. The solid discrete region transformed into a 3D surface. What should I do to export a complete MeshRegion object?

POSTED BY: Yukun Huang
1 year ago

Welcome to Wolfram Community! Please make sure you know the rules:

You need to edit your post and add code that illustrates the issue.

POSTED BY: Moderation Team
1 year ago

My understanding, which can easily be wrong, is that this behavior is correct. Quoting the Wikipedia page on STL:

STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture or other common CAD model attributes.

3D graphics formats are significantly more complicated and varied than people at first think. Can you provide a minimal example of the problem? STL represents "what is filled" by using normal vectors on each face. This is why you can use them for 3D printing for example. So I'm not sure a mesh object is naturally represented by the file format as anything but the filled boundary of the mesh.

Additionally, The STL and OBJ exporters were originally made for graphics, so I guess possible they don't have certain features that might be useful for meshes.

POSTED BY: Sean Clarke
1 year ago

Group Abstract Group Abstract