Closed cbiffle closed 2 years ago
So the problem is that the DXF created by OpenSCAD does not define any layers. dxflib defaults to layer 0
if no layer is specified by the file. When it tries to add an entity to layer 0
you get the error you mentioned above. I don't know if OpenSCAD is creating an incorrect DXF file or if dxflib is handling it incorrectly. However, if I just automatically add the missing layer in the code it seems to work fine. This will be fixed in the next release. See the associated commit.
Given a simple 2D piece in OpenSCAD (2021.01), e.g.
CAMotics (1.2.0) via TPL will not load the results of exporting to DXF. The following TPL statement:
reliably fails with the message
Loading the DXF file into Inkscape and saving without apparent changes alters the format and causes it to start working with CAMotics. I'm not familiar enough with the DXF format to explain the changes Inkscape makes, though it certainly inserts a bunch of stuff.