View Issue Details

IDProjectCategoryView StatusLast Update
0000935FreeCADBugpublic2013-04-17 15:21
Reporterpklake Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.12 
Fixed in Version0.13 
Summary0000935: Failure to load SVG file
DescriptionLoading the attached SVG file (which opens ok in Chrome browser)
a) as a drawing - only part of the image is displayed
b) as geometry - throws an exception
TagsNo tags attached.
FreeCAD Information

Relationships

child of 0000356 closed Switch from QSvg to QWebKit 

Activities

2012-12-31 15:30

 

CycloidalGear.svg (Attachment missing)

shoogen

2013-01-01 10:21

developer   ~0002777

Last edited: 2013-01-01 10:35

The following fixes the import as geometry

diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py
index 5bf9de8..74b98f1 100644
--- a/src/Mod/Draft/importSVG.py
+++ b/src/Mod/Draft/importSVG.py
@@ -887,7 +887,8 @@ class svgHandler(xml.sax.ContentHandler):
                                 rot90=FreeCAD.Matrix(0,-1,0,0,1,0) 0000090
                                 m3=m3.multiply(rot90)
                                 m3.move(c.multiply(-1))
- sh.transform(m3)
+ sh.transformShape(m3)
+ #sh = sh.transformGeometry(m3)
                         if self.fill:
                                 sh = Part.Wire([sh])
                                 sh = Part.Face(sh)



The probem with the svg rendering in Qt view (drawing) is not related. One workaround known is to use another rendering engine (such as webkit) which has been discussed before.

2013-01-02 22:53

 

import_svg_drawing.png (Attachment missing)

2013-01-02 22:54

 

svg_on_inkscape.png (Attachment missing)

ryback08

2013-01-02 23:00

reporter   ~0002788

I try to open svg file link with Freecad:

# If i import svg as drawing, svg is not draw fully (i link two screenshoot)

# If i import svg as geometry, i have this message (v0.13RC1803 win7)

processing element 1: svg
existing group transform: []
name: 0
done processing element 1
processing element 2: g
existing group transform: [Matrix ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1))]
name: HelperLines
done processing element 2
processing element 3: ellipse
existing group transform: [Matrix ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)), Matrix ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1))]
name: 0
Exception (Thu Jan 03 00:56:07 2013): 'Part.TopoShape' object has no attribute 'transform'

yorik

2013-01-08 11:01

administrator   ~0002824

I'll add shoogen's fix as soon as i have a computer again...

yorik

2013-01-21 11:59

administrator   ~0002867

The draft (import as geometry) problem is fixed with commit 0a876e. The other problem will be solved when we switch from qtsvg to webkit to render svg files...

yorik

2013-04-17 15:21

administrator   ~0003070

I'll close this bug report because what could be fixed has been fixed.

Issue History

Date Modified Username Field Change
2012-12-31 15:30 pklake New Issue
2012-12-31 15:30 pklake File Added: CycloidalGear.svg
2013-01-01 10:21 shoogen Note Added: 0002777
2013-01-01 10:27 shoogen Note Edited: 0002777
2013-01-01 10:31 shoogen Note Edited: 0002777
2013-01-01 10:35 shoogen Note Edited: 0002777
2013-01-02 22:53 ryback08 File Added: import_svg_drawing.png
2013-01-02 22:54 ryback08 File Added: svg_on_inkscape.png
2013-01-02 23:00 ryback08 Note Added: 0002788
2013-01-08 11:01 yorik Note Added: 0002824
2013-01-08 11:01 yorik Status new => assigned
2013-01-08 11:01 yorik Assigned To => yorik
2013-01-21 11:59 yorik Note Added: 0002867
2013-01-21 12:07 yorik Relationship added child of 0000356
2013-04-17 15:21 yorik Note Added: 0003070
2013-04-17 15:21 yorik Status assigned => closed
2013-04-17 15:21 yorik Resolution open => fixed
2013-04-17 15:21 yorik Fixed in Version => 0.13