Skip to content

Mesh

Public Class

A triangular mesh.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.DB.Mesh

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

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

Indicates whether this geometry is obtained directly from an Element.
(Inherited from GeometryObject)


Public Property
Code Example

Identifies if the object is read-only or modifiable.
(Inherited from APIObject)


Public Property

Element ID of the material from which this mesh is composed.


Public Property
NumberOfNormals

The number of normals associated with the mesh.


Public Property

The number of triangles that the mesh contains.


Public Property

Transforms this mesh and returns the result.


Public Property

Retrieves a specific triangle.


Public Property

Retrieves all vertices used to define this mesh. Intended for indexed access.


Public Property
Visibility

The visibility.
(Inherited from GeometryObject)


Methods

Name

Description


Public Method

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

Gets the integer value of the geometry object as hash code
(Inherited from GeometryObject)


Public Method

Returns a normal unit vector at the given index.


Public Method

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)


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

, and a corresponding array of triangles. Triangles can be accessed by index from , and reference 3 vertices from the array.