Loading
Neon22

Inkscape to OpenSCAD converter v7

by Neon22 Oct 11, 2015
Download All Files

Thing Apps Enabled

Please Login to Comment

Comments deleted.

Hi Neon22,

great tool - as always :) ! Just wanted to say thank you.

you're most welcome. thanks

Sorry - missed the notification on this - only just saw it today. Sounds like a great idea. I see the git repo has the .py and .inx and that its derived from the original and from my code variant here.
Is that version not as useful in some way than this one ?
Can you help by describing what's not so good about it. Might as well just improve one codebase and get the best result.

Not sure, I just thought this was more feature rich.

One thing the old one does (wrong) is that it counts with fixed dpi ratio tailored for old InkScape releases. So in order for it to work I need to put '3.54331' constant to 'Scale X' and 'Scale Y' properties in 'File > Document Properties' dialog or I have to remove divisions
in produced *.scad files.

I believe your version no longer does this. So one step less in the post processing for me :-)

I also keep getting a similar error as others in windows. Not sure what the issue is I tried both .91 and .92 versions.

Traceback (most recent call last):
File "paths2openscad.py", line 1005, in
e.affect()
File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 283, in affect
self.effect()
File "paths2openscad.py", line 948, in effect
self.recursivelyTraverseSvg( [self.selected[id]], transform )
File "paths2openscad.py", line 861, in recursivelyTraverseSvg
inkex.errormsg( gettext.gettext( 'Warning: unable to draw bitmap images; ' +
NameError: global name 'gettext' is not defined

ok so for some reason on your system its not finding gettext. Could be based on where you have it installed, or where you're running it from...
You could try commenting it out and not get the error message translated at all.
The gettext() is doing language translation and if you're ok with english maybe you don't need it.
e.g. just remove gettext.gettext( and its closing bracket ) from that line (or any line using gettext)

0.92 is out now and there was a change to internal dimensions. I need to post a new version.
its only the size that is off.
to get the right size you need to change one line in the resulting scad file:.

Change:
profile_scale = 25.4/90; //made in inkscape in mm

to:
profile_scale = 1;

Hi, I keep getting this error, can you shed some light please? Cheers

Traceback (most recent call last):
File "paths2openscad.py", line 1005, in
e.affect()
File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect
self.effect()
File "paths2openscad.py", line 948, in effect
self.recursivelyTraverseSvg( [self.selected[id]], transform )
File "paths2openscad.py", line 652, in recursivelyTraverseSvg
self.recursivelyTraverseSvg( node, matNew, v )
File "paths2openscad.py", line 861, in recursivelyTraverseSvg
inkex.errormsg( gettext.gettext( 'Warning: unable to draw bitmap images; ' +
NameError: global name 'gettext' is not defined

The gettext thing is part of the localisation. Is it possible you're not using inkscape 0.91 or 0.48?
(They are about to release 0.92 in a day or two)
Or it could be something to do with localisation which I just don't know much about sorry...

I am trying to use this app and whenever I push apply it says ""Paths to OpenSCAD" is working, please wait..." and then nothing else happens. How to I get my image to appear in OpenSCAD?

Thanks,

Timmy

The extension should generate a file as shown in the UI - It is called profile.scad and its in your home directory by default.
Look for this file. Open it in openSCAD - Simple Double L click should work.

If the program does not seem to be doing anything then check:

  • if you have nothing selected then everything will be converted.
  • if you have a shape selected then only that shape will be converted (or group of shapes).
  • Try a small object first if you think maybe your real object is too big or complex and its taking forever.
    Let me know if this works.

Couldn't get V6 to work for me, but this version worked perfectly.
Thanks.

Windows 7
Inkscape 0.91
OpenSCAD Version 2015.03-2