Why my small cuboids are not perfectly aligned with the big one?

include <BOSL2/constants.scad>
include <BOSL2/std.scad>
use <BOSL2/shapes.scad>

cuboid([1, 0.5, 0.2], anchor=BOTTOM){
    attach(RIGHT) cuboid([0.2, 0.4, 0.1], anchor=TOP, $tags="remove");
    attach(LEFT) cuboid([0.2, 0.4, 0.1], anchor=TOP, $tags="remove");

enter image description here


from Revar Desmera:

The attach() module by default overlaps the attached with the parent by a slight amount (0.01). You can do attach(RIGHT,overlap=0) for an exact alignment. The overlap is so that CGAL correctly can union shapes.

and the attach() documentation :

Attached objects will be overlapped into the parent object by a little bit, as specified by the default $overlap value (0.01 by default), or by the overriding overlap= argument. This is to prevent OpenSCAD from making non-manifold objects. You can also define $overlap= as an argument in a parent module to set the default for all attachments to it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.