11-21-2019
06:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-21-2019
06:46 AM
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;
}