;; | ---------------------------------------------------------------------------- ;; | GE_Corners ;; | ---------------------------------------------------------------------------- ;; | Function : Rearranges the passed points 'p1' and 'p2' such that the returned ;; | points are the lower left and upper right corners. ;; | Argument : 'p1' and 'p2', two passed points ;; | Returns : A list of p1 and p2, where p1 is lower left point and p2 is upper ;; | right point. ;; | Update : March 6, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun GE_Corners(p1 p2 / tmp xmin ymin xmax ymax) (setq xmin (car p1) ymin (cadr p1) xmax (car p2) ymax (cadr p2) ) (if (> xmin xmax) (setq tmp xmax xmax xmin xmin tmp ) ) (if (> ymin ymax) (setq tmp ymax ymax ymin ymin tmp ) ) (list (list xmin ymin 0.0) (list xmax ymax 0.0)) )