SVG import is empty
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
SVG import is empty
I'm trying to import an outline from Adobe Illustrator as an SVG and nothing shows. Is there anything more to try?
OS: OS X El Capitan (10.11)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15310 (Git)
Build type: Release
Branch: (HEAD detached at c88a64e8e)
Hash: c88a64e8e7a3bb66a23b965b655b5a5040dfa4d2
Python version: 2.7.15
Qt version: 5.11.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
OS: OS X El Capitan (10.11)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15310 (Git)
Build type: Release
Branch: (HEAD detached at c88a64e8e)
Hash: c88a64e8e7a3bb66a23b965b655b5a5040dfa4d2
Python version: 2.7.15
Qt version: 5.11.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
- Attachments
-
- Puny C half.svg
- (1.69 KiB) Downloaded 109 times
Re: SVG import is empty
No problem here with file you provided (or at least something is imported, looking like a mountain landscape shape... )
How did you import the file ? "New file" then "Import" ? Or direct "Open" ? What import type (here I can choose "Drawing" or "SVG as a geometry" ?
Did the Report panel raise an error ?
PS : notice on my side any import way/type correctly works
---
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15611 (Git)
Build type: Release
Branch: master
Hash: 64a94ae0f7c60fc981086fe157150a9c0dca29c6
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
How did you import the file ? "New file" then "Import" ? Or direct "Open" ? What import type (here I can choose "Drawing" or "SVG as a geometry" ?
Did the Report panel raise an error ?
PS : notice on my side any import way/type correctly works
---
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15611 (Git)
Build type: Release
Branch: master
Hash: 64a94ae0f7c60fc981086fe157150a9c0dca29c6
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Re: SVG import is empty
Sorry for not giving more detail.
New file.
Import.
Select "as geometry".
A red error line appears at the bottom of the screen, but it's very long. I'll just include a screenshot of it.
I don't know if it matters, but I see the word "Draft" and reference to Draft Tools, and I see that in my Draft workbench there are no tools shown.
New file.
Import.
Select "as geometry".
A red error line appears at the bottom of the screen, but it's very long. I'll just include a screenshot of it.
I don't know if it matters, but I see the word "Draft" and reference to Draft Tools, and I see that in my Draft workbench there are no tools shown.
- Attachments
-
- error.png (25.33 KiB) Viewed 1696 times
Re: SVG import is empty
After Importing the .svg file (shoose the "SVG as geometry" radio button), press the keyboard V key, release and then press the F key. Or from the View toolbar click the Fit All tool (magnifying glass icon on white background).
Here's the resulting file, if that doesn't work.
Re: SVG import is empty
Looks like ImportSVG.py script needs routines that it can found on your install.
Maybe you could display the Report pane or run FreeCAD from the CLI to get the whole error message.
Re: SVG import is empty
I displayed the Report pane and get the following:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/importSVG.py", line 53, in <module>
from DraftTools import translate
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftTools.py", line 43, in <module>
from DraftGui import todo, QtCore, QtGui, translate, utf8_decode
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftGui.py", line 103, in <module>
"Relative": ["R",translate("draft","Relative"), "isRelative"],
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftGui.py", line 87, in translate
return QtGui.QApplication.translate(context, text, None, _encoding).encode("utf8")
<type 'exceptions.NameError'>: global name '_encoding' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/importSVG.py", line 53, in <module>
from DraftTools import translate
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftTools.py", line 43, in <module>
from DraftGui import todo, QtCore, QtGui, translate, utf8_decode
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftGui.py", line 103, in <module>
"Relative": ["R",translate("draft","Relative"), "isRelative"],
File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftGui.py", line 87, in translate
return QtGui.QApplication.translate(context, text, None, _encoding).encode("utf8")
<type 'exceptions.NameError'>: global name '_encoding' is not defined
Re: SVG import is empty
bejant-
I will want to import other SVG files in the future.
But for now, I can open your file. The shape is the outline (and centerline) a cylinder. I can't seem to make this available for rotation.
I will want to import other SVG files in the future.
But for now, I can open your file. The shape is the outline (and centerline) a cylinder. I can't seem to make this available for rotation.
Re: SVG import is empty
What do the following lines reply if you enter them in the Python console ?
EDIT : does the problem also exist if you select another language in the preferences ?
Code: Select all
reload(sys)
sys.getdefaultencoding()
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: SVG import is empty
This error affects Py2/Qt5 builds and was fixed approx 2018-12-03.PunyTune wrote: ↑Tue Jan 22, 2019 6:31 pm File "/Applications/ Bryan's/ CAD/FreeCAD 0.18.app/Contents/Mod/Draft/DraftGui.py", line 87, in translate
return QtGui.QApplication.translate(context, text, None, _encoding).encode("utf8")
<type 'exceptions.NameError'>: global name '_encoding' is not defined
Your version is 300+ commits behind master. Can you try with a more recent version?
Re: SVG import is empty
Downloading the current version of FreeCAD for Macintosh allows me to import the SVG just fine. Thanks very much.
I have now got a sketch with my outline in it.
But it doesn't seem to be like other sketches I've drawn. I can't extrude it or rotate it about an axis to make a solid. which is my goal.
I have now got a sketch with my outline in it.
But it doesn't seem to be like other sketches I've drawn. I can't extrude it or rotate it about an axis to make a solid. which is my goal.
- Attachments
-
- Puny C half.FCStd
- (18.18 KiB) Downloaded 39 times