feat(io): add DWG file import support via ACadSharp DwgReader
ACadSharp already includes DwgReader, so this wires it up across the entire import pipeline — Dxf.Import, CadConverter drag-drop, nest import dialog, console CLI, BOM analyzer, and training data collector. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,11 @@ namespace OpenNest.IO.Bom
|
||||
var nameWithoutExt = Path.GetFileNameWithoutExtension(file);
|
||||
dxfFiles[nameWithoutExt] = file;
|
||||
}
|
||||
foreach (var file in Directory.GetFiles(dxfFolder, "*.dwg"))
|
||||
{
|
||||
var nameWithoutExt = Path.GetFileNameWithoutExtension(file);
|
||||
dxfFiles.TryAdd(nameWithoutExt, file);
|
||||
}
|
||||
}
|
||||
|
||||
// Partition items into: skipped, unmatched, or matched (grouped)
|
||||
@@ -57,8 +62,8 @@ namespace OpenNest.IO.Bom
|
||||
|
||||
var lookupName = item.FileName;
|
||||
|
||||
// Strip .dxf extension if the BOM includes it
|
||||
if (lookupName.EndsWith(".dxf", StringComparison.OrdinalIgnoreCase))
|
||||
if (lookupName.EndsWith(".dxf", StringComparison.OrdinalIgnoreCase)
|
||||
|| lookupName.EndsWith(".dwg", StringComparison.OrdinalIgnoreCase))
|
||||
lookupName = Path.GetFileNameWithoutExtension(lookupName);
|
||||
|
||||
if (!folderExists)
|
||||
|
||||
Reference in New Issue
Block a user