Mesh Class


Mesh Class

A triangular mesh.
Inheritance Hierarchy

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Mesh : GeometryObject

The Mesh type exposes the following members.

Properties
Name Description
Public property DistributionOfNormals Indicates the distribution of normal vectors along the tessellated mesh surface.
Public property Code example GraphicsStyleId The ElementId of the GeometryObject's GraphicsStyle
(Inherited from GeometryObject )
Public property Id A unique integer identifying the GeometryObject in its associated non view-specific GeometryElement.
(Inherited from GeometryObject )
Public property IsClosed Indicates whether the mesh is closed.
Public property IsElementGeometry Indicates whether this geometry is obtained directly from an Element.
(Inherited from GeometryObject )
Public property Code example IsReadOnly Identifies if the object is read-only or modifiable.
(Inherited from APIObject )
Public property MaterialElementId Element ID of the material from which this mesh is composed.
Public property NumberOfNormals The number of normals associated with the mesh.
Public property NumTriangles The number of triangles that the mesh contains.
Public property Transformed Transforms this mesh and returns the result.
Public property Triangle Retrieves a specific triangle.
Public property Vertices Retrieves all vertices used to define this mesh. Intended for indexed access.
Public property Visibility The visibility.
(Inherited from GeometryObject )
Top
Methods
Name Description
Public method ComputeSurfaceArea Computes and returns the surface area of the mesh. The surface area is the sum of the areas of the constituent facets of the mesh.
Public method Dispose Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject )
Public method Equals Determines whether the specified Object is equal to the current Object .
(Inherited from GeometryObject )
Public method GetHashCode Gets the integer value of the geometry object as hash code
(Inherited from GeometryObject )
Public method GetNormal Returns a normal unit vector at the given index.
Public method GetNormals Returns all normals assigned to the mesh.
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Top
Remarks
Meshes are generated during triangulation of faces. They can also be encountered directly in Revit geometry (typically imported geometry). Meshes contain a single array of Vertices , and a corresponding array of triangles. Triangles can be accessed by index from Triangle Int32 , and reference 3 vertices from the Vertices array.
See Also