小さい歯車の形状を定義します。
//**********************************************************************************
#local Lw=20;
#local Cogwheel_s =
union {
difference {
cylinder { 0,y,Lw }
#local Ei=pi*Lw/2.6; #local Si=0; #while( Si < Ei )
sphere { 0,2 scale < 2,1,1 > translate Lw*x rotate 360*Si/Ei*y }
#local Si=Si+1; #end
cylinder { -0.01*y,(1+0.01)*y,Lw-8 }
}
#local Ei=5; #local Si=0; #while( Si < Ei )
box { < Lw/2-8/2,0,-2 >,< Lw-8/2,1,2 > rotate 360*Si/Ei*y }
#local Si=Si+1; #end
cylinder {0,y,Lw/2 }
cylinder { -1*y,2*y,Lw/2-4 }
cylinder { -5*y,6*y,Lw/2-6 }
cylinder { -10*y,11*y,Lw/2-8 }
}
//**********************************************************************************