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