fix: convert arc angles from radians to degrees in DrawingDxfExporter

ACadSharp Arc.StartAngle/EndAngle store values in degrees (DXF spec groups
50/51). The previous code passed Math.Atan2 results (radians) directly,
causing silent geometry corruption. Also hardened the arc export test to
assert angles are in degree range (0..360).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
aj
2026-06-23 06:53:17 -04:00
co-authored by Claude Sonnet 4.6
parent af07946a79
commit 7a4a35da55
2 changed files with 8 additions and 3 deletions
@@ -59,5 +59,9 @@ public class DrawingDxfExporterTests
var arcs = doc.Entities.OfType<ACadSharp.Entities.Arc>().ToList();
Assert.Single(lines);
Assert.Single(arcs);
var arc = doc.Entities.OfType<ACadSharp.Entities.Arc>().Single();
// Angles must be in degrees (0..360), not radians (0..6.28)
Assert.InRange(arc.StartAngle, 0, 360);
Assert.InRange(arc.EndAngle, 0, 360);
}
}