Using PostScript as an OpenSCAD editor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using PostScript as an OpenSCAD editor

Well, not really, but darned close!

I got an idea to make something which has a rather complicated plan (top) view so I decided to create the plan paths in PostScript (PS). (I've a LOT of practice drawing in PS.) I rigged the PS program to print out the paths (three of them), to a file as OpenSCAD variables as well as some other useful values defined as OpenSCAD statements. I "include"d the PS program output file in my *.scad file and used the path variables to make polygons. With it all set up like that every time I run the PS program the model updates automatically in OpenSCAD. That makes me happy!

I edit the PS program in vim and run it from vim with :!! (after once typing the whole gs command). It's cool.

The PS program takes command line options to customize the beast.

(The diameter of the wheel (not including the (ugh) spikes) is about 3.875 inches so the number labels are pretty small so I doubt they will print, but it wasn't hard to do and they are (parametrically) optional. Comments on the thingy are welcome.)