surfaceMesh
Description
A surfaceMesh
object creates and stores a surface mesh. A surface
mesh represents a geometric surface and consists of vertices, faces, and edges. Using the
surfaceMesh
object and the object functions, you can:
Add and remove mesh vertices and faces
Perform geometric operations, such as rotate, translate, transform, and scale
Compute mesh normals
Crop, simplify, and subdivide a mesh
Check mesh properties such as whether it is self-intersecting, watertight, or orientable
Remove degenerate and unreferenced vertices and faces
Creation
Description
creates a mesh
= surfaceMesh(vertices
,faces
)surfaceMesh
object with the specified vertices and
faces.
specifies options using one or more name-value arguments in addition to the arguments
from the previous syntax. For example, mesh
= surfaceMesh(___,Name=Value)VertexNormals=[8 -4 4; 4 4 8; -6 6 3; -3
-6 6; 3 -6 -6; 6 6 -3]
specifies the normal vectors for the mesh
vertices.
Properties
Object Functions
addVertices | Add vertices to surface mesh |
addFaces | Add faces to surface mesh |
removeVertices | Remove vertices from surface mesh |
removeFaces | Remove faces from surface mesh |
translate | Translate surface mesh |
rotate | Rotate surface mesh |
transform | Apply rigid transformation to surface mesh |
vertexCenter | Find vertex center of surface mesh |
scale | Scale vertices of surface mesh |
computeNormals | Compute unit normals for mesh vertices and faces |
crop | Crop surface mesh |
simplify | Simplify surface mesh |
subdivide | Subdivide surface mesh |
isEdgeManifold | Check if surface mesh is edge-manifold |
isOrientable | Check if surface mesh is orientable |
isSelfIntersecting | Check if surface mesh is self-intersecting |
isVertexManifold | Check if surface mesh is vertex-manifold |
isWatertight | Check if surface mesh is watertight |
removeDefects | Remove surface mesh defects |
Examples
Version History
Introduced in R2022b