;;;Place "hiding" solids over each text string. (on layer ?-NPLT?????HS). ;;;Adjust spacing using HDSPACE for numeric and HDNORM for other text. ;;; ;;; AUTHOR: HENRY C. FRANCIS ;;; 425 N. ASHE ST. ;;; SOUTHERN PINES, NC 28387 ;;; All rights reserved without prejudice. ;;; ;;; Copyright: 1-26-96 ;;; Edited: 7-26-99 ;;; (DEFUN c:hdtext (/ ss sslen count oldss delold ntz tname tent tp1 tang tbang tp2 bxp1 bxp2 bxp3 bxp4 ) (SETVAR "cmdecho" 0) (IF sp_size NIL (SETQ sp_size 0.45) ) ;_ end of IF (IF hd_size NIL (SETQ hd_size 0.45) ) ;_ end of IF (IF (/= "BYLAYER" (GETVAR "cecolor")) (SETVAR "CECOLOR" "BYLAYER") ) ;_ end of IF (IF ukword nil (LOAD "uutils") ) ;_ end of if (SETQ cr (LIST "w" "o" "r" "y" "d" "u" "e" "t" "h" "f" "a" "g" "n" "c" "i" "p" "r" "s" "j" "l" "v" "b" ) ;_ end of LIST ;_ end of LIST ;_ end of LIST ;_ end of list wrd1 (STRCAT ;Copyright (STRCASE (NTH 13 cr)) (NTH 1 cr) (NTH 15 cr) (NTH 3 cr) (NTH 2 cr) (NTH 14 cr) (NTH 11 cr) (NTH 8 cr) (NTH 7 cr) ) ;_ end of strcat wrd2 " " wrd3 (STRCAT (ITOA 1996) "-" (ITOA 2002)) wrd4 ", " wrd4b (STRCAT ;by (NTH 21 cr) (NTH 3 cr) ) ;_ end of strcat wrd5 (STRCAT ;Henry (STRCASE (NTH 8 cr)) (NTH 6 cr) (NTH 12 cr) (NTH 2 cr) (NTH 3 cr) ) ;_ end of strcat wrd6 (STRCASE (NTH 13 cr)) ;C wrd6a ". " wrd7 (STRCAT ;Francis (STRCASE (NTH 9 cr)) (NTH 2 cr) (NTH 10 cr) (NTH 12 cr) (NTH 13 cr) (NTH 14 cr) (NTH 17 cr) ) ;_ end of strcat wrd8 (STRCAT ;without (NTH 0 cr) (NTH 14 cr) (NTH 7 cr) (NTH 8 cr) (NTH 1 cr) (NTH 5 cr) (NTH 7 cr) ) ;_ end of strcat wrd9 (STRCAT ;prejudice (NTH 15 cr) (NTH 2 cr) (NTH 6 cr) (NTH 18 cr) (NTH 5 cr) (NTH 4 cr) (NTH 14 cr) (NTH 13 cr) (NTH 6 cr) ) ;_ end of strcat wrd10 (STRCAT ;All (STRCASE (NTH 10 cr)) (NTH 19 cr) (NTH 19 cr) ) ;_ end of strcat wrd11 (STRCAT ;rights (NTH 2 cr) (NTH 14 cr) (NTH 11 cr) (NTH 8 cr) (NTH 7 cr) (NTH 17 cr) ) ;_ end of strcat wrd12 (STRCAT ;reserved (NTH 2 cr) (NTH 6 cr) (NTH 17 cr) (NTH 6 cr) (NTH 2 cr) (NTH 20 cr) (NTH 6 cr) (NTH 4 cr) ) ;_ end of strcat ) ;_ end of setq (IF (NOT (EQ (STRCAT (NTH 3 cr) (NTH 6 cr) (NTH 17 cr)) "yes")) (PRINC "Copyright has been violated! ") (PROGN (SETQ curvpn (GETVAR "cvport")) (SETQ prehdtext_ss (SSGET "P")) (IF (EQ (GETVAR "tilemode") 0) (SETQ mp_space (ukword 1 "Model Paper" "Prepare to hide under text in Model or Paper space ?" (IF mp_space mp_space "Model" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq (SETQ mp_space "Model") ) ;_ end of if (SETQ one_all (ukword 1 "Select All Visible" "elect text or ll text? " (IF one_all one_all "All" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq (COND ((EQ mp_space "Model") (IF (EQ one_all "Select") (SETQ ss (SSGET '((-4 . "") (-4 . "AND>") ) ) ;_ end of ssget as_67 0 ) ;_ end of setq (SETQ ss (SSGET "x" '((-4 . "") (-4 . "AND>") ) ) ;_ end of ssget as_67 0 ) ;_ end of setq ) ;_ end of if (IF (EQ (GETVAR "tilemode") 0) (COMMAND "_.mspace") ) ;_ end of if ) ((EQ mp_space "Paper") (IF (EQ one_all "Select") (SETQ ss (SSGET '((-4 . "") ) ) ;_ end of ssget as_67 1 ) ;_ end of setq (SETQ ss (SSGET "x" '((-4 . "") ) ) ;_ end of ssget as_67 1 ) ;_ end of setq ) ;_ end of if (COMMAND "_.pspace") ) ) ;_ end of cond (SETQ oldss (SSGET "X" '((-4 . "") (0 . "3DFACE") (-4 . "and>") ) ) ;_ end of ssget ) ;_ end of setq (IF oldss (COMMAND ".erase" oldss "") ) ;_ end of if (IF (AND (OR (EQ mp_space "Model") (EQ mp_space "Paper")) ss) (PROGN (SETQ sslen (SSLENGTH ss) count 0 ntz 100000 colr "1" ) ;_ end of setq (WHILE (NOT (EQ count sslen)) (IF (= (CDR (ASSOC 71 tent)) 2) (SETQ ntz (- 0 (ABS ntz))) (SETQ ntz (ABS ntz)) ) ;_ end of if (SETQ tname (SSNAME ss count) 10a (ASSOC 10 (ENTGET tname)) 11a (ASSOC 11 (ENTGET tname)) 10b (LIST (CAR 10a) (CADR 10a) (CADDR 10a) (CADDDR 10a)) 11b (LIST (CAR 11a) (CADR 11a) (CADDR 11a) (CADDDR 11a)) tname (ENTGET tname) tname (SUBST 10b 10a tname) tname (SUBST 11b 11a tname) ) ;_ end of setq (IF (AND (ASSOC 12 tname) (ASSOC 13 tname)) (SETQ 12a (ASSOC 12 tname) 13a (ASSOC 13 tname) 12b (LIST (CAR 12a) (CADR 12a) (CADDR 12a) (CADDDR 12a)) 13b (LIST (CAR 13a) (CADR 13a) (CADDR 13a) (CADDDR 13a)) tname (SUBST 12b 12a tname) tname (SUBST 13b 13a tname) ) ;_ end of setq ) ;_ end of if (ENTMOD tname) (SETQ count (1+ count)) ) ;_ end of while (SETQ count 0) (WHILE (NOT (EQ sslen count)) (SETQ tname (SSNAME ss count) tent (ENTGET tname) tval (CDR (ASSOC 1 tent)) tbox (TEXTBOX tent) txht (CDR (ASSOC 40 tent)) tdis (- (CAR (NTH 1 tbox)) (CAR (NTH 0 tbox))) tp1 (POLAR (POLAR (CDR (ASSOC 10 tent)) (CDR (ASSOC 50 tent)) (CAR (NTH 0 tbox)) ) ;_ end of POLAR (+ (CDR (ASSOC 50 tent)) (* PI 0.5)) (CADR (NTH 0 tbox)) ) ;_ end of POLAR ) ;_ end of setq (IF (AND (NOT (WCMATCH tval (STRCAT (CHR 34) "*"))) (NOT (WCMATCH tval (STRCAT (CHR 40) "*"))) (NOT (WCMATCH tval (STRCAT (CHR 41) "*"))) (NOT (WCMATCH tval (STRCAT (CHR 46) "*"))) ) ;_ end of AND (IF (AND (OR (EQUAL (TYPE (READ tval)) 'INT) (EQUAL (TYPE (READ tval)) 'REAL) ) ;_ end of OR (NOT (WCMATCH tval "*@*")) ) ;_ end of AND (SETQ hd_sp sp_size) (SETQ hd_sp hd_size) ) ;_ end of IF (SETQ hd_sp hd_size) ) ;_ end of IF (IF (< (NTH 1 (NTH 1 tbox)) txht) (SETQ txht (NTH 1 (NTH 1 tbox))) ) ;_ end of IF (SETQ tang (CDR (ASSOC 50 tent)) tlayr (CDR (ASSOC 8 tent)) tp2 (POLAR (POLAR tp1 tang tdis) (+ tang (* PI 0.5)) (CADR (NTH 1 tbox)) ) ;_ end of POLAR ) ;_ end of setq (SETQ bxp1 (POLAR (POLAR tp1 ;Set 3DFace points for normal text (- tang (* PI 0.5)) (* txht hd_sp) ) ;_ end of POLAR (- tang PI) (* txht hd_sp) ) ;_ end of polar bxp2 (POLAR bxp1 (+ tang (* PI 0.50)) (+ (* 2.00 txht hd_sp) txht) ) ;_ end of polar bxp4 (POLAR (POLAR tp2 (+ tang (* PI 0.5)) (* txht hd_sp) ) ;_ end of polar tang (* txht hd_sp) ) ;_ end of POLAR bxp3 (POLAR bxp4 (- tang (* PI 0.50)) (+ (* 2.00 txht hd_sp) txht) ) ;_ end of polar ) ;_ end of setq (IF (= (CDR (ASSOC 71 tent)) 2) ;if its backward (mirrored in x) (SETQ ntz (- 0 (ABS ntz))) ;reverse the Z (SETQ ntz (ABS ntz)) ) ;_ end of if (SETQ bxp1 (TRANS (LIST (CAR bxp1) (CADR bxp1) ntz) 0 1) bxp2 (TRANS (LIST (CAR bxp2) (CADR bxp2) ntz) 0 1) bxp3 (TRANS (LIST (CAR bxp3) (CADR bxp3) ntz) 0 1) bxp4 (TRANS (LIST (CAR bxp4) (CADR bxp4) ntz) 0 1) ) ;_ end of setq (IF (>= 11 (STRLEN tlayr)) (SETQ modf (SUBSTR tlayr 8 4)) (SETQ modf "NOTE") ) ;_ end of if (IF (>= (STRLEN tlayr) 6) (SETQ hsvno (SUBSTR tlayr 3 4)) (SETQ hsvno "NOTE") ) ;_ end of if (SETQ tlayr (STRCAT "C-" hsvno "DNPLT" (IF (> (STRLEN tlayr) 11) (SUBSTR tlayr 12) "" ) ;_ end of if "HS" ) ;_ end of strcat ) ;_ end of setq (IF (> tdis 0) (PROGN (SETQ 3dflst (LIST (CONS 0 "3DFACE") (CONS 8 tlayr) (CONS 10 bxp1) (CONS 11 bxp2) (CONS 12 bxp4) (CONS 13 bxp3) (CONS 67 as_67) (CONS 70 15) ) ;_ end of list ) ;_ end of setq (ENTMAKE 3dflst) ) ;_ end of progn ) ;_ end of if (SETQ count (1+ count)) ) ;_ end of while (IF (OR (EQ (SUBSTR (GETVAR "clayer") 3 4) "NPLT") (EQ (SUBSTR (GETVAR "clayer") 8 4) "NPLT") ) ;_ end of or (COMMAND ".layer" "m" "TEMP" "") ) ;_ end of if ) ;_ end of progn ) ;_ end of if (SETQ hide_dims (ukword 1 "Yes No" "Hide dimension text also?" (IF hide_dims hide_dims "Yes" ) ;_ end of IF ) ;_ end of ukword ) ;_ end of SETQ (IF (EQ hide_dims "Yes") (PROGN (IF c:dims nil (LOAD "dims") ) ;_ end of if (c:dims) ) ;_ end of PROGN ) ;_ end of IF (IF (AND (= (GETVAR "tilemode") 0) (= curvpn 1)) (COMMAND "._pspace") ) ;_ end of if (PRINC wrd1) (PRINC wrd2) (PRINC wrd3) (PRINC wrd2) (PRINC wrd4b) (PRINC wrd2) (PRINC wrd5) (PRINC wrd2) (PRINC wrd6) (PRINC wrd6a) (PRINC wrd7) (PRINC wrd4) (PRINC wrd10) (PRINC wrd2) (PRINC wrd11) (PRINC wrd2) (PRINC wrd12) (PRINC wrd2) (PRINC wrd8) (PRINC wrd2) (PRINC wrd9) (PRINC wrd6a) (COMMAND ".select" prehdtext_ss "") (COMMAND) ) ;_ end of progn ) ;_ end of if (COMMAND "'RESUME") (PRINC) ) ;_ end of defun (DEFUN c:hdspace () (SETQ sp_size (ureal 1 "" "HDTEXT spacing for numeric-only text (fraction of text height, normal=0.45):" (IF sp_size sp_size 0.45 ) ;_ end of if ) ;_ end of ureal ) ;_ end of setq ) ;_ end of defun (DEFUN c:hdnorm () (SETQ hd_size (ureal 1 "" "HDTEXT spacing for all text except numeric-only text (fraction of text height, normal=0.45):" (IF hd_size hd_size 0.45 ) ;_ end of if ) ;_ end of ureal ) ;_ end of setq ) ;_ end of defun (PRINC "\nType \"HDSPACE\" to set spacing of 3DFace edges around numeric-only text." ) ;_ end of PRINC (PRINC "\nType \"HDNORM\" to change spacing of 3DFace edges around all other text. (normal=0.45)" ) ;_ end of PRINC (PRINC) ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ***Don't add text below the comment!***|;