- 积分
- 2444
- 明经币
- 个
- 注册时间
- 2005-11-24
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2011-4-10 08:11:01
|
显示全部楼层
好的。我把全部都传上来;我也是搞冲压模具的!
(defun C:bwz (/ os txt cla no len0 LEN ss nam ent w1 w2 ent1 ent2 rad1 rad2 rad3 cen1 cen2
true1 STR dist ss1 ss2 sscen1 num textnum dist1 dist3 ptb ptb1 ptb2 ptb3 pto
RAD1 RAD2 df_text SS3 SS4 SS5 ss0 LEN3 LEN4 LEN5 TRUE SSCEN LTY1 LTY2 COL1
DIST12 DIST13 DIST23 cen_sel STR cen_ss_reat ss_ins cen_no_list ss_no_list
nam_no_list ss_no_select str_no_list str_ent2 cen3 bsw COL2 stringth_list
insert_3add insert insert_wl_length wl_length deepth_ref)
(setq cdat (atoi (rtos (getvar "cdate"))))
(setq textheight1 2.0)
(if (> cdat 20000430)
(progn
(COMMAND "UCS" "")
(SETVAR "CMDECHO" 0)
(setvar "dimzin" 8)
(if (not (tblsearch "style" "iso-25"))
(command "style" "iso-25" "gbcbig" "" "0.7" "" "" "" "")
(setvar "textstyle" "iso-25")
)
;(prompt "\n Thank you!
; \n Thank you!
; \n Thank you!
; \n Thank you!")
(setq txt (getvar "DIMTXT")
view_ctr (getvar "viewctr")
view_width (/ (getvar "viewsize") 2)
)
(setq stringth_list (list "A" "B" "C" "D" "E" "F" "G" "H" "J" "K" "L" "M"
"N" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
"A1" "B1" "C1" "D1" "E1" "F1" "G1" "H1" "J1"
"K1" "L1" "M1" "N1" "P1" "Q1" "R1" "S1" "T1"
"U1" "V1" "W1" "X1" "Y1" "Z1" "A2" "B2" "C2"
"D2" "E2" "F2" "G2" "H2" "J2"
"K2" "L2" "M2" "N2" "P2" "Q2" "R2" "S2" "T2"
"U2" "V2" "W2" "X2" "Y2")
stringth_no -1
)
(setq aute_point1 (getpoint "\n ÇëÑ¡Ôñ¿òÑ¡µÄÒ»µã"))
(if (null aute_point1)
(setq aute_point1 (polar view_ctr 3.66 (/ view_width 0.48)))
)
(setq aute_point2 (getcorner aute_point1 "\n ÇëÑ¡Ôñ¿òÑ¡µÄÁíÒ»µã"))
(if (null aute_point2)
(setq aute_point2 (polar view_ctr 0.52 (/ view_width 0.48)))
)
(setq pto (getpoint "\n ÇëÑ¡Ôñ±ê×¢ÄÚÈݵÄλÖÃÆðʼµã"))
;;;;;;
;;;;;;
(SETQ SS_all (SSGET "c" aute_point1 aute_point2 (list (cons -4 "<or")(cons -4 "<and")
(cons 0 "CIRCLE")(cons -4 "/=")(cons 40 0.15)(cons -4 "and>")
(cons -4 "<and")(cons 0 "ARC")(cons -4 ">")(cons 40 3)(cons -4 "<")
(cons 40 15)(cons -4 "and>")(cons -4 "or>")))
)
(if (not (null SS_all))
(progn
(setq no -1
cen_all (list)
)
(repeat (sslength SS_all)
(setq no (1+ no)
cen_ss (cdr (assoc 10 (entget (ssname SS_all no))))
)
(if (null (member cen_ss cen_all))
(setq cen_all (cons cen_ss cen_all))
)
)
(setq no_cen_all -1
cen_sel (list)
)
(repeat (length cen_all)
(setq no_cen_all (1+ no_cen_all)
cen_ss_reat (nth no_cen_all cen_all)
ss_start (SSGET "c" aute_point1 aute_point2 (list (cons -4 "<or")
(cons 0 "CIRCLE")(cons 0 "ARC")(cons -4 "or>")(cons 10 cen_ss_reat)))
)
;;;;;
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq ss (ssadd))
(SETQ NO -1
ay 0
)
(repeat (sslength ss_start)
(SETQ no (1+ no))
(setq nam1 (SSNAME ss_start NO))
(setq ww (ENTGET nam1))
(setq ptc (cdr (assoc 40 ww)))
(setq ptc_point (cdr (assoc 10 ww)))
(if (> ptc ay)
(setq ay ptc
ptc_pot ptc_point)
)
)
(setq pot_left (polar ptc_pot 2.4 (* 1.5 ay))
pot_right (polar ptc_pot 5.5 (* 1.5 ay))
ss0 (SSGET "C" pot_left pot_right (LIST (CONS -4 "<or")(CONS 0 "CIRCLE")
(CONS 0 "ARC")(CONS -4 "or>")))
)
;;;;;
(while (> (sslength ss0) 0)
(SETQ NO -1
ay 0
)
(repeat (sslength ss0)
(SETQ no (1+ no))
(setq nam1 (SSNAME ss0 NO))
(setq ww (ENTGET nam1))
(setq ptc (cdr (assoc 40 ww)))
(if (> ptc ay)
(setq ay ptc
nam nam1)
)
)
(setq ss0 (ssdel nam ss0))
(setq ss (ssadd nam ss))
)
(IF (= 2 (SSLENGTH SS))
(PROGN
(setq W1 (entget (ssname ss 0))
W2 (entget (ssname ss 1))
ent1 (cdr (assoc 0 W1))
ent2 (cdr (assoc 0 W2))
ent3 nil
COL1 (cdr (assoc 62 W1))
COL2 (cdr (assoc 62 W2))
LTY1 (cdr (assoc 6 W1))
LTY2 (cdr (assoc 6 W2))
cla1 (cdr (assoc 8 W1))
cla2 (cdr (assoc 8 W2))
RAD1 (CDR (ASSOC 40 W1))
RAD2 (CDR (ASSOC 40 W2))
CEN1 (trans (CDR (ASSOC 10 W1)) 0 1)
CEN2 (trans (CDR (ASSOC 10 W2)) 0 1)
DIST (DISTANCE CEN1 CEN2)
)
(IF (NULL LTY1) (SETQ LTY1 "BYLAYER"))
(IF (NULL LTY2) (SETQ LTY2 "BYLAYER"))
(IF (NULL COL1) (SETQ COL1 256))
(IF (NULL COL2) (SETQ COL2 256))
(setq ss_nam_list (entget (ssname ss 0) (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth (rtos (cdr insert_number_long)))
(setq deepth "*")
)
)
)
(IF (= 1 (SSLENGTH SS))
(PROGN
(setq W1 (entget (ssname ss 0))
col1 (cdr (assoc 62 W1))
ent1 (cdr (assoc 0 W1))
ent2 NIL
ent3 NIL
cla1 (cdr (assoc 8 W1))
RAD1 (CDR (ASSOC 40 W1))
LTY1 (CDR (ASSOC 6 W1))
CEN1 (trans (CDR (ASSOC 10 W1)) 0 1)
)
(IF (NULL LTY1) (SETQ LTY1 "BYLAYER"))
(IF (NULL COL1) (SETQ COL1 256))
(setq ss_nam_list (entget (ssname ss 0) (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth (rtos (cdr insert_number_long)))
(setq deepth "*")
)
)
)
(IF (= 3 (SSLENGTH SS))
(PROGN
(setq W1 (entget (ssname ss 0))
W2 (entget (ssname ss 1))
W3 (entget (ssname ss 2))
ent1 (cdr (assoc 0 W1))
ent2 (cdr (assoc 0 W2))
ent3 (cdr (assoc 0 W3))
COL1 (cdr (assoc 62 W1))
COL2 (cdr (assoc 62 W2))
COL3 (cdr (assoc 62 W3))
LTY1 (cdr (assoc 6 W1))
LTY2 (cdr (assoc 6 W2))
LTY3 (cdr (assoc 6 W3))
cla1 (cdr (assoc 8 W1))
cla2 (cdr (assoc 8 W2))
cla3 (cdr (assoc 8 W3))
RAD1 (CDR (ASSOC 40 W1))
RAD2 (CDR (ASSOC 40 W2))
RAD3 (CDR (ASSOC 40 W3))
CEN1 (trans (CDR (ASSOC 10 W1)) 0 1)
CEN2 (trans (CDR (ASSOC 10 W2)) 0 1)
CEN3 (trans (CDR (ASSOC 10 W3)) 0 1)
DIST12 (DISTOF (RTOS (DISTANCE CEN1 CEN2) 2 3))
DIST13 (DISTOF (RTOS (DISTANCE CEN1 CEN3) 2 3))
DIST23 (DISTOF (RTOS (DISTANCE CEN2 CEN3) 2 3))
)
(IF (NULL LTY1) (SETQ LTY1 "BYLAYER"))
(IF (NULL LTY2) (SETQ LTY2 "BYLAYER"))
(IF (NULL LTY3) (SETQ LTY3 "BYLAYER"))
(IF (NULL COL1) (SETQ COL1 256))
(IF (NULL COL2) (SETQ COL2 256))
(IF (NULL COL3) (SETQ COL3 256))
(setq ss_nam_list (entget (ssname ss 0) (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth (rtos (cdr insert_number_long)))
(setq deepth "*")
)
;;;;
(setq ss_nam_list (entget (ssname ss 1) (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth1 (rtos (cdr insert_number_long)))
(setq deepth1 "*")
)
)
)
(IF (< 3 (SSLENGTH SS)) (setq ent1 nil))
;;;;;;;########
;;;;;;;########
(if (and (null (member CEN1 cen_sel)) (/= nil ent1))
(progn
(IF (AND (= ent1 "CIRCLE") (= ent2 "CIRCLE") (= ent3 NIL) (= 0 DIST))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE")(CONS 8 cla1) (CONS 6 LTY1) (CONS 62 COL1)))
MI_text rad2
BIG_text rad1
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
SS2 (SSGET "C" aute_point1 aute_point2 (list(CONS 0 "CIRCLE")
(cons 10 CEN1)(CONS 40 rad2)(CONS 8 cla2)
(CONS 6 LTY2) (CONS 62 COL2)))
SS3 (SSGET "C" aute_point1 aute_point2 (LIST(cons 0 "CIRCLE")
(cons 10 CEN1)(CONS -4 "/=")(CONS 40 rad1)
(CONS -4 "/=")(CONS 40 rad2)))
)
(setq ss_nam_list (entget nam1 (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth_ref (rtos (cdr insert_number_long)))
(setq deepth_ref "*")
)
(IF (and (not(null ss2))(null ss3)(null(member CEN1 SSCEN1))
(= (read deepth_ref) (read deepth)))
(progn(setq radd rad2)(if(> rad1 rad2)(setq radd rad1))(chtext_point radd))
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2)"(×êͨ,%%C" (RTOS (* 2 rad1) 2 2)
"±³Ãæ³Á¿×£¬Éî¶È"DEEPTH ")"))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2) " (×êͨ£¬%%C" (RTOS (* 2 rad1) 2 2)
"ÕýÃæ³Á¿×£¬Éî¶È"DEEPTH ")"))
)
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
);;(not (null ss1))
)
);;ent="circle"
)
;;;;;
(IF (AND (= ent1 "ARC") (= ent2 "CIRCLE") (= ent3 NIL) (= 0 DIST))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "ARC") (CONS 8 CLA1) (CONS 6 LTY1) (CONS 62 COL1)))
MI_text rad2
BIG_text rad1
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq NO -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
SS2 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad2)
(cons 10 CEN1)(CONS 0 "CIRCLE")
(CONS 8 CLA2) (CONS 6 LTY2) (CONS 62 COL2)))
)
(IF (and (not (null ss2)) (null (member CEN1 SSCEN1)))
(progn(setq radd rad2)(if(> rad1 rad2)(setq radd rad1))(chtext_point radd))
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(COND ((and (<= 9.8 (* 2 rad1) 10.2) (<= 8.3 (* 2 rad2) 8.7))
(SETQ BSW "M10 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
((and (<= 7.8 (* 2 rad1) 8.2) (<= 6.6 (* 2 rad2) 7.0))
(SETQ BSW "M8 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
((and (<= 5.8 (* 2 rad1) 6.2) (<= 4.8 (* 2 rad2) 5.2))
(SETQ BSW "M6 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
((and (<= 4.8 (* 2 rad1) 5.2) (<= 4.0 (* 2 rad2) 4.4))
(SETQ BSW "M5 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
((and (<= 11.8 (* 2 rad1) 12.2) (<= 10.2 (* 2 rad2) 10.7))
(SETQ BSW "M12 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
((and (<= 15.8 (* 2 rad1) 16.2) (<= 13.7 (* 2 rad2) 14.3))
(SETQ BSW "M16 ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"))
(T (SETQ BSW "·Ç±ê×¼ÂÝË¿"))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-" BSW))
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
)
)
)
)
;;;;;;;***
(IF (AND (= ent1 "ARC") (= ent2 "ARC") (= ent3 NIL)(/= rad1 rad2)(/= 0 DIST))
(PROGN
(SETQ ANGS1 (CDR (ASSOC 50 W1))
ANGE1 (CDR (ASSOC 51 W1))
ANGS2 (CDR (ASSOC 50 W2))
ANGE2 (CDR (ASSOC 51 W2))
POTS1 (POLAR CEN1 ANGS1 RAD1)
POTE1 (POLAR CEN1 ANGE1 RAD1)
POTS2 (POLAR CEN2 ANGS2 RAD2)
POTE2 (POLAR CEN2 ANGE2 RAD2)
MI_text rad1
BIG_text rad1
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "ARC") (CONS 8 CLA1) (CONS 6 LTY1) (CONS 62 COL1)))
SS2 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad2)
(CONS 0 "ARC") (CONS 8 CLA2) (CONS 6 LTY2) (CONS 62 COL2)))
)
(if (and (not (null ss1))(not (null ss2)))
(progn
(setq NO -1
LEN1 (SSLENGTH SS1)
LEN2 (SSLENGTH SS2)
SSCEN2 (LIST)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
SSCEN2 (CONS CEN1 SSCEN2)
)
)
(SETQ NO -1)
(REPEAT LEN2
(setq no (1+ no)
nam2 (ssname ss2 no)
W2 (entget nam2)
CEN2 (cdr (assoc 10 W2))
NUM -1
)
(REPEAT LEN1
(setq NUM (1+ NUM)
CEN1 (NTH NUM SSCEN2)
DIST1 (distance CEN1 CEN2)
SS3 (SSGET "C" aute_point1 aute_point2
(LIST(cons -4"<or")(cons 0 "ARC")
(cons 0 "CIRCLE")(cons -4"or>")
(cons 10 CEN1)(CONS -4 "/=")(CONS 40 rad1)))
)
(IF (and (= DIST DIST1)(null ss3)(null (member CEN1 SSCEN1)))
(chtext_point)
)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(cond ((AND (OR (<= 0 (distance POTS1 POTS2) 0.2) (<= 0 (distance POTS1 POTE2) 0.2))
(OR (<= 0 (distance POTE1 POTS2) 0.2) (<= 0 (distance POTE1 POTE2) 0.2))
(<= 1.5 (* 2 rad2) 3))(SETQ BSW (STRCAT (RTOS (* 2 rad1) 2 2) " µ¼Öù")))
(T (SETQ BSW (STRCAT (RTOS (* 2 rad1) 2 2) " ·Ç±ê×¼µ¼Öù")))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C" BSW))
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO txt "" STR)
)
)
)
)
;;;;;
(IF (AND (= ent1 "CIRCLE") (= ent2 "ARC") (= ent3 NIL) (= 0 DIST))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE") (CONS 8 CLA1) (CONS 6 LTY1) (CONS 62 COL1)))
MI_text 1
BIG_text rad1
ent2_ang50 (cdr (assoc 50 W2))
ent2_ang51 (cdr (assoc 51 W2))
ent2_po50 (polar CEN2 ent2_ang50 rad2)
ent2_po51 (polar CEN2 ent2_ang51 rad2)
ent2_dist (DISTOF (RTOS (distance ent2_po50 ent2_po51) 2 3))
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(IF (< ent2_ang51 ent2_ang50)
(setq ent2_ang51 (+ (* 2 pi) ent2_ang51))
)
(setq ent2_angl (distof (rtos (- ent2_ang51 ent2_ang50)2 3)))
(if (> ent2_angl (* 2 pi))
(setq angl_center (- pi (/ ent2_angl 2))
dist_center (+ rad2 (* rad2 (cos angl_center)))
)
(setq angl_center (/ ent2_angl 2)
dist_center (- rad2 (* rad2 (cos angl_center)))
)
)
(if (not (null ss1))
(progn
(setq NO -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
ss3_ful nil
pot_left (polar CEN1 2.4 (* 1.4 RAD1))
pot_right (polar CEN1 5.5 (* 1.4 RAD1))
SS2 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad2)
(cons 10 CEN1)(CONS 0 "ARC")
(CONS 8 CLA2) (CONS 6 LTY2) (CONS 62 COL2)))
SS3 (SSGET "C" pot_left pot_right (LIST (CONS -4 "<or")
(CONS 0 "CIRCLE")(CONS 0 "ARC")
(CONS -4 "or>")(CONS -4 "/=") (CONS 40 RAD1)
(CONS -4 "/=") (CONS 40 RAD2)))
)
(setq ss_nam_list (entget nam1 (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth_ref (rtos (cdr insert_number_long)))
(setq deepth_ref "*")
)
(if (not (null ss2))
(progn
(setq ss3no -1)
(repeat (sslength ss2)
(setq ss3no (1+ ss3no))
(setq ss3name (entget (ssname ss2 ss3no))
ss3start (cdr (assoc 50 ss3name))
ss3end (cdr (assoc 51 ss3name))
)
(if (< ss3end ss3start)
(setq ss3end (+ ss3end (* 2 pi))))
(setq ss3_angle (distof
(rtos (- ss3end ss3start) 2 3)))
(if (/= ss3_angle ent2_angl)
(setq ss3_ful (cons 3 ss3_ful))
)
)
)
)
(IF (and (not (null ss2))(null ss3)(null ss3_ful)
(null (member CEN1 SSCEN1))
(= (read deepth_ref) (read deepth)))
(progn(setq radd rad2)(if(> rad1 rad2)(setq radd rad1))(chtext_point radd))
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2)"X" (RTOS dist_center 2 2)
" (%%C" (RTOS (* 2 rad1) 2 2)
" ±³Ãæ³Á¿×£¬Éî¶È"DEEPTH ")"))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2) "X" (RTOS dist_center 2 2)
" (%%C" (RTOS (* 2 rad1) 2 2)
" ÕýÃæ³Á¿×£¬Éî¶È"DEEPTH ")"))
)
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
)
)
)
)
;;;;;;;***
(IF (AND (= ent1 "CIRCLE") (= ent2 NIL)(= ent3 NIL))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 RAD1)
(CONS 0 "CIRCLE") (CONS 8 CLA1) (CONS 6 LTY1) (CONS 62 col1)))
MI_text RAD1
BIG_text RAD1
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
;CEN1x (DISTOF (RTOS (CAR CEN1) 2 3))
;CEN1y (DISTOF (RTOS (CADR CEN1) 2 3))
;CEN1z (DISTOF (RTOS (CADDR CEN1) 2 3))
;CEN1 (LIST CEN1x CEN1y CEN1z)
ss3_ful nil
pot_left (polar CEN1 2.4 (* 1.4 RAD1))
pot_right (polar CEN1 5.5 (* 1.4 RAD1))
SS2 (SSGET "C" aute_point1 aute_point2
(LIST (CONS 0 "CIRCLE") (CONS 10 CEN1)
(CONS -4 "/=") (CONS 40 RAD1)))
SS3 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 0 "ARC")
(CONS 10 CEN1) (CONS -4 ">") (CONS 40 RAD1)))
SS4 (SSGET "C" pot_left pot_right (LIST (CONS 0 "ARC")
(CONS -4 "/=") (CONS 40 RAD1)))
)
(setq ss_nam_list (entget nam1 (list "wl_length"))
insert_number_long (cadadr (assoc -3 ss_nam_list))
)
(if (not (null insert_number_long))
(setq deepth_ref (rtos (cdr insert_number_long)))
(setq deepth_ref "*")
)
(if (not (null ss3))
(progn
(setq ss3no -1)
(repeat (sslength ss3)
(setq ss3no (1+ ss3no))
(setq ss3name (entget (ssname ss3 ss3no))
ss3start (cdr (assoc 50 ss3name))
ss3end (cdr (assoc 51 ss3name))
)
(if (< ss3end ss3start)
(setq ss3end (+ ss3end (* 2 pi))))
(if (> 4.75 (- ss3end ss3start) 4.68)
(setq ss3_ful (cons 3 ss3_ful))
)
)
)
)
(IF (and (null ss2)(null ss4)(null ss3_ful)
(null (member CEN1 SSCEN1))
(= (read deepth_ref) (read deepth)))
(chtext_point rad1)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(COND ((equal 0.00002 (- (ATOF (RTOS (* 2 RAD1) 2 5))
(ATOF (RTOS (* 2 RAD1) 2 3)))0.000001)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 0) " ¹Ì¶¨Ïú")))
((equal 0.00004 (- (ATOF (RTOS (* 2 RAD1) 2 5))
(ATOF (RTOS (* 2 RAD1) 2 3)))0.000001)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 0) " ¸¡ÉýÏú")))
((equal 0.00006 (- (ATOF (RTOS (* 2 RAD1) 2 5))
(ATOF (RTOS (* 2 RAD1) 2 3)))0.000001)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 0) " ¶¥ÁÏÏú")))
((equal 0.00008 (- (ATOF (RTOS (* 2 RAD1) 2 5))
(ATOF (RTOS (* 2 RAD1) 2 3)))0.000001)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 0) " µ¯»É")))
((or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 2) " (±³Ãæ³Á¿×£¬Éî¶È"deepth ")")))
((/= deepth "*")
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0)
"-%%C" (RTOS (* 2 RAD1) 2 2) " (ÕýÃæ³Á¿×£¬Éî¶È"deepth ")")))
(T (SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 RAD1) 2 2))))
)
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
)
)
)
)
;;;;;;;;;$$$$$$$$$
;;;;;;;;;$$$$$$$$$
(IF (AND(= ent1 "CIRCLE")(= ent2 "CIRCLE")(= ent3 "CIRCLE")(= 0 DIST12 DIST13 DIST23))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE") (CONS 8 cla1)
(CONS 6 LTY1) (CONS 62 COL1)))
MI_text rad3
BIG_text rad1
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
SS2 (SSGET "C" aute_point1 aute_point2 (list(CONS 0 "CIRCLE")
(cons 10 CEN1)(CONS 40 rad2)(CONS 8 cla2)
(CONS 6 LTY2) (CONS 62 COL2)))
SS3 (SSGET "C" aute_point1 aute_point2 (list(CONS 0 "CIRCLE")
(cons 10 CEN1)(CONS 40 rad3)(CONS 8 cla3)
(CONS 6 LTY3) (CONS 62 COL3)))
)
(IF (and (not (null ss2))(not (null ss3))
(null (member CEN1 SSCEN1)))
(chtext_point rad3)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY2) (= "HIDDEN2" LTY2)(= "HIDDENX2" LTY2)
(= "DASHED" LTY2) (= "DASHED2" LTY2)(= "DASHEDX2" LTY2))
(setq str_ent2 (strcat " (%%C" (RTOS (* 2 rad2) 2 2)
" ±³Ãæ³Á¿×£¬Éî¶È"DEEPTH1 ")"))
(setq str_ent2 (strcat " (%%C" (RTOS (* 2 rad2) 2 2)
" ÕýÃæ³Á¿×£¬Éî¶È"DEEPTH1 ")"))
)
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2)
" ±³Ãæ³Á¿×£¬Éî¶È"DEEPTH ")"))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2)
" ÕýÃæ³Á¿×£¬Éî¶È"DEEPTH ")"))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad3) 2 2) str_ent2 str_ent1
) )
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
);;(not (null ss1))
)
);;ent="circle"
)
;;;;;;;;;
(IF (AND (= ent1 "CIRCLE")(= ent2 "ARC")(= ent3 "ARC")(= 0 DIST12 DIST13 DIST23))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE")(CONS 8 cla1) (CONS 6 LTY1)
(CONS 62 COL1)))
MI_text 1
BIG_text rad1
ent2_ang50 (cdr (assoc 50 W2))
ent2_ang51 (cdr (assoc 51 W2))
ent2_po50 (polar CEN2 ent2_ang50 rad2)
ent2_po51 (polar CEN2 ent2_ang51 rad2)
ent2_dist (DISTOF (RTOS (distance ent2_po50 ent2_po51) 2 3))
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
ss3_ful nil
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
SS2 (SSGET "C" aute_point1 aute_point2 (list (CONS 0 "ARC")
(cons 10 CEN1)(CONS 40 rad2)
(CONS 8 cla2) (CONS 6 LTY2) (CONS 62 COL2)))
)
(if (not (null SS2))
(progn
(setq ss3no -1)
(repeat (sslength SS2)
(setq ss3no (1+ ss3no))
(setq ss3name (entget (ssname SS2 ss3no))
ss3start (cdr (assoc 50 ss3name))
ss3end (cdr (assoc 51 ss3name))
ss3po50 (polar CEN1 ss3start rad2)
ss3po51 (polar CEN1 ss3end rad2)
)
(if (/= (DISTOF(RTOS
(distance ss3po50 ss3po51)2 3)) ent2_dist)
(setq ss3_ful (cons 3 ss3_ful))
)
)
)
)
(IF (and (not (null SS2))(null ss3_ful)(>= (sslength SS2) 2)
(null (member CEN1 SSCEN1)))
(chtext_point rad2)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ±³Ãæ³Á¿×£¬Éî¶È"
DEEPTH ")"))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ÕýÃæ³Á¿×£¬Éî¶È"
DEEPTH")"))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2) "X" (RTOS ent2_dist 2 2) str_ent1
) )
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
);;(not (null ss1))
)
);;ent="circle"
)
;;;;;;;;;
(IF (AND (= ent1 "CIRCLE")(= ent2 "ARC")(= ent3 "ARC")(/= 0 DIST12)
(/= 0 DIST13)(/= 0 DIST23))
(PROGN
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE") (CONS 8 cla1) (CONS 6 LTY1)
(CONS 62 COL1)))
MI_text 1
BIG_text rad1
ent2_ang50 (cdr (assoc 50 W2))
ent2_ang51 (cdr (assoc 51 W2))
ent2_po50 (polar CEN2 ent2_ang50 rad2)
ent2_po51 (polar CEN2 ent2_ang51 rad2)
ent2_dist (DISTOF (RTOS (distance ent2_po50 ent2_po51) 2 3))
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
ss3_ful nil
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
pot_left (polar CEN1 2.4 (* 1.4 RAD1))
pot_right (polar CEN1 5.5 (* 1.4 RAD1))
SS2 (SSGET "C" pot_left pot_right (list (CONS 0 "ARC")
(CONS 40 rad2)(CONS 8 cla2)
(CONS 6 LTY2) (CONS 62 COL2)))
)
(if (not (null SS2))
(progn
(setq ss3no -1)
(repeat (sslength SS2)
(setq ss3no (1+ ss3no))
(setq ss3name (entget (ssname SS2 ss3no))
ss3cen1 (cdr (assoc 10 ss3name))
ss3start (cdr (assoc 50 ss3name))
ss3end (cdr (assoc 51 ss3name))
ss3po50 (polar ss3cen1 ss3start rad2)
ss3po51 (polar ss3cen1 ss3end rad2)
)
(if (or(/= (DISTOF
(RTOS(distance ss3po50 ss3po51)2 3)) ent2_dist)
(/= (DISTOF (RTOS
(distance ss3cen1 CEN1) 2 3)) DIST12))
(setq ss3_ful (cons 3 ss3_ful))
)
)
)
)
(IF (and (not (null SS2))(null ss3_ful)(>= (sslength SS2) 2)
(null (member CEN1 SSCEN1)))
(chtext_point rad2)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ±³Ãæ³Á¿×£¬Éî¶È"
DEEPTH ")"))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ÕýÃæ³Á¿×£¬Éî¶È"
DEEPTH ")"))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-"
(RTOS (+ (* 2 rad2) dist23) 2 2) "X" (RTOS ent2_dist 2 2) str_ent1
) )
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
);;(not (null ss1))
)
);;ent="circle"
)
;;;;;;;;;
(IF (AND (= ent1 "CIRCLE")(= ent2 "ARC")(= ent3 "ARC")
(= 0 DIST12)(/= 0 DIST13)(/= 0 DIST23))
(PROGN
(setq deepth "5")
(SETQ SS1 (SSGET "C" aute_point1 aute_point2 (LIST (CONS 40 rad1)
(CONS 0 "CIRCLE")(CONS 8 cla1)
(CONS 6 LTY1) (CONS 62 COL1)))
MI_text rad2
BIG_text rad1
ent2_ang50 (cdr (assoc 50 W2))
ent2_ang51 (cdr (assoc 51 W2))
ent2_po50 (polar CEN2 ent2_ang50 rad2)
ent2_po51 (polar CEN2 ent2_ang51 rad2)
ent2_dist (DISTOF (RTOS (distance ent2_po50 ent2_po51) 2 3))
)
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
)
(if (not (null ss1))
(progn
(setq no -1
LEN1 (SSLENGTH SS1)
SSCEN1 (LIST)
TEXTNUM 0
)
(REPEAT LEN1
(setq no (1+ no)
nam1 (ssname ss1 no)
ss3_ful nil
W1 (entget nam1)
CEN1 (cdr (assoc 10 W1))
pot_left (polar CEN1 2.4 (* 1.4 RAD1))
pot_right (polar CEN1 5.5 (* 1.4 RAD1))
SS2 (SSGET "C" aute_point1 aute_point2
(list (CONS 0 "ARC")(CONS 10 CEN1)
(CONS 40 rad2)(CONS 8 cla2)
(CONS 6 LTY2) (CONS 62 COL2)))
SS3 (SSGET "C" pot_left pot_right (list (CONS 0 "ARC")
(CONS 40 rad3)(CONS 8 cla3) (CONS 6 LTY3)
(CONS 62 COL3)))
)
(if (not (null SS2))
(progn
(setq ss3no -1)
(repeat (sslength SS2)
(setq ss3no (1+ ss3no))
(setq ss3name (entget (ssname SS2 ss3no))
ss3start (cdr (assoc 50 ss3name))
ss3end (cdr (assoc 51 ss3name))
ss3po50 (polar CEN1 ss3start rad2)
ss3po51 (polar CEN1 ss3end rad2)
)
(if (/= (DISTOF(RTOS
(distance ss3po50 ss3po51)2 3)) ent2_dist)
(setq ss3_ful (cons 3 ss3_ful))
)
)
)
)
(IF (and (not (null SS3))(not (null SS2))(null ss3_ful)
(null (member CEN1 SSCEN1)))
(chtext_point rad3)
)
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(IF (or (= "HIDDEN" LTY1) (= "HIDDEN2" LTY1)(= "HIDDENX2" LTY1)
(= "DASHED" LTY1) (= "DASHED2" LTY1)(= "DASHEDX2" LTY1))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ±³Ãæ³Á¿×£¬Éî¶È"
DEEPTH ")"))
(setq str_ent1 (strcat " (%%C" (RTOS (* 2 rad1) 2 2) " ÕýÃæ³Á¿×£¬Éî¶È"
DEEPTH ")"))
)
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) "-%%C"
(RTOS (* 2 rad2) 2 2) " µ¼Öù" str_ent1
) )
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR);(COMMAND "TEXT" "J" "J" "TL" pto textheight1 "0" STR )
);;(not (null ss1))
)
);;ent="circle"
)
);;(if (null (member cen1 cen_sel)))
)
);;(repeat (sslength cen_all))
);;;(if (not (null SS_all)
)
;;;;;;;***
(SETQ ss_ins (SSGET "c" aute_point1 aute_point2 (list (cons 0 "INSERT"))))
(if (not (null ss_ins))
(progn
(setq no -1
cen_all (list)
)
(repeat (sslength ss_ins)
(setq no (1+ no)
cen_ss (cdr (assoc 10 (entget (ssname ss_ins no))))
)
(if (null (member cen_ss cen_all))
(setq cen_all (cons cen_ss cen_all))
)
)
(setq no_list -1
cen_sel (list)
)
(repeat (length cen_all)
(setq no_list (1+ no_list)
cen_no_list (nth no_list cen_all)
)
(if (null (member cen_no_list cen_sel))
(progn
(setq stringth_no (1+ stringth_no)
stringth (nth stringth_no stringth_list)
SSCEN1 (LIST)
TEXTNUM 0
no -1
)
(setq ss_no_list (SSGET "c" aute_point1 aute_point2
(list (cons 0 "INSERT")(cons 10 cen_no_list)))
nam_no_list (cdr (assoc 2 (entget (ssname ss_no_list 0))))
ss_no_select (SSGET "c" aute_point1 aute_point2(list
(cons 0 "INSERT")(cons 2 nam_no_list)))
str_no_list (substr nam_no_list 1 4)
insert_wl_length (entget (ssname ss_no_list 0) (list "wl_length"))
insert_3 (cadadr (assoc -3 insert_wl_length))
)
(if (not (null insert_3))
(setq insert_3 (rtos (cdr insert_3))
)
(setq insert_3 "*"
)
)
(cond ((= "LSPM" (strcase str_no_list))
(setq str_ent1 " ÄÚÁù½ÇÂÝË¿ÑÀ¿×(¹¥ÑÀ)"
str_ent2 "-M"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPN" (strcase str_no_list))
(setq str_ent1 " Èû´òÂÝË¿(MSB)"
str_ent2 "-M"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPZ" (strcase str_no_list))
(setq str_ent1 " ×ÓĸÂÝË¿(MSW)"
str_ent2 "-M"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPP" (strcase str_no_list))
(setq str_ent1 " µ¼Öù¿×(Ï߸µ¥±ß%%P0)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPF" (strcase str_no_list))
(setq str_ent1 " µ¼Ì׿×(Ï߸µ¥±ß%%P0,%%c±³Ãæ³ÁÉî3.5)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 5 MI_text)))
((= "LSPD" (strcase str_no_list))
(setq str_ent1 " ¶¨Î»Ïú¿×(Ï߸µ¥±ß+0.00)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPG" (strcase str_no_list))
(setq str_ent1 " ¸¡ÉýÏú¿×(Ï߸µ¥±ß+0.01)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPL" (strcase str_no_list))
(setq str_ent1 " ¶¥ÁÏÏú¿×(Ï߸µ¥±ß+0.01)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPS" (strcase str_no_list))
(setq str_ent1 " µ¯»É¿×(×êͨ)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPH" (strcase str_no_list))
(setq str_ent1 " µ¼ÕýÏú¿×(Ï߸µ¥±ß+0.005,%%CÕýÃæ³ÁÉ)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPA" (strcase str_no_list))
(setq str_ent1 " ³å×Ó(TA)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 1.5 MI_text))
(if (> (atof str_ent3) 18)
(setq str_ent3 (strcat (substr nam_no_list 5 1)
"." (substr nam_no_list 6))
MI_text (/ (atof str_ent3) 2)
BIG_text (+ 1.5 MI_text)
)
)
)
((= "LSPC" (strcase str_no_list))
(setq str_ent1 " ³å×Ó(SH)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 1.5 MI_text))
(if (> (atof str_ent3) 18)
(setq str_ent3 (strcat (substr nam_no_list 5 1)
"." (substr nam_no_list 6))
MI_text (/ (atof str_ent3) 2)
BIG_text (+ 1.5 MI_text)
)
)
)
((= "LSPE" (strcase str_no_list))
(setq str_ent1 " ³éÑÀ³å×Ó(TE)"
str_ent2 "-%%C"
str_ent3 (substr nam_no_list 5)
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 1.5 MI_text))
(if (> (atof str_ent3) 18)
(setq str_ent3 (strcat (substr nam_no_list 5 1)
"." (substr nam_no_list 6))
MI_text (/ (atof str_ent3) 2)
BIG_text (+ 1.5 MI_text)
)
)
)
((= "LSPW" (strcase str_no_list))
(setq str_ent1 "µÄÒìÐο×(Ï߸µ¥±ß+0.00)"
str_ent2 "-´©Ë¿¿×Ϊ%%C"
str_ent3 (strcat (substr nam_no_list 5 1)
"." (substr nam_no_list 6 1))
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text MI_text))
((= "LSPR" (strcase str_no_list))
(setq str_ent3 (substr nam_no_list 5)
str_ent1 (strcat " ÂÝË¿³ÁÍ·¿×(ÕýÃæ³ÁÍ·Éî¶È*) " insert_3)
str_ent2 "-M"
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 2 MI_text)))
((= "LSPB" (strcase str_no_list))
(setq str_ent3 (substr nam_no_list 5)
str_ent1 (strcat " ÂÝË¿³ÁÍ·¿×(±³Ãæ³ÁÍ·Éî¶È*) " insert_3)
str_ent2 "-M"
MI_text (/ (atof (substr nam_no_list 5)) 2)
BIG_text (+ 2 MI_text)))
(t (setq str_ent1 nam_no_list
str_ent2 "-"
str_ent3 "(Ï߸µ¥±ß+0.00)"
MI_text 4
BIG_text 6))
)
(repeat (sslength ss_no_select)
(setq no (1+ no)
cen1 (cdr (assoc 10 (entget (ssname ss_no_select no))))
)
(setq insert_wl_length (entget (ssname ss_no_select no) (list "wl_length"))
insert_3add (cadadr (assoc -3 insert_wl_length))
)
(if (not (null insert_3add))
(setq insert_3add (rtos (cdr insert_3add))
)
(setq insert_3add "*"
)
)
(if (and(null (member cen1 SSCEN1))(= insert_3add insert_3))(chtext_point))
)
(setq cen_sel (append cen_sel SSCEN1))
(setvar "osmode" 64)
(SETQ PTO (polar PTO 4.712 (* 2 TXT)))
(SETQ STR (STRCAT "%%u" stringth ": " (RTOS TEXTNUM 2 0) str_ent2
str_ent3 str_ent1
) )
(setvar "osmode" 0)
(COMMAND "TEXT" "J" "TL" PTO TXT "" STR)
)
);;;;(if (null (member cen_no_list cen_sel)
;;;;;;;;
);;;(repeat (length cen_all)
;;;;;;;;
)
);;;(if (not (null ss_ins)
;;;;;;;***
(setvar "osmode" 183)
(COMMAND "UCS" "P")
)
(prompt "¶Ô²»Æð!ÊÔÓÃÆÚËȹý,Çë°²×°Õý°æ!")
)
)
;;;;;;;;
(defun chtext_point (radd / ptb)
(setq SSCEN1 (CONS CEN1 SSCEN1))
(if (> (/ (* MI_text 2) txt) 3)
(setq PTB (polar CEN1 (* 0.25 pi) (+ radd 2)))
(progn
(setq PTB (polar CEN1 (* 0.25 pi) (* 2.5 MI_text)))
(command "ucs" "w")
))
(SETQ DIST3 (DISTANCE CEN1 PTB)
PTB1 (polar CEN1 5.4 DIST3)
PTB2 (polar CEN1 0.87 DIST3)
PTB3 (polar CEN1 2.27 DIST3)
)
(COND ((NULL (SSGET "C" (polar ptb 0.87 (/ txt 2))
(polar ptb 4 (/ txt textheight1)))) (SETQ PTB PTB))
((NULL (SSGET "C" (polar ptb1 0.87 (/ txt 2))
(polar ptb1 4 (/ txt 2)))) (SETQ PTB PTB1))
((NULL (SSGET "C" (polar ptb2 0.87 (/ txt 2))
(polar ptb2 4 (/ txt 2)))) (SETQ PTB PTB2))
((NULL (SSGET "C" (polar ptb3 0.87 (/ txt 2))
(polar ptb3 4 (/ txt 2)))) (SETQ PTB PTB3))
(T (SETQ PTB PTB))
)
(command "ucs" "w")
(setq ss_ins_M4 nil jin 0)
(SETQ ss_ins_M4 (SSGET "c" aute_point1 aute_point2 (list (cons 0 "INSERT"))))
(setvar "osmode" 0)
(command "TEXT" "J" "MC" PTB textheight1 "0" stringth )
(command "change" (entlast) "" "p" "c" "3" "")
(SETQ TEXTNUM (1+ TEXTNUM))
)
;;;;;;;;;;
(defun check (number)
(set_tile "error" "")
(if (<= (distof (get_tile number)) 0)
(progn
(set_tile "error" "error value")
(mode_tile number 2)
(mode_tile number 3)
nil
)
(distof (get_tile number))
)
)
;;;;;; |
|