We're excited and proud to launch Thingiverse Apps. Learn More about what this means to you.
I like the idea of constrained sketches available in FreeCAD. This is a hack to transfer them to OpenSCAD without too much trouble.
This Thing is an adaptation of Dan Newman's excellent Inkscape plugin (parent Thing). The main changes are:
1) Runs without input and saves .scad in the same folder as .svg file (see instructions below)
2) Does not extrude shapes, but keeps them two-dimensional
3) Ignores some transformations, and units, to get same size in OpenSCAD units as in the FreeCAD sketch.
4) Minor technical changes to circumvent ugly crash bugs in Inkscape (and FreeCAD's svg export, I think)
Usage (outlined in attached images):
(Windows) Run Inkscape plugin from context menu.
inkscape --verb=EditSelectAll --verb=SelectionCombine --verb=EditDeselect --verb=command.extrude.openscad_auto.noprefs --verb=EditUndo --verb=EditUndo --verb=FileQuit /full/path/to/file.svg
This commandline opens your file in Inkscape, combines all paths and then runs the export plugin. The full path to file is important, it is used to determine the output directory for the SCAD file.
Prerequisites: Freecad, Inkscape
To install a context menu in Windows 7 (like the one in attached image) I made .reg-file which installs the menu for svg-files, and runs Inkscape assuming it's installed at the default location. I attach this .reg file, but a) never trust a .reg-file from random internet people: check the contents yourself, and b) edit the file to match the location of your Inkscape.exe .
If you are not comfortable with .reg-files, there is a guide at
http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/ , make a command for "svgfile" which runs
"c:[backslash]Program Files (x86)[backslash]Inkscape[backslash]inkscape.exe" --verb=EditSelectAll --verb=SelectionCombine --verb=EditDeselect --verb=command.extrude.openscad_auto.noprefs --verb=EditUndo --verb=EditUndo --verb=FileQuit "%1"
(sorry for [backslash] -- thingiverse removes them automatically it seems)
This is very much a Work in Progress, and it has not been tested at all. It just happens to work on my machine, with my settings. It should probably do something to .svg's generated with other programs as well, feel free to try.
FreeCAD sketch to OpenSCAD script by Bror is licensed under the GNU - GPL license.
So what's this mean?
We're sure Bror would love to see what you've printed - take a photo and share it on Thingiverse as a Make.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. You can also download the Thingiverse Mobile app (available via Google Play and Apple App Store) to take a photo and upload your Make right from the app!