Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jjstr8
in reply to: Anonymous

I just re-ran the test in a c# addin in debug.  Same results, under a second for 4800+ faces.

 

private void EdgeLoopTest()
{
    Inventor.SurfaceBodies srfBodies = ((Inventor.PartDocument)Props.Document).ComponentDefinition.SurfaceBodies;
    int count = 0;
    DateTime start = DateTime.Now;
    foreach (SurfaceBody body in srfBodies)
    {
        if (body.IsSolid)
        {
            foreach (Face face in body.Faces)
            {
                if (face.SurfaceType == SurfaceTypeEnum.kPlaneSurface)
                {
                    foreach (EdgeLoop loop in face.EdgeLoops)
                    {
                        double[] minPt = new double[2];
                        double[] maxPt = new double[2];
                        loop.RangeBox.MinPoint.GetPointData(ref minPt);
                        loop.RangeBox.MaxPoint.GetPointData(ref maxPt);
                        ++count;
                    }
                }
            }
        }
    }
    DateTime end = DateTime.Now;
}