diff --git a/OpenNest.IO/CadImporter.cs b/OpenNest.IO/CadImporter.cs index 75f049a..edf806c 100644 --- a/OpenNest.IO/CadImporter.cs +++ b/OpenNest.IO/CadImporter.cs @@ -27,6 +27,7 @@ namespace OpenNest.IO var dxf = Dxf.Import(path); RemoveDuplicateArcs(dxf.Entities); + RemoveZeroSweepArcs(dxf.Entities); var bends = new List(); if (options.DetectBends && dxf.Document != null) @@ -156,6 +157,12 @@ namespace OpenNest.IO return drawing; } + internal static void RemoveZeroSweepArcs(List entities) + { + entities.RemoveAll(e => + e is Arc arc && arc.StartAngle.IsEqualTo(arc.EndAngle, Tolerance.ChainTolerance)); + } + internal static void RemoveDuplicateArcs(List entities) { var circles = entities.OfType().ToList();