;| 3Dcircle.lsp draws a 3-point circle in 3D regardless of current UCS or view by Bill Gilliss bill at realerthanreal dot com Comments and suggestions always welcome. No warranty, either expressed or implied, is made as to the fitness of this information for any particular purpose. All materials are to be considered 'as-is', and use thereof should be considered as at your own risk. ver 1.0 Jan 25 2010 - initial public release Keywords: AutoCAD AutoLISP circle 3D =========================================================================== |; (defun c:3dcircle ( / p1 p2 p3 p1w p2w p3w) (setq p1 (getpoint "Point 1:") p2 (getpoint p1 "\nPoint 2:") p3 (getpoint p2 "\nPoint 3: ") ) (if (not (equal (distance p1 p3) (+ (distance p1 p2) (distance p2 p3)))) (progn (setq p1w (trans p1 1 0) p2w (trans p2 1 0) p3w (trans p3 1 0) ) (command "._ucs" "_3point" p1 p3 p2) (command "._circle" "_3p" (trans p1w 0 1) (trans p2w 0 1) (trans p3w 0 1)) (command "._ucs" "_p") ) (progn (if (vl-load-com) (vlr-beep-reaction)) (prompt "\nError: points are co-linear.") ) ) (princ) ) (prompt "3Dcircle loaded.") (princ)