[OpenSCAD] aligning/flooring all objects

lar3ry lar3ry at sasktel.net
Thu Jul 11 14:00:11 EDT 2019

bboett wrote
> somehow, i managed to put a gap around 1.5mm into my drawings....
> so when i try to print them, one is fine, and the other is printed into
> thin
> air.....
> now i could tell  the slicer to put in some raft, but thats unelegant....
> so is there a way, when i use a module from another file, to tell it to
> floor it on (0,0,0)? 
> or is there a way to tell exactly what the gap is, to be able to make a
> translation?

Repetier Host will lay it flat for you. Earier versions required the use of
the "Lay Flat" icon in the Object Placement tab, but in trying it just now,
a test cube, translated to 10,10,10 actually does drop to the bed when
loaded. Then, you can move it to the origin (0,0) of your bed, and export it 
(Export icon, box with exiting arrow).   My Repetier Host is V2.1.3

But a better way to import STL files and position them is to use a rather
nifty little python script written by Jamie Bainbridge, called stldim.py,
modified by me.. His original script can be found at:


I have modified it to produce a OpenSCAD translate() statements to position
any imported STL (or any other object, for that matter) in any one of the
four quadrants, or the center of X,Y, and Z.

for my modified script and instructions for use.

I see that many folks have asked for a way to find and use a bounding box in
OpenSCAD, and I wonder if it will ever be implemented. It would be very
handy, and its use could be implemented as just information in the console,
or used directly in something that might be called "absolute_translate().

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list