QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • 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

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;
Closed by  Andrew
31.05.2012 08:58
Reason for closing:  Fixed
Admin
Andrew commented on 24.05.2012 10:22

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.

Peter commented on 24.05.2012 14:38

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 ;)

Admin
Andrew commented on 24.05.2012 15:32

Of course, sorry!

Thanks for the information for getting rid of transforms. I was looking for that.

Peter commented on 24.05.2012 20:02

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

Admin
Andrew commented on 24.05.2012 20:54

Thanks again.

Indeed a problem in ShapeAlgorithms:

Line 738 is:

 

but should be:

 

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing