PlanarFace Class


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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

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