Search code examples
c#eyeshot

How to properly convert Solid.Section() results into Regions in Eyeshot?


When trying to get a section of a devDept.Eyeshot.Entities.Mesh or devDept.Eyeshot.Entities.Solid using the .Section(Plane, double) method, we get an ICurve[].

If the result is multiple closed curves, to draw the ICurve[], I convert all the ICurves inside it to CompositeCurve one-by-one and add it to Entities.

Now, is there any way of converting it to Regions so the end result looks better?


Solution

  • You can use UtilityEx.GetConnectedCurves() and UtilityEx.DetectRegionFromContours() methods as explained in this article: https://devdept.zendesk.com/hc/en-us/articles/115008270987-Extruding-DWG-DXF-profiles-