discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] combine a union child and a difference child in one object.

DE
David Eccles (gringer)
Wed, Dec 2, 2015 9:15 AM

Did you just want to combine them into a single module so that only one
command was needed elsewhere?


$fn=16;

module thingy(){
difference()
{
cube([5,5,5], center=true);
#cylinder(d=1.5, h=12, center=true); // part A
}

cylinder(d=1, h=15, center=true); // part B

}

for(r = [0:60:360]){
rotate([0,0,r]) translate([20,0,0]) thingy();
}

Did you just want to combine them into a single module so that only one command was needed elsewhere? --- $fn=16; module thingy(){ difference() { cube([5,5,5], center=true); #cylinder(d=1.5, h=12, center=true); // part A } cylinder(d=1, h=15, center=true); // part B } for(r = [0:60:360]){ rotate([0,0,r]) translate([20,0,0]) thingy(); }