Using the attach( TOP, BOTTOM ) command, how can I attach the bottom of
two different objects to the top of the single parent object?
Say I have a 4" x 4" x .5" parent plate and I want to attach a 1" x 1" x
.5" child block and a 1" dia x .5" child cylinder next to each other on top
of the parent plate. What would the code structure be like?
Off the top of my head, it’d look something like:
include <BOSL2/std.scad>
cube([4,4,0.5]INCH, center=true) {
attach(TOP,BOT) {
xdistribute(1INCH) {
cube([1,1,0.5]INCH);
cyl(d=1INCH, h=0.5*INCH);
}
}
}
On Mar 27, 2022, at 11:30 AM, Joe Weinpert joe.weinpert@gmail.com wrote:
Using the attach( TOP, BOTTOM ) command, how can I attach the bottom of two different objects to the top of the single parent object?
Say I have a 4" x 4" x .5" parent plate and I want to attach a 1" x 1" x .5" child block and a 1" dia x .5" child cylinder next to each other on top of the parent plate. What would the code structure be like?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Well, you may be right in having to use a distribution style command to
wrap different child object bottoms to a single parent's top.
I tried with an attach() command for each child object, but then the 2nd
child object was considered the parent of the third child object ... like
stacking boxes.
On Sun, Mar 27, 2022 at 6:48 PM Revar Desmera revarbat@gmail.com wrote:
Off the top of my head, it’d look something like:
include <BOSL2/std.scad>
cube([4,4,0.5]INCH, center=true) {
attach(TOP,BOT) {
xdistribute(1INCH) {
cube([1,1,0.5]INCH);
cyl(d=1INCH, h=0.5*INCH);
}
}
}
On Mar 27, 2022, at 11:30 AM, Joe Weinpert joe.weinpert@gmail.com wrote:
Using the attach( TOP, BOTTOM ) command, how can I attach the bottom of
two different objects to the top of the single parent object?
Say I have a 4" x 4" x .5" parent plate and I want to attach a 1" x 1" x
.5" child block and a 1" dia x .5" child cylinder next to each other on top
of the parent plate. What would the code structure be like?
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org