Fix for #1008: rect_tube(shift=)

This commit is contained in:
Revar Desmera 2022-12-16 18:23:23 -08:00
parent 1257b9b936
commit bda046636d

View file

@ -969,20 +969,21 @@ module rect_tube(
assert(isize2.y < size2.y, "Inner size is larger than outer size."); assert(isize2.y < size2.y, "Inner size is larger than outer size.");
anchor = get_anchor(anchor, center, BOT, BOT); anchor = get_anchor(anchor, center, BOT, BOT);
attachable(anchor,spin,orient, size=[each size1, h], size2=size2, shift=shift) { attachable(anchor,spin,orient, size=[each size1, h], size2=size2, shift=shift) {
diff("_H_o_L_e_") down(h/2) {
prismoid( difference() {
size1, size2, h=h, shift=shift, prismoid(
rounding=rounding, rounding1=rounding1, rounding2=rounding2, size1, size2, h=h, shift=shift,
chamfer=chamfer, chamfer1=chamfer1, chamfer2=chamfer2, rounding=rounding, rounding1=rounding1, rounding2=rounding2,
anchor=CTR chamfer=chamfer, chamfer1=chamfer1, chamfer2=chamfer2,
) { anchor=BOT
children(); );
tag("_H_o_L_e_") prismoid( down(0.01) prismoid(
isize1, isize2, h=h+0.05, shift=shift, isize1, isize2, h=h+0.02, shift=shift,
rounding=irounding, rounding1=irounding1, rounding2=irounding2, rounding=irounding, rounding1=irounding1, rounding2=irounding2,
chamfer=ichamfer, chamfer1=ichamfer1, chamfer2=ichamfer2, chamfer=ichamfer, chamfer1=ichamfer1, chamfer2=ichamfer2,
anchor=CTR anchor=BOT
); );
}
} }
children(); children();
} }