OpenSCAD surface Gimp Export Plugin

OpenSCAD surface Gimp Export Plugin

thingiverse

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. I've adjusted the scaling so the 0->255 will map to exactly -0.5 -> 0.5. Note that the surface routine seems to add a 1 unit high base to the imported surface, so the actual surface rendered will be from -1.5 -> 0.5, so you need to intersect it with a 1 unit high centered box to trim off this base. Also not that the surface import function does NOT create steps - it generates the triangles vertices based on the pixel values. This means for a 4x4 image that is a B&W 2x2 checkboard you end up with: 0.5 0.5 -0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 -0.5 0.5 0.5 which renders 3x3 units x by y. consisting of two tableaus at -0.5 and two tableaus at 0.5 with sloped surfaces between (which might not be what you were expecting). One of the example images shows this.

Download Model from thingiverse

With this file you will be able to print OpenSCAD surface Gimp Export Plugin with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on OpenSCAD surface Gimp Export Plugin.