早上好我一定不知道如何使用它,因为我只能像上面描述的那样点击两次才能让它工作。我会继续玩下去。
亚伦
这不是你最初要求的吗?
命令是否可以识别最后一个圆角中选择的线,并将其重新用于下一个圆角?我现在必须点击同一行两次。我试图消除一串圆角中的一次额外点击。命令的其余部分效果很好。
也许是这样的。。。
(defun c:CF (/ e1 e2 lst ss)
(vl-load-com)
(while
(and (or lst
(and (setq e1 (entsel "\nSelect curve: "))
(or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE"))
(alert "Invalid object!")
) ;_ or
(setq lst (cons e1 lst))
) ;_ and
) ;_ or
(setq e2 (entsel "\nSelect next curve: "))
(or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE"))
(alert "Invalid object!")
) ;_ or
(setq lst (cons e2 lst))
(vl-cmdf "_.fillet" (cadr lst) (car lst))
) ;_ and
) ;_ while
(setq ss (ssadd))
(foreach x lst (setq ss (ssadd (car x) ss)))
(if (zerop (getvar 'peditaccept))
(vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "")
(vl-cmdf "_.pedit" "_m" ss "" "_j" "" "")
) ;_ if
(princ)
) ;_ defun
哇,你写得真快。这个对圆角效果很好。我对mods有一些想法(折线是/否选项和选择半径),但可以稍后再做。谢谢你的帮助。
(defun c:CF (/ e1 e2 lst lst2 ss)
(setvar 'filletrad
(cond ((getdist (strcat "\nSpecify fillet radius <" (rtos (getvar 'filletrad)) ">: ")))
((getvar 'filletrad))
) ;_ cond
) ;_ setvar
(while
(and (or lst
(and (setq e1 (entsel "\nSelect curve: "))
(or (vl-position (cdr (assoc 0 (entget (car e1)))) '("ARC" "LINE" "LWPOLYLINE"))
(alert "Invalid object!")
) ;_ or
(setq lst (cons e1 lst))
) ;_ and
) ;_ or
(setq e2 (entsel "\nSelect next curve: "))
(or (vl-position (cdr (assoc 0 (entget (car e2)))) '("ARC" "LINE" "LWPOLYLINE"))
(alert "Invalid object!")
) ;_ or
(setq lst (cons e2 lst))
(vl-cmdf "_.fillet" (cadr lst) (car lst))
(or (zerop (getvar 'filletrad)) (setq lst2 (cons (list (entlast)) lst2)))
) ;_ and
) ;_ while
(initget 0 "Yes No")
(and (eq "Yes" (getkword "\nConvert to LWPolyline? <No>: "))
(setq ss (ssadd))
(foreach x (append lst lst2) (setq ss (ssadd (car x) ss)))
(if (zerop (getvar 'peditaccept))
(vl-cmdf "_.pedit" "_m" ss "" "_y" "_j" "" "")
(vl-cmdf "_.pedit" "_m" ss "" "_j" "" "")
) ;_ if
) ;_ and
(princ)
) ;_ defun
这比我预期的要好。这将非常有用。谢谢你抽出时间。
没问题。 不错,艾伦
你喜欢你的逻辑运算符 谢谢
哈哈,我想它确实有一些。英雄联盟
页:
1
[2]