This project has moved. For the latest updates, please go here.

SetInternalInfo single arc exception

Feb 6, 2013 at 4:40 AM
Trying to load some dxfs that have been generated from an app running in AutoCAD map 3d 2012 and get an exception "A single arc does not make closed loop." If I just comment out the line that checks for data.Count to be more than one the dxf loads without further complaint.:
//if (data.Count <= 1) throw new ArgumentException("A single arc does not make closed loop.");
(in HatchPatternBoundary.cs)

FWIW, the dxfs load fine in every cad or viewer I could find.

Am I asking for trouble by just not doing that arc check?
Coordinator
Feb 6, 2013 at 6:26 PM
I have been running a couple test about this matter and I found that, actually, AutoCAD does not complain on having not closed loops as part of the boundaries of a hatch. Draw for example 4 lines to draw an square and inside it an arc. We get an external loop which is closed, everything is ok, but also we get an internal loop with only the arc. The logic tell us that a hatch needs closed loops to be able to define the limits, and that this loop should not be part of it; but since AutoCAD allows this behaviour I will not complain either, so I will erase those checks on the next code update.

Something similar I got with a line inside a closed loop. In any case this is not a recommended behaviour of drawing a hatch, I got different hatch drawings importing those entities into different programs.

And, yes, you can safely erase that line of code, it will not make any harm besides what is dicussed here.

Daniel