OpenSCAD surface Gimp Export Plugin

179
Downloads
1394
Views
Published on November 22, 2012

Description

I've written a gimp python plugin to export the openscad surface format. The pic shows the greyscale height-field and the resultant openscad surface.
This was done to design terrain in gimp and send the tiles to a 3d printer.

Instructions

Extract the python file an put it in your gimp plugin directory.
Open a greyscale image in gimp then save it with a ".dat" extension (i.e. "testsurface.dat"

Then use this in openscad comme ca:

surface(file = "testsurface.dat", center=true, convexity = 5);

and scale as needed...

Note that really large surface files will cause openSCAD to die horribly, so it is best to prescale the image before exporting.

Tags
This Thing has no tags.
Report as inappropriate

You must be logged in to post a comment.

Thank you for the Plug-In. I tested it with Gimp 2.8.3 (OS X 10.8.3), it works.

How-to for use with Customizable Lithopane offline:

First extract the python file "openscad_surface_export.py" and put it in your gimp plugin folder (/Application/Gimp/Content/Resources/lib/glimp/2.0/plug-ins)

1. Open an image in Gimp.
2. Select <img> (right mouse click) Image -> Mode -> Grayscale.
3. Invert Colors: Menu > Colors > Invert.
4. Export the image with a ".dat" extension (i.e. "Surface.dat").

However it doesn't work with the latest Gimp-Version 2.8.4.

Can you be more specific other than "it doesn't work"? Are there any errors, does the file get created incorrectly, or nothing at all?

Hi, I tested your plugin with Gimp 2.8.x in Linux, it doesn't work maybe with the new politic of the Saving menu (only Gimp file here).

For the newer version of GIMP, you need to use the export command, then select the .dat extension. Works great for me now. A bit of a learning curve to get it working. Awesome plugin!