Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Last active Aug 1, 2021
Embed
What would you like to do?
Get Top Face Revit API
public static PlanarFace GetTopFace(Solid solid)
{
PlanarFace topFace = null;
FaceArray faces = solid.Faces;
foreach (Face f in faces)
{
PlanarFace pf = f as PlanarFace;
if (pf.FaceNormal.IsAlmostEqualTo(new XYZ(0, 0, 1)))
{
topFace = pf;
}
}
return topFace;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment