|
![](/i/fill.gif) |
> Here is proposition of ...
IC_Cylinder_Hole which in fact is shape of intersection of two cylinders
along one axis. Note that this macro has proper inside/outside behaviour and
is compatible with "sharp/rounded" strategy becouse internally use IC_Box.
#macro IC_Cylinder_Hole (Start, End, Radius, Hole)
#local Cx=Start.x;
#local Cy=Start.y;
#local Cz=Start.z;
#local Len=vlength(End-Start);
#if (Len=0)
#error "iso_csg.inc: Error: zero height cylinder"
#end
#local fn_T = function { Reorient_Trans( End-Start , x) }
#local fn_X = IC_Box( <0,Hole,-2*max(Len,Radius,Hole)> ,
<Len,Radius,2*max(Len,Radius,Hole)> );
#local fn_Y = function(x, y, z){
fn_X( fn_T(x, y, z).x , f_r( 0 , fn_T(x, y, z).y , fn_T(x, y, z).z ) , 0 )
}
function(x, y, z){
fn_Y( x - Cx , y - Cy , z - Cz )
}
#end
ABX
Post a reply to this message
|
![](/i/fill.gif) |