PlanarFace Class


A bounded face of a 3d solid or open shell.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)

Syntax

C#
public class PlanarFace : Face
Visual Basic
Public Class PlanarFace _
	Inherits Face
Visual C++
public ref class PlanarFace : public Face

Remarks

Planar faces are defined by planes bounded by edge loops. The planes provide natural UV parameterization to the faces. S(u, v) = Origin + u*Vector[0] + v*Vector[1]

Examples

Copy C#
private void GetPlanarFaceInfo(Face face)
{
    PlanarFace planarFace = face as PlanarFace;
    if (null != planarFace)
    {
       XYZ origin = planarFace.Origin;
        XYZ normal = planarFace.FaceNormal;
        XYZ vector = planarFace.XVector;
    }
}
Copy VB.NET
Private Sub GetPlanarFaceInfo(face As Face)
   Dim planarFace As PlanarFace = TryCast(face, PlanarFace)
   If planarFace IsNot Nothing Then
      Dim origin As XYZ = planarFace.Origin
      Dim normal As XYZ = planarFace.FaceNormal
      Dim vector As XYZ = planarFace.XVector
   End If
End Sub

Inheritance Hierarchy

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 →