;; | ---------------------------------------------------------------------------- ;; | GE_GetOffsetPts ;; | ---------------------------------------------------------------------------- ;; | Function : Returns the Offset points on either side of a line ;; | Arguments: ;; | 'pt1' - Start point of line ;; | 'pt2' - End point of line ;; | 'Dist' - Distance on either side ;; | 'Num' - Number of offset points on either side ;; | 'Collapse' - If T, first offset will collapse to half width ;; | ;; | Return : Returns the list of offset points ;; | Updated : September 24, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun GE_GetOffsetPts ( pt1 pt2 Dist Num Collapse / PtLst _Dist hDist cnt OS ) (setq PtLst '() _Dist 0.0 OS (getvar "OSMODE") ) (setvar "OSMODE" 0) (command "._Ucs" "_3Point" pt1 pt2 (polar pt1 (+ (angle pt1 pt2) #pb2) 10.0)) (setq cnt 1) (repeat Num (if (and Collapse (= cnt 1)) (setq _Dist (* 0.5 Dist) hDist _Dist ) (if Collapse (setq _Dist (+ hDist (* (1- cnt) Dist))) (setq _Dist (* cnt Dist)) ) ) (setq PtLst (append PtLst (list (trans (list 0.0 _Dist 0.0) 1 0))) cnt (1+ cnt) ) ) (setq cnt 1) (repeat Num (if (and Collapse (= cnt 1)) (setq _Dist (* 0.5 Dist) hDist _Dist ) (if Collapse (setq _Dist (+ hDist (* (1- cnt) Dist))) (setq _Dist (* cnt Dist)) ) ) (setq PtLst (append PtLst (list (trans (list 0.0 (- 0.0 _Dist) 0.0) 1 0))) cnt (1+ cnt) ) ) (command "._Ucs" "_Previous") (setvar "OSMODE" OS) PtLst )