mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-06 14:35:44 -05:00
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:
1 parent
4cc8b8f9b7
commit
1ffe904892
1 file changed
+10
@@ -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