The Surface entity in Eyeshot contains a list of trim loops as a collection of curves properly oriented (counter-clockwise for outer ones, clockwise for inner loops).
To check if the surface is trimmed you can query the
mySurf.IsTrimmed property. To loop over loops or loop curves use the
mySurf.Trimming.ContourList property as you can see in the code snippet below.
The following code snippet demonstrates how to extract surface edge curves from the entity
ent and to add them to the
ViewportLayout master entity collection with red color.
Surface surf = (Surface) ent; ICurve curves = surf.ExtractEdges(); Entity entArray = new Entity[curves.Length]; for (int i = 0; i < curves.Length; i++) entArray[i] = (Entity) curves[i]; viewportLayout1.Entities.AddRange(entArray, Color.Red);
Please sign in to leave a comment.