Hi Yorik
In current master I have noticed that FreeCAD is ignoring various DXF import preference values when using your newer C++ DXF importer. Is there any chance this a bug or possibly just a not yet implemented aspect of your recent DXF work?
Here is a dxf file I created in LibreCAD with a selection of elements, in case it is convenient.
dxfwithmanyexampleelementscreatedwithLibrecad.dxf (8.85 KB)
If I start FreeCAD the go to Draft WB, Edit menu…Preferences…Import-Export…DXF
with “legacy Python importer” NOT selected, the following make not difference, in all cases I just get simple Part objects named/labelled “Shape” etc.
- simple Part shapes/Draft Objects/Sketches - setting here makes no difference
- join geometry tick box - setting here makes no difference
- Treat ellipses and splines as polylines - setting here makes no difference
If I tick use “legacy Python importer” then the settings work.
By the way, with importing the above test dxf file with the new importer I get the Ellipse but the spline is ignored where as with the legacy Python importer the spline is imported (this is with “treat ellipses and splines as polylines” not ticked) but the ellipse causes an error message
Draft workbench activated
opening /home/user/Downloads/dxfwithmanyexampleelementscreatedwithLibrecad.dxf…
drawing 8 lines…
drawing 1 polylines…
drawing 1 arcs…
drawing 1 circles…
drawing 1 splines…
drawing 1 ellipses…
Traceback (most recent call last):
File “”, line 1, in
File “/home/user/Downloads/cad/freecad_master/build_master_blobfishOCE691_tbb_gl2ps_freeimg/Mod/Draft/importDXF.py”, line 1503, in open
processdxf(doc,filename)
File “/home/user/Downloads/cad/freecad_master/build_master_blobfishOCE691_tbb_gl2ps_freeimg/Mod/Draft/importDXF.py”, line 1221, in processdxf
shape = drawEllipse(ellipse)
File “/home/user/Downloads/cad/freecad_master/build_master_blobfishOCE691_tbb_gl2ps_freeimg/Mod/Draft/importDXF.py”, line 510, in drawEllipse
if (dxfCreateDraft or dxfCreateSketch) and (not forceShape):
<type ‘exceptions.NameError’>: global name ‘forceShape’ is not defined
Let me know if you would like me to write up a ticket. ![]()
Jim
OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6350 (Git)
Build type: Debug
Branch: master
Hash: 645a83ad324fdf06272cccdf852144da6b2626a2
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18-dev