rem C_PtC.cdl rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem ******************************************************************** rem Circle tangent to circle with the specified radius through the point rem 1. Select Circle rem 2. Select Point to go through rem 3. Enter radius rem 4. Draw Circle rem ******************************************************************** clear defopt = 2 r1 = 1.0 array mtx[9] acc = 0.00001 :start flag = 0 getent "Select Circle",enttype on (@key + 3) goto exit, start, if (enttype!=3) goto start vnum = @intdat[8] vx0 = @fltdat[0] vy0 = @fltdat[1] vz0 = @fltdat[2] r0 = @fltdat[3] getview vnum, mtx :pos getpos "Indicate Point",defopt on (@key + 3) goto exit, start, pos, defopt=@key x1 = @xworld y1 = @yworld z1 = @zworld rem call xfmwv, mtx, x1, y1, z1, vx1, vy1, vz1 if (abs(vz0-vz1) dist) goto case1 if (r0 < dist) goto case2 rem ************ If the point is inside the circle ************ :case1 if (r1-(r0-dist)/2<-acc) goto case1_1 if (r1-(r0-dist)/2