QCAD - 2D CAD System.
Click here for a documentation of the DokuWiki formatting syntax that can be used in reports
Please search for existing tasks (also closed ones) before opening a new task.
Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help - Check for Updates)
FS#603 - SVG import straight path segments
Attached to Project:
QCAD
Opened by Peter (hungerburg) - Thursday, 24 May 2012, 11:43 GMT+2
Last edited by Andrew (andrew) - Thursday, 31 May 2012, 10:58 GMT+2
Opened by Peter (hungerburg) - Thursday, 24 May 2012, 11:43 GMT+2
Last edited by Andrew (andrew) - Thursday, 31 May 2012, 10:58 GMT+2
|
DetailsI 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;
|
This task depends upon
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: