fix: exclude BEND layer entities from DXF geometry import
BEND layer lines were being imported as cut geometry alongside the separate Bend object detection, causing duplicate dark lines in nests. Skip BEND layer entities in DxfImporter since bend detection reads directly from the raw CadDocument. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,11 @@ namespace OpenNest.IO
|
||||
|
||||
foreach (var entity in doc.Entities)
|
||||
{
|
||||
// Skip bend line entities — they are converted to Bend objects
|
||||
// separately via bend detection, not cut geometry.
|
||||
if (IsBendLayer(entity.Layer?.Name))
|
||||
continue;
|
||||
|
||||
switch (entity)
|
||||
{
|
||||
case ACadSharp.Entities.Line line:
|
||||
@@ -131,5 +136,10 @@ namespace OpenNest.IO
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
private static bool IsBendLayer(string layerName)
|
||||
{
|
||||
return string.Equals(layerName, "BEND", System.StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user