(defun C:tes ( / &dis1 &dis2 &dis3 &p1 &p2 &p3 &p4 &p5 &p6 &p7 &p8 &ss1 tc1 tc2 x)
(if (and (setq tc1 (entsel "\n请éæ©ä¸å¿çº¿åèå¾å±"))
(setq tc2 (entsel "\n请éæ©åçåèå¾å±"))
(setq &p1 (getpoint "\n请è¾å
¥ç¬¬ä¸ç¹"))
(> (setq &dis1 (getdist &p1 "\n请è¾å
¥é¿åº¦")) 4)
(> (setq &dis2 (getdist &p1 "\n请è¾å
¥é«åº¦")) 4)
(> (setq &dis3 (getdist &p1 "\n请è¾å
¥ååå¾")) 0)
)
(progn
(setq &ss1 '() tc1 (assoc 8 (entget (car tc1))) tc2 (assoc 8 (entget (car tc2))))
(setq &p2 (polar &p1 0 2) &ss1 (cons &p2 &ss1) &p2 (polar &p2 0 (- &dis1 4)) &ss1 (cons &p2 &ss1)
&p2 (polar &p2 (* pi 0.25) (* 2 (expt 2 0.5))) &ss1 (cons &p2 &ss1)
&p2 (polar &p2 (* pi 0.5) (- &dis2 4)) &ss1 (cons &p2 &ss1)
&p2 (polar &p2 (* pi 0.75) (* 2 (expt 2 0.5))) &ss1 (cons &p2 &ss1)
&p2 (polar &p2 pi (- &dis1 4)) &ss1 (cons &p2 &ss1)
&p2 (polar &p1 (* pi 0.5) (- &dis2 2)) &ss1 (cons &p2 &ss1)
&p2 (polar &p1 (* pi 0.5) 2) &ss1 (cons &p2 &ss1);å¤æ®µçº¿ç¹éå
&p2 (polar &p1 0 (* &dis1 0.25)) &p2 (polar &p2 (* pi 0.5) (* &dis2 0.5));åå¿1
&p1 (polar &p2 0 (* &dis1 0.5));åå¿2
&p3 (polar &p2 pi (* &dis1 0.5)) &p4 (polar &p1 0 (* &dis1 0.5));ä¸å¿çº¿
&p5 (polar &p2 (* pi 0.5) (* &dis2 0.75)) &p6 (polar &p2 (* pi 1.5) (* &dis2 0.75))
&p7 (polar &p5 0 (* &dis1 0.5)) &p8 (polar &p6 0 (* &dis1 0.5))
)
(entmake (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length &ss1)) '(70 . 1)) (mapcar '(lambda (x)(cons 10 x)) &ss1 )));å¤æ®µçº¿ç»å¶
(entmake (list '(0 . "CIRCLE") tc2 (cons 10 &p2) (cons 40 &dis3)));åç»å¶
(entmake (list '(0 . "CIRCLE") tc2 (cons 10 &p1) (cons 40 &dis3)))
(entmake (list '(0 . "LINE") tc1 (cons 10 &p3) (cons 11 &p4)));ç´çº¿ç»å¶
(entmake (list '(0 . "LINE") tc1 (cons 10 &p5) (cons 11 &p6)))
(entmake (list '(0 . "LINE") tc1 (cons 10 &p7) (cons 11 &p8)))
)
)
(prin1)
);å¤å¶å°è®°äºæ¬ï¼ä»¥ã.lspã为åç¼å½åï¼autolispå è½½åï¼å½ä»¤ä¸ºãTESã
;1.没ææç¡®ç»åºä¸å¿çº¿å¾å±;2.没æç»åºåå¾å±;3.没æç»åºååå¾