Faces
Faces in the Revit API can be described as mathematical functions of two input parameters “u” and “v”, where the location of the face at any given point in XYZ space is a function of the parameters. The U and V directions are automatically determined based on the shape of the given face. Lines of constant U or V can be represented as gridlines on the face, as shown in the example below:
U and V gridlines on a cylindrical face
You can use the UV parameters to evaluate a variety of properties of the face at any given location:
- Whether the parameter is within the boundaries of the face, using Face.IsInside()
- The XYZ location of the given face at the specified UV parameter value. This is returned from Face.Evaluate(). If you are also calling ComputeDerivatives(), this is also the .Origin property of the Transform returned by that method.
- The tangent vector of the given face in the U direction. This is the .BasisX property of the Transform returned by Face.ComputeDerivatives()
- The tangent vector of the given face in the V direction. This is the .BasisY property of the Transform returned by Face.ComputeDerivatives().
- The normal vector of the given face. This is the .BasisZ property of the Transform returned by Face.ComputeDerivatives().
All of the vectors returned are non-normalized.