;; | ---------------------------------------------------------------------------- ;; | MI_3PUcs ;; | ---------------------------------------------------------------------------- ;; | Function : Create a new User coordinate system using the 3 Point option ;; | Argument : ;; | 'pt1' - First point (origin) of the UCS ;; | 'pt2' - Second point (on X-axis) of the UCS ;; | 'pt3' - Third point (defining XY plane) of the UCS ;; | If 'pt3' is nil, the third point will be assumed along the ;; | X axis starting from the first point as the origin ;; | Action : Create a new 3 Point UCS if the distance between the points ;; | are non-zero ;; | Updated : July 19, 1999 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_3PUcs( pt1 pt2 pt3 / Done OS ) (setq Done nil OS (getvar "OSMODE") ) (setvar "OSMODE" 0) (if (not pt3) (setq pt3 (polar pt1 (+ (angle pt1 pt2) #pb2) 10.0)) ) (if (and (> (distance pt1 pt2) 0.001) (> (distance pt1 pt3) 0.001) (> (distance pt2 pt3) 0.001) ) (progn (command "._Ucs" "_3Point" pt1 pt2 pt3) (setq Done T) ) ) (setvar "OSMODE" OS) Done )