;;;Place a "hiding" object over an elliptical area (on layer *7HIDE). ;;; ;;; AUTHOR: HENRY C. FRANCIS ;;; 425 N. ASHE ST. ;;; SOUTHERN PINES, NC 28387 ;;; All rights reserved without prejudice. ;;; Copyright: 1-26-96 ;;; Edited: 6-13-2003 ;;; (DEFUN c:hdcirc (/) (IF upoint nil (LOAD "upoint" "File UPOINT.LSP not loaded.") ) ;_ end of if (IF c:mklayr nil (LOAD "mklayr" "File MKLAYR.LSP not loaded.") ) ;_ end of if (c:svlayr) (IF dimscl nil (LOAD "dimscl" "File DIMSCL.LSP not loaded.") ) ;_ end of if (dimscl) (IF gvpno nil (LOAD "gvpno" "File GVPNO.LSP not loaded.") ) ;_ end of if (gvpno) (IF (TBLOBJNAME "block" "hdcirc") nil (PROGN (COMMAND "-insert" "hdcirc") (COMMAND) ) ;_ end of progn ) ;_ end of IF (IF (OR (EQ (GETVAR "tilemode") 1) (AND (EQ (GETVAR "tilemode") 0) (> (GETVAR "cvport") 1)) ) ;_ end of or (SETQ as_67 0) (SETQ as_67 1) ) ;_ end of if (IF mjrg nil (SETQ mjrg "C") ) ;_ end of if (SETQ llt "-" prod (IF prod prod "AREA" ) ;_ end of IF colra nil colri nil colr "1" modf "HIDE" ) ;_ end of setq (PRINC "\nSelect Object(s) NOT to hide under this circle: ") (PRINC) (SETQ nottohide_ss (SSGET)) (SETQ circ_ss (SSADD)) (SETQ circ_edata nil) (IF (SSADD (CAR (ENTSEL "\nSelect circle, arc or ellipse for hidden area" ) ;_ end of ENTSEL ) ;_ end of CAR circ_ss ) ;_ end of ssadd (SETQ circ_edata (ENTGET (SSNAME circ_ss 0))) ) ;_ end of IF (IF (AND circ_edata (OR (EQ (CDR (ASSOC 0 circ_edata)) "CIRCLE") (EQ (CDR (ASSOC 0 circ_edata)) "ARC") (EQ (CDR (ASSOC 0 circ_edata)) "ELLIPSE") ) ;_ end of OR ) ;_ end of AND (PROGN (IF (ASSOC 11 circ_edata) (SETQ circ_center (CDR (ASSOC 10 circ_edata)) circ_angle (COND ((EQUAL (CADDR (ASSOC 11 circ_edata)) 0 0.00001) 0) ((EQUAL (CADR (ASSOC 11 circ_edata)) 0 0.00001) (* PI 0.5)) (T (ATAN (/ (CADDR (ASSOC 11 circ_edata)) (CADR (ASSOC 11 circ_edata)) ) ;_ end of / )) ) circ_x_scale (* (DISTANCE (CDR (ASSOC 10 circ_edata)) (POLAR (POLAR (CDR (ASSOC 10 circ_edata)) 0 (CADR (ASSOC 11 circ_edata)) ) ;_ end of POLAR (* PI 0.5) (CADDR (ASSOC 11 circ_edata)) ) ;_ end of POLAR ) ;_ end of DISTANCE 2.0 ) ;_ end of DISTANCE circ_y_scale (* (CDR (ASSOC 40 circ_edata)) circ_x_scale) ) ;_ end of setq (SETQ circ_center (CDR (ASSOC 10 circ_edata)) circ_angle 0 circ_x_scale (* (CDR (ASSOC 40 circ_edata)) 2.0) circ_y_scale circ_x_scale ) ;_ end of SETQ ) ;_ end of IF (c:mklayr) (SETQ hdcirclst (LIST (CONS 0 "INSERT") (CONS 2 "HDCIRC") (CONS 10 circ_center) (CONS 41 circ_x_scale) (CONS 42 circ_y_scale) (CONS 43 circ_x_scale) (CONS 50 circ_angle) (CONS 67 as_67) ;;; (CONS 70 1);enable this to MINSERT block ;;; (CONS 71 1);enable this to MINSERT block ) ;_ end of LIST ) ;_ end of SETQ (IF (ENTMAKE hdcirclst) (PROGN ;;; (ENTDEL (SSNAME circ_ss 0)) (COMMAND "draworder" (ENTLAST) "" "f") (COMMAND "draworder" nottohide_ss "" "f") (COMMAND ".move" nottohide_ss "" "0,0,0" "") (COMMAND ".layer" "off" "*NPLT*" "") ) ;_ end of PROGN ) ;_ end of IF ;;;Setq debugpts T to enable placement of text at the points "bxp#" (IF debugpts (IF pttxt nil (LOAD "pttxt" "\nFile PTXT.LSP not loaded!") ) ;_ end of IF ) ;_ end of if (IF (AND debugpts pttxt) (PROGN (IF fthk nil (SETQ fthk 5.0) ) ;_ end of IF (pttxt "HDBOX_" "bxp" 1 5) ) ;_ end of PROGN ) ;_ end of if ) ;_ end of PROGN (PROGN (PRINC "\nA circle or ellipse was not selected! ") ) ;_ end of PROGN ) ;_ end of IF ;;;Use the above to graphically identify and debug the defined points. (c:rslayr) (PRINC) ) ;_ end of defun ;;;*************************************************************************** ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 1 0 T T nil T) ;*** DO NOT add text below the comment! ***|;