;; | ---------------------------------------------------------------------------- ;; | GE_GetDefDist ;; | ---------------------------------------------------------------------------- ;; | Function : Get the deflection distance between three points ;; | Arguments: ;; | 'FirstPt' - First point to be checked ;; | 'SecondPt' - Second point to be checked ;; | 'ThirdPt' - Third point to be checked ;; | ;; | Return : The deflection distance between the three points ;; | Comments : The first and last points of the list will never be weeded ;; | Author : Rakesh Rao, (C) 2008, Copyrights Four Dimension Technologies, ;; | Bangalore ;; | Updated : July 2, 2008 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ;; | ---------------------------------------------------------------------------- (defun GE_GetDefDist ( FirstPt SecondPt ThirdPt / _FirstPt _SecondPt d Y pt ) (setq Y nil _FirstPt (MI_Point2d FirstPt) _SecondPt (MI_Point2d SecondPt) d (distance _FirstPt _SecondPt) ) (if (> d 0.0) (progn (MI_3PUCS _FirstPt _SecondPt nil) (setq pt (trans ThirdPt 0 1) Y (abs (cadr pt)) ) (command "._Ucs" "_Previous") )) Y )