View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000935 | FreeCAD | Bug | public | 2012-12-31 15:30 | 2013-04-17 15:21 |
Reporter | pklake | Assigned To | yorik | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.12 | ||||
Fixed in Version | 0.13 | ||||
Summary | 0000935: Failure to load SVG file | ||||
Description | Loading 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 | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
child of | 0000356 | closed | Switch from QSvg to QWebKit |
2012-12-31 15:30
|
|
|
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
|
|
2013-01-02 22:54
|
|
|
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' |
|
I'll add shoogen's fix as soon as i have a computer again... |
|
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... |
|
I'll close this bug report because what could be fixed has been fixed. |
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 |