

#macro roundbox (X1,Y1,Z1,X2,Y2,Z2,R)
merge {
cylinder { <X1+R,Y1+R,Z1+R>,<X1+R,Y1+R,Z2R>,R }
cylinder { <X1+R,Y1+R,Z1+R>,<X1+R,Y2R,Z1+R>,R }
cylinder { <X1+R,Y1+R,Z1+R>,<X2R,Y1+R,Z1+R>,R }
cylinder { <X2R,Y1+R,Z1+R>,<X2R,Y1+R,Z2R>,R }
cylinder { <X1+R,Y1+R,Z2R>,<X2R,Y1+R,Z2R>,R }
cylinder { <X2R,Y1+R,Z1+R>,<X2R,Y2R,Z1+R>,R }
cylinder { <X1+R,Y1+R,Z2R>,<X1+R,Y2R,Z2R>,R }
cylinder { <X2R,Y1+R,Z2R>,<X2R,Y2R,Z2R>,R }
cylinder { <X1+R,Y2R,Z1+R>,<X1+R,Y2R,Z2R>,R }
cylinder { <X1+R,Y2R,Z1+R>,<X2R,Y2R,Z1+R>,R }
cylinder { <X2R,Y2R,Z1+R>,<X2R,Y2R,Z2R>,R }
cylinder { <X1+R,Y2R,Z2R>,<X2R,Y2R,Z2R>,R }
sphere { <X1+R,Y1+R,Z1+R>,R }
sphere { <X1+R,Y1+R,Z2R>,R }
sphere { <X1+R,Y2R,Z1+R>,R }
sphere { <X1+R,Y2R,Z2R>,R }
sphere { <X2R,Y1+R,Z1+R>,R }
sphere { <X2R,Y1+R,Z2R>,R }
sphere { <X2R,Y2R,Z1+R>,R }
sphere { <X2R,Y2R,Z2R>,R }
box { <X1,Y1+R,Z1+R>,<X2,Y2R,Z2R> }
box { <X1+R,Y1,Z1+R>,<X2R,Y2,Z2R> }
box { <X1+R,Y1+R,Z1>,<X2R,Y2R,Z2> }
bounded_by { box { <X1,Y1,Z1>,<X2,Y2,Z2> } }
} #end
#macro roundcylinder (H,R1,R2)
merge {
cylinder { <0,0,0>,<0,H,0>,R1R2 }
cylinder { <0,R2,0>,<0,HR2,0>,R1 }
torus { R1R2,R2 translate <0,R2,0> }
torus { R1R2,R2 translate <0,HR2,0> }
bounded_by { cylinder { <0,0,0>,<0,H,0>,R1 } }
} #end
Post a reply to this message

