rem ANG_LNPL.CDL rem Copy Right by International Technology Transfer Corp. rem revision 1.0-7/30/99 rem Angle between Line and Plane rem 1. Select Line and Plane rem 2. Angle between Line and Plane clear dspflg = 1 :start getent "Select Line", enttype on (@key + 3) goto exit, start, if (enttype!=2) goto start x0 = @fltdat[0] y0 = @fltdat[1] z0 = @fltdat[2] f = @fltdat[3] - @fltdat[0] g = @fltdat[4] - @fltdat[1] h = @fltdat[5] - @fltdat[2] getplane "Select Plane", dspflg on (@key + 3) goto exit, start, , a = @fltdat[10] b = @fltdat[11] c = @fltdat[12] len1sq = a * a + b * b + c * c len2sq = f * f + g * g + h * h naiseki = a * f + b * g + c * h gamma = acos( naiseki / sqrt(len1sq * len2sq)) theta = abs(90 - gamma) pause "Angle between Line and Plane = %.3fiRiturn keyj",theta redraw goto start :exit