Here is the DXF reference for arcs according to AutoDesk:
Group codes Description
100
Subclass marker (AcDbCircle)
39
Thickness (optional; default = 0)
10
Center point (in OCS)
DXF: X value; APP: 3D point
20, 30
DXF: Y and Z values of center point (in OCS)
40
Radius
100
Subclass marker (AcDbArc)
50
Start angle
51
End angle
210
Extrusion direction. (optional; default = 0, 0, 1)
DXF: X value; APP: 3D vector
220, 230
DXF: Y and Z values of extrusion direction (optional)
The author of DXFLib accounted for these in his DxfArc class, so are these values not set at all at runtime? I don't see anything in his code for setting a default value, which probably needs to be added since AutoCAD is making the assumption.
The extrusion direction has to be stored as values 220, 230, otherwise the default should ALWAYS work. If that's not the case, I'd take a close look at how these DFX files are being run. Are they an earlier release that doesn't support this operation?
Update:
I think the DxfArc class really should be modified to set a null ExtrusionDirection to {0, 0, 1} based on the code and your project. I modified your main routine with the following changes and it appears to work correctly:
// Changing the class will make this less ugly
var arc = (DXFLib.DXFArc)entity;
if (arc.ExtrusionDirection.X == null ||
arc.ExtrusionDirection.Y == null ||
arc.ExtrusionDirection.Z == null)
{
arc.ExtrusionDirection.X = 0;
arc.ExtrusionDirection.Y = 0;
arc.ExtrusionDirection.Z = 1;
}
arcSegment.SweepDirection = arc.ExtrusionDirection.Z > 0
? SweepDirection.Clockwise
: SweepDirection.Counterclockwise;
When you look at the Arc in AutoCAD, the ExtrusionDirection is listed as 'Normal' under the entity's properties.