Hatch island question

Jul 15, 2015 at 5:01 PM
Edited Jul 15, 2015 at 5:02 PM
Hi all! I enjoy this project, it is Great!

I need that my hatch has islands even if hole path intersection with rim (outer loop), like right part of image

If I do like down code -> result in left side of image.
Circle circle = new Circle(Vector2.Zero, 5);
hatch.BoundaryPaths.Add(new HatchBoundaryPath(new List<EntityObject> { circle }));
Circle circle2 = new Circle(new Vector2(0, 10), 4);
hatch.BoundaryPaths.Add(new HatchBoundaryPath(new List<EntityObject> { circle2 }));
Thank You for any help.
Sorry for my English ):
Jul 16, 2015 at 6:11 PM
To get the result you show on the left, you will need to manually calculate the intersection between the square and the circle. When you try to achieve that result, AutoCad calculates the intersection and stores the result in the edges data even if, for associative hatches, that boundary points to both entities the square and the circle.

Try to load the resulting dxf of that drawing with netDxf and look how the information is stored. You will see that the left hatch contains two boundaries a polyline that represent the intersection and a single circle for the internal island.

Jul 17, 2015 at 12:12 PM
Edited Jul 17, 2015 at 12:12 PM
Thank you for the response.

I'll try to load test dxf file, as you advice.