- UID
- 4885
- 积分
- 234
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-10
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
(defun _join1 (str / e na)
(while (and (setq e (gete str))
(getent (car e))
(not (TgWcMatch (setq na (socas 0)) "LINE,ARC"))
)
(print)
(princ
(strcat "\n*** 已拾取了'" na "', 请拾取'LINE'或'ARC'!")
)
)
e
)
(defun c:wa (/ OBJ1 OBJ2 name)
(if
(and (setq OBJ1 (_join1 "\n请拾取第一根线(LINE)或弧(ARC) <退出>:"))
(setq
OBJ2 (_join1
"\n再拾取第二根线(LINE)或弧(ARC)进行连接 <退出>: "
)
)
)
(progn (_@ld "wltool2") (ucson) (wmend2 OBJ1 OBJ2) (ucsoff))
)
(princ)
)
(defun C:tx (/ wd ss e na h)
(prompt "\n请指定加粗的线段:")
(if (setq ss (ssget (list (cons 0 "LINE,ARC,CIRCLE,*POLYLINE"))))
(progn
(setq wd (getdist "线段宽<50>:")
wd (if wd
wd
50
)
)
(ucson)
(getss ss 0)
(while (setq e (namess 0))
(setq na (socas 0))
(if (TgWcMatch na "*POLYLINE")
(command ".PEDIT" e "_W" wd "")
(progn
(setq h (socas 39))
(if (= na "CIRCLE")
(command ".BREAK"
e
(polar (socas 10) 0 (socas 40))
(polar (socas 10) 1e-3 (socas 40))
)
)
(command ".PEDIT" e "Y" "_W" wd "")
(if
(and h
(= "LWPOLYLINE" (cdr (assoc 0 (entget (entlast)))))
)
(command ".chprop" (entlast) "" "t" h "")
)
)
)
)
(ucsoff)
)
)
)
(defun c:ts (/ mm p p0 p1 ss e na tf)
(setq mm 0.1)
(setvar "aperture" (getvar "pickbox"))
(ucson)
(while (and (setq p0 (entsel "\n请点取要打断的交点 <退出>: "))
(setq p0 (osnap (last p0) "int"))
(setq ss (pickss p0 mm 1))
)
(while (setq e (namess 1))
(cond ((= "LINE" (setq na (socas 0))) (setq tf T))
((= "ARC" na) (setq tf T))
((not (TgWcMatch na "*POLYLINE")) (setq tf nil))
((equal (nextent) p0 mm) (setq tf nil))
((progn (while (setq p (nextent)) (setq p1 p))
(equal p1 p0 mm)
)
(setq tf nil)
)
((setq tf T))
)
(if tf
(command ".break" (list e p0) p0)
)
)
)
(ucsoff)
)
(defun dsect (p1 p6 la / d sc p2 p3 p4 p5)
(setq la (cond ((and la (TgWcMatch la (glayer "临时*"))) "临时其它")
((and la (TgWcMatch la (glayer "剖面*"))) "剖面其它")
('T "其它")
)
d (* 0.5 (distance p1 p6))
a (angle p1 p6)
sc (schdim "NORMAL")
sc (min sc (/ d 150.))
p2 (polar p1 a (- d (* sc 130)))
p5 (polar p6 a (- (* sc 130) d))
p3 (polar (polar p2 a (* sc 70)) (+ a _pi2) (* sc 220))
p4 (polar (polar p5 a (* sc -70)) (+ a _pi2) (* sc -220))
p1 (polar p1 a (* sc -280))
p6 (polar p6 a (* sc 280))
)
(begin la)
(command ".line" p1 p2 p3 p4 p5 p6 "")
(end)
)
(defun c:dsect2 (/ e p1 p2 la ss)
(if (setq e (gete "\n选取剖断线的基线<起末点>: " '((0 . "LINE"))))
(progn (getent)
(setq p1 (socas 10)
p2 (socas 11)
la (socas 8)
)
(entdel (car e))
)
(if (and (setq p1 (getspt "\n点取剖断线的起点<退出>: "))
(setq p2 (getspt p1 "\n点取剖断线的终点<退出>: "))
)
(if (or (setq ss (pickss p1 "剖面*,临时*" 1))
(setq ss (pickss p2 "剖面*,临时*" 1))
)
(progn (namess 1) (setq la (socas 8)))
(setq la "其它")
)
)
)
(if (and p1 p2)
(dsect p1 p2 la)
)
(princ)
)
这是从天正里拷出来的,是不是加密了? |
|