;; | ---------------------------------------------------------------------------- ;; | GE_PtOutsideAllPoly ;; | ---------------------------------------------------------------------------- ;; | Function : Detects if a point falls outside each of a set of closed polygons ;; | Argument : 'pt' - point ot be tested ;; | 'PolyLst' - A nested list of list of points forming the polgon ;; | Return : T if 'pt' is outside all the polygons, nil if 'pt' falls inside ;; | atleast on polygon. ;; | Comments : If 'pt' falls exactly on the edge of the bounding polygon, it is ;; | considered to lie INSIDE the polygon. In other words, the points ;; | must be completely OUTSIDE the polygons to be considered so. ;; | Updated : January 8, 2000 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun GE_PtOutsideAllPoly (pt PolyLst / Outside More cnt vlist ) (setq Outside nil More T cnt 0 ) (while More (setq vlist (nth cnt PolyLst)) (if vlist (progn (if (GE_PtInPoly pt vlist T) (setq More nil) (setq cnt (1+ cnt)) ) ) (setq Outside T More nil )) ) Outside )