;; | ---------------------------------------------------------------------------- ;; | GE_GetBoxFromAxis ;; | ---------------------------------------------------------------------------- ;; | Function : Finds out the bounding box points given the two axis points and ;; | the width. ;; | Argument : [p1] - First point of axis ;; | [p2] - Second point of axis ;; | [Wid] - Width of box ;; | Returns : A list containing the four bounding points of the box, starting ;; | from the lower left point ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun GE_GetBoxFromAxis ( p1 p2 Wid / ang _p1 _p2 _p3 _p4 ) (setq ang (angle p1 p2) _p1 (polar p1 (+ ang #pb2) (* 0.5 Wid)) _p2 (polar _p1 (- ang #pb2) Wid) _p3 (polar p2 (+ ang #pb2) (* 0.5 Wid)) _p4 (polar _p3 (- ang #pb2) Wid) ) (list _p1 _p2 _p4 _p3) )