DXF import plugin (dxf_input.py) bugs, missing features and their solutions.
Hello! Let me introduce myself to group. My name is Vladimir Kalyaev (http://kalyaev.com) one of the "gcodetools" developers. gcodetools is the Inkscape extension to add CNC functionality. It generates G-Codes from SVG drawings and aimed to be a complete CAD/CAM freeware open-source workflow.
DXF import bugs. I've discovered 2 major bugs in the latest dxf_import.py release. Both of them are incorrect last "bulget" (having curvature) segment import of LWPOLYLINE. This plugin simply throws away this segment and replaces it with a straight line. Incorrect import example (straight lines point to errorneus lines. Arcs should be there): http://kalyaev.com/2010/20100513/inkscape-direct.png The source code was modified by me to correct these errors. Now all closed polylines imports correctly to Inkscape.
Also there is another missing feature: POINT primitive import due to SVG limitation (there is no POINT at all inside SVG specification). dxf_import.py imports POINTS as two circular segments and they are totally indistinguishable from the other objects. Point is very usefull for "drilling" and e.t.c so a simple solution: import them as any object (red arrow in my version) with the "d" outline "M x,y ..." (x,y)=(pointX, pointY) and special SVG-attribute "dxfpoint":"1" to distinguish from the other objects. This behaviour turns on when new "checkmark" is enabled (dxf_import.inx)
All of these corrections and additions are tested and work fine. I offer to merge them into current Inkscape dev distribution. Everyone can take these files from launchpad.net "lp:gcodetools" branch or download today's version with the DXF,svg,png examples from the http://kalyaev.com/2010/20100601/gcodetools.v85.zip
Have a nice day!
--- Vladimir Kalyaev.
dormouse wrote:
Thanks, I'll take a look at the changes. Could you attach the file gcodetools.v85.zip? I have been able to get the dxf_input.py and .inx file from lp:gcodetools, but I do not have access to the link at gcodetools.v85.zip.
Alvin Penner
To: Alvin Penner
Thanks, I'll take a look at the changes. Could you attach the file
gcodetools.v85.zip? I have been able to get the dxf_input.py and .inx file from lp:gcodetools, but I do not have access to the link at gcodetools.v85.zip.
There were some server-side problems. The link is working right now. Attach is also included.
If you need more explanation I will write down them in details.
gcodetools team want to focus on the bugfixes and cleanups now. It will be very good to see gcodetools and corrected dxf_import.py inside Inkscape 0.48 final distribution. What should we do to achieve this goal?
--- Vladimir Kalyaev.
thanks, I got the attachments okay.
Alvin Penner
On Tue, Jun 1, 2010 at 11:22 AM, dormouse <dormouse@...624...> wrote:
Also there is another missing feature: POINT primitive import due to SVG limitation (there is no POINT at all inside SVG specification). dxf_import.py imports POINTS as two circular segments and they are totally indistinguishable from the other objects. Point is very usefull for "drilling" and e.t.c so a simple solution: import them as any object (red arrow in my version) with the "d" outline "M x,y ..." (x,y)=(pointX, pointY) and special SVG-attribute "dxfpoint":"1" to distinguish from the other objects. This behaviour turns on when new "checkmark" is enabled (dxf_import.inx)
It's better not to place in SVG namespace any attributes not defined in SVG standard. I propose to move them to Inkscape namespace, i.e. inkscape:dxfpoint="1" (unless someone can propose a better solution).
dormouse wrote:
Hello! Let me introduce myself to group. My name is Vladimir Kalyaev (http://kalyaev.com) one of the "gcodetools" developers. gcodetools is the Inkscape extension to add CNC functionality. It generates G-Codes from SVG drawings and aimed to be a complete CAD/CAM freeware open-source workflow.
Thanks for the feedback, In the dxf_input.py file I have modified the routine for LWPOLYLINE so that it will explicitly draw in the last segment if it is a closed object. I've also renamed the POINT attribute to be 'inkscape:dxfpoint' as suggested.
The new file is attached; if there is no objection, I will commit the modified file dxf_input.py after 0.48 is released.
Alvin Penner http://old.nabble.com/file/p29000697/dxf_input.py dxf_input.py
committed to bzr 9629
participants (3)
-
Alvin Penner
-
bulia byak
-
dormouse