Discrete 2-D or 3-D geometry description
Create a discrete geometry for your model by using one of the following approaches:
importGeometryto import a 2-D or 3-D geometry from an STL file or a 3-D geometry from a STEP file and attach it to the model.
geometryFromMeshto reconstruct a 2-D or 3-D geometry from mesh and attach it to the model.
multisphereto create a 3-D geometry. Then assign the resulting geometry to the
Geometryproperty of the model. For example, create a PDE model and add the following geometry formed by three spheres to the model.
model = createpde; gm = multisphere([1,2,3]); model.Geometry = gm;
extrudeto create a 3-D geometry by vertically extruding a 2-D geometry.
NumCells — Number of geometry cells
Number of geometry cells, specified as a nonnegative integer.
NumEdges — Number of geometry edges
Number of geometry edges, specified as a nonnegative integer.
NumFaces — Number of geometry faces
Number of geometry faces, specified as a positive integer.
NumVertices — Number of geometry vertices
Number of geometry vertices, specified as a nonnegative integer.
Vertices — Coordinates of geometry vertices
N-by-2 numeric matrix |
N-by-3 numeric matrix
Coordinates of geometry vertices, specified as an
N-by-3 numeric matrix for a 2-D or 3-D geometry, respectively.
N is the number of vertices.
|Fill void regions in 2-D and split cells in 3-D geometry
|Add vertex on geometry boundary
|Merge geometry cells
|Find edges belonging to boundaries of specified cells
|Find faces belonging to specified cells
|Find edges belonging to specified faces
|Find faces attached to specified edges
|Find edges nearest to specified point
|Find faces nearest to specified point
Nested Cylinders Geometry
Create the geometry consisting of three cylinders of the same height by using the
gm = multicylinder([5 10 15],20)
gm = DiscreteGeometry with properties: NumCells: 3 NumFaces: 9 NumEdges: 6 NumVertices: 6 Vertices: [6x3 double]
Plot the geometry.
Geometry from STL File
Import a geometry from an STL geometry file.
gm = importGeometry("ForearmLink.stl")
gm = DiscreteGeometry with properties: NumCells: 1 NumFaces: 147 NumEdges: 329 NumVertices: 213 Vertices: [213x3 double]
Plot the geometry,
Introduced in R2015a