View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002062||FreeCAD||Bug||public||2015-04-18 21:30||2015-12-15 13:17|
|Platform||laptop||OS||window 8||OS Version||x64|
|Target Version||Fixed in Version||0.16|
|Summary||0002062: svg size different on import|
|Description||wrong dimensions to svg when converting faces from edges and then extrude|
|Steps To Reproduce||draw a circle i used 16mm in diameter in a svg i used inkscape and seriff draw plus, the import it as svg in freecadthe convert edges to faces and extrude it 6mm the measure it comes out at 26.002mm o reverted back to stable 0.14 to see why and thats how found out it was that version|
|Tags||No tags attached.|
||Can you attach your SVG file here?|
I can reproduce the behaviour. Load attached SVG file into FreeCAD using importSVG. Then:
edge.Curve.MajorRadius # ==> 17.052650837221524
edge.Curve.MinorRadius # ==> 17.052650837221524
But the radius should be 8.0.
||Funny is when you make the circle 160mm in the SVG file and load this into FreeCAD then the radius (79.15139370954502) is almost correct.|
Beware that in the SVG file, the 160mm diameter circle is scaled (there is a transform attribute with a scale value of 0.3487078). So the result won't be 160mm anyway. There is no bug in FreeCAD there. If it's in the SVG file, it will be applied.
But, even when we remove that transform attribute, the result is scaled. There is indeed a scaling that occurs in importSVG.py below line 465. If a paper size is specified in the SVG file, a scaling factor is calculated. If not, a scaling occurs too... I don't remember why that was introduced, maybe shoogen will know better
Reminder sent to: shoogen
Can you have a look at this shoogen?
@Werner: The almost correct is due the fact the inkscape adds the linewidth to the diameter. (And due to a possible rounding in the 90dpi user units when exporting from inkscape with a limited number of decimal places)
@Yorik: The scaling should work correctly if the width and height is given in absolute Units and if the viewbox is specified.
The file Zeichnung-3.svg. Has millimeters given in the width and height attribute. But there is no viewbox information.
I have no idea how to interpret this file.
||Would it make sense to add a preferences setting to disable SVG import scaling? It would be an easy fix...|
|2015-04-18 21:30||chris33||New Issue|
|2015-04-19 04:26||yorik||Note Added: 0006045|
|2015-04-19 10:17||wmayer||Note Added: 0006047|
|2015-04-19 10:17||wmayer||File Added: Zeichnung-3.svg|
|2015-04-19 10:23||wmayer||Note Added: 0006048|
|2015-04-19 17:40||yorik||Note Added: 0006051|
|2015-04-19 17:40||yorik||Note Added: 0006052|
|2015-04-19 17:50||shoogen||Assigned To||=> shoogen|
|2015-04-19 17:50||shoogen||Status||new => assigned|
|2015-04-25 09:58||shoogen||Note Added: 0006087|
|2015-05-06 15:32||yorik||Relationship added||has duplicate 0002090|
|2015-05-07 20:46||yorik||Note Added: 0006126|
|2015-05-09 20:31||shoogen||Changeset attached||=> FreeCAD Master master d4f3cb72|
|2015-09-06 02:36||yorik||Changeset attached||=> FreeCAD Master master 3665b778|
|2015-09-06 02:36||yorik||Assigned To||shoogen => yorik|
|2015-09-06 02:36||yorik||Status||assigned => closed|
|2015-09-06 02:36||yorik||Resolution||open => fixed|
|2015-12-15 13:17||yorik||Fixed in Version||=> 0.16|