Triangulate Method


Face Triangulate Method

Returns a triangular mesh approximation to the face.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public Mesh Triangulate()

Return Value

Mesh
Remarks
Tolerance of approximation is defined internally by Revit to be adequate for display purposes.
Example
C#
private void TriangulateFace(Face face)
{
    // Get mesh
    Mesh mesh = face.Triangulate();
    for (int i = 0; i < mesh.NumTriangles; i++)
    {
        MeshTriangle triangle = mesh.get_Triangle(i);
        XYZ vertex1 = triangle.get_Vertex(0);
        XYZ vertex2 = triangle.get_Vertex(1);
        XYZ vertex3 = triangle.get_Vertex(2);
    }
}
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →