- Status Closed
- Percent Complete
- Task Type Bug Report
- Category QCAD (main)
-
Assigned To
Andrew - Operating System All
- Severity Low
- Priority Very Low
- Reported Version 3 RC5
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: QCAD Bugtracker
Opened by Peter - 24.05.2012
Last edited by Andrew - 31.05.2012
Opened by Peter - 24.05.2012
Last edited by Andrew - 31.05.2012
FS#603 - SVG import straight path segments
I noticed, that paths are not fully imported into QCAD. I rewrote case “m” of “SvgImporter” like below, that way also straight line segments are drawn correctly. Case “M” should be similar:
case 'm': x = ox = coords[0]; y = oy = coords[1]; x0 = x; y0 = y; for (k=2; k<coords.length; k+=2) { x += coords[k+0]; y += coords[k+1]; this.importLine(ox, oy, x, y); ox = x; oy = y; } break;
Thanks. There are also some other known problems with the SVG path importer of QCAD 3 RC5.
Please try the attached file - it should fix also the problem mentioned.
Note that QCAD 3 SVG import is limited to a few elements and does not support any transformations.
I guess you wanted to attach "ImportExport/SvgImporter/SvgImporter.js" instead of "File/SvgImport/SvgImport.js"?
I understand that I can get rid of transforms on paths in inkscape by grouping and ungrouping them ;)
Of course, sorry!
Thanks for the information for getting rid of transforms. I was looking for that.
I imported three files, that I exported from QCAD and of course transforms handling is missing, because everything is mirrored horizontally. Yet, this is no problem at all for me. Otherwise, the files displayed fine, just one of them showed an artifact: One spline gets rendered as a line. Stepping thru the debugger, this happens in ShapeAlgorithms.splineToLineOrArc(). Maybe tomorrow I will look at it again. In case you are interested, file attached. The offending command is "C38,114,36,136,29,139".
Kind Regards
Peter
Thanks again.
Indeed a problem in ShapeAlgorithms:
Line 738 is:
but should be: