05-20-2019
03:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-20-2019
03:08 PM
This "just works" and selects the correct face to add the plane to. Still, I'd like to find a way to be absolutely sure it's the same face as the hole's face.
Face planarFace = null;
for (int i = m_extrudeFace.Edges.Count; i > 0; i--)
{
Edge edge = m_extrudeFace.Edges[i];
if (edge != null)
{
int nFaces = edge.Faces.Count;
for (int j = 1; j <= nFaces; j++)
{
Face face = edge.Faces[j];
if(face.SurfaceType == SurfaceTypeEnum.kPlaneSurface)
{
Message("Planar surface found!");
planarFace = face;
}
}
}
}
if(planarFace != null)
{
WorkPlane workPlane = workPlanes.AddByPlaneAndOffset(planarFace, 0);
workPlane.Visible = true;
}