Import 2-D or 3-D geometry from STL data
importGeometry(
creates a geometry container from the specified STL geometry file, and includes
the geometry in the model
,geometryfile
)model
container.
also returns the geometry to the MATLAB® workspace.gd
= importGeometry(model
,geometryfile
)
importGeometry
does not allow you to import a multidomain
2-D or 3-D geometry where subdomains have any common points. If the subdomains
of the geometry have common points, the toolbox still treats these subdomains as
disconnected, without any common interface between them. Each subdomain has its
own mesh.
Because of this limitation, you cannot import nested 3-D geometries directly.
As a workaround, you can import a mesh and then create a multidomain geometry
from the mesh by using the geometryFromMesh
function.
STL format approximates the boundary of a CAD geometry by a collection of
triangles, and importGeometry
reconstructs the faces and
edges from this data. Reconstruction from STL data is not precise and can result
in a loss of edges and, therefore, the merging of adjacent faces. Typically,
lost edges are the edges between two adjacent faces meeting at a small angle, or
smooth edges bounding blend surfaces. Usually, the loss of such edges does not
affect the analysis workflow.
Because STL geometries approximate the original CAD geometries, areas and volumes of STL and CAD geometries can differ.
DiscreteGeometry Properties | geometryFromMesh
| pdegplot
| PDEModel