
OpenScad Polygon Generator by PieterBos
In a recent OpenSCAD tutorial I described the basic process for creating 2D polygons in OpenSCAD. However, drawing polygons in OpenSCAD can be very problematic. Unless every triangle is described in the same “winding order,” some of the triangles in the polygon will be “flipped” causing OpenSCAD to freak out, rather than render them properly. Rather than designing using OpenSCAD polygons, I tend to either (a) design in Inkscape, export to DXF, and extrude the DXF in OpenSCAD or (b) build up the desired polygon out of boxes and circles.
However, these methods just might be a thing of the past. Just this week two Thingiverse users have each released a new way to easily create OpenSCAD polygons without all the potential pitfalls from manually writing them.
Simarilius created an Inkscape to Openscad Export extension which will allow you to export an Inkscape shape directly as a OpenSCAD code. This would be a huge shortcut on the first method I suggested above, since you won’t have to deal with an intermediary file format and potential translation problems that could occur.
The second OpenSCAD tool is the OpenSCAD Polygon Generator by PieterBos. This program provides a nice graphical user interface for designing an object. Once you’re happy with your designs, you can export them directly as OpenSCAD code. PieterBos even put together a nice video tutorial to go along with his contribution.
Both of these tools will go a really long way to creating an easier route to developing more complex forms and making OpenSCAD more accessible. I can’t wait to see what people design using these tools!
inx and python extension to convert selected path to Openscad format.
Well this is an proof of concept so to speak. Not really a thing ;-). What i do here is generate scad files. I was playing with that thought for a while now. Because its a bit strange. I use one programming language (action-script 3.0 and flex in my case) to generate the other.
In this case for the polygon method within openscad witch is powerfull but hard to read. So a made the visual helper for generation polygon call with a bit of extrusionWeird but it works what do you think mad or mad science ;)
The small air app does not have any undo functionality and you can only draw on a grid, it was just to test something maybe i will add stuff to it ? should i ?youtube.com/watch?v=0oSW9zlKsZ8
Update 14 Jun 2011:
Thanks for the great response but a bit of warning is in place the fxp source code is, well.. how do is say it.... very sloppy ;-) , just so you know build it 2 or 3 hours or so ( hack hack )
Update 13 Aug 2011:
Still working on it but not ready for its first release :-(
Some hints
- Layers (one layer is one openscad module) each layer its own color
- Adding and Deleting of Points and of course Moving points Splitting of segments
- Curves (Maybe)
- Save files (some json or xml) so you can save your work
- Web based and AIR app
- Etc Etc ;-)