rem L_Para.cdl rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem Parallel Line rem ******************************************************************** rem Create Parallel Line rem 1. Select Line rem 2. Select Position to draw Line rem 3. Create Parellel Line rem ******************************************************************** clear defopt = 2 :start getent "Select Line",enttype on (@key + 3) goto exit, start, start, if (enttype!=2) goto start x1 = @fltdat[0] y1 = @fltdat[1] z1 = @fltdat[2] x2 = @fltdat[3] y2 = @fltdat[4] z2 = @fltdat[5] f = x2 - x1 g = y2 - y1 h = z2 - z1 :pos getpos "Indicate Position",defopt on (@key + 3) goto exit, start, pos, defopt=@key x0 = @xworld y0 = @yworld z0 = @zworld t = (f * (x1-x0) + g * (y1-y0) + h * (z1-z0))/(f*f + g*g + h*h) x3 = x0 + f * t y3 = y0 + g * t z3 = z0 + h * t t = (f * (x2-x0) + g * (y2-y0) + h * (z2-z0))/(f*f + g*g + h*h) x4 = x0 + f * t y4 = y0 + g * t z4 = z0 + h * t line x3, y3, z3, x4, y4, z4 redraw goto start :exit