Andyhon
发表于 2012-12-21 08:14:03
请回8#
More info:
http://www.google.com/search?as_q=setq+&as_epq=EXpress+Tools&as_oq=ET+%E5%AE%89%E8%A3%9D&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Fbbs.mjtd.com
皇上快溜
发表于 2016-6-24 16:44:54
本帖最后由 皇上快溜 于 2016-6-24 16:50 编辑
Andyhon 发表于 2012-5-18 10:55 static/image/common/back.gif
Andyhon你好,你这个程序超级迷人。请问,想让下列短程序很你这个程序串接起来使用,该怎么弄?
(defun c:F()(command "FILLET" "R" "(getreal "\n请输入新的半径:")" "FILLET") (PRINC))
(defun c:FF()(command "FILLET" "R" "0" "FILLET") (PRINC))
(defun c:F1()(command "FILLET" "R" "0.1" "FILLET") (PRINC))
(defun c:F15()(command "FILLET" "R" "0.15" "FILLET") (PRINC))
(defun c:F2()(command "FILLET" "R" "0.2" "FILLET") (PRINC))
(defun c:F25()(command "FILLET" "R" "0.25" "FILLET") (PRINC))
。。。。。
。。。。。
短程序赋予倒角R值,然后统一串接到你这个程序上,以实现框选倒角
另外,你这个程序框选倒角之后是是条连成一体的多义线,能不能让它变成炸开的?
Andyhon
发表于 2016-6-28 09:04:51
(defun ffr (rad / newrad ss pts i ee)
;; (setq newrad (getreal "\n请输入新的半径:"))
(setvar "FilletRad" rad)
(setq ss (ssget '(( 0 . "LINE,ARC,LWPOLYLINE"))))
(setq pts (acet-geom-ss-extents ss nil)) ; ET func
(SetVar "PeditAccept" 1)
(command "Pedit" "M" ss "" "J" "" "")
(setq ss (ssget "C" (car pts) (cadr pts) '(( 0 . "LWPOLYLINE")))
i0
)
(while (setq ee (ssname ss i))
(command "Fillet" "P" ee)
(setq i (1+ i))
)
)
以 (defun c:F25()(command "FILLET" "R" "0.25" "FILLET") (PRINC)) 为例
(defun c:F25() (ffr 0.25))
;;; 单一 LwPolyline 适用
;;; 炸开
(defun c:F25()(ffr 0.25) (command "explode" (entlast)))
;;; 多重时函式修订
(while (setq ee (ssname ss i))
(command "Fillet" "P" ee)
(setq i (1+ i))
(command "explode" (entlast))
)
lqplvhehe321
发表于 2019-3-24 17:39:55
mark回头好好研究
ketxu
发表于 2019-11-4 14:56:44
本帖最后由 ketxu 于 2019-11-4 14:57 编辑
I changed it to not depend on Express function
(defun c:fps (/ss pts i ee :ST:SS-Boundingbox :ST:SS->List :ST:SS->ListVla LM:ssget os ov)
(setq
os '(PeditAccept cmdecho)
ov (mapcar 'getvar os)
)
(mapcar 'setvar os '(1 0))
(defun LM:ssget ( msg arg / sel )
(princ msg)
(setvar 'nomutt 1)
(setq sel (vl-catch-all-apply 'ssget arg))
(setvar 'nomutt 0)
(if (not (vl-catch-all-error-p sel)) sel)
)
;Return list ename from ssget
(defun :ST:SS->List(ss / n e l)
(setq n (sslength ss))
(while (setq e (ssname ss (setq n (1- n))))
(setq l (cons e l))
)
)
;Return list vla Object from s
(defun :ST:SS->ListVla(s)(mapcar 'vlax-ename->vla-object (:ST:SS->List s)))
(defun :ST:SS-Boundingbox ( lst / llp ls1 ls2 urp )
(foreach obj lst
(vla-getboundingbox obj 'llp 'urp)
(setq ls1 (cons (vlax-safearray->list llp) ls1)
ls2 (cons (vlax-safearray->list urp) ls2)
)
)
(mapcar '(lambda ( a b ) (apply 'mapcar (cons a b))) '(min max) (list ls1 ls2))
)
(or*newrad* (setq *newrad* 1))
(setq *newrad* (getdist (strcat "\nB\U+00E1n k\U+00EDnh fillet <" (rtos *newrad*) "> :")))
(setvar "FilletRad" *newrad*)
;(setq ss (ssget '(( 0 . "LINE,ARC,LWPOLYLINE"))))
(setq ss (LM:ssget "Select Line, Arc, Pline to fillet :" (list '(( 0 . "LINE,ARC,LWPOLYLINE")))))
(setq pts (:ST:SS-Boundingbox (:ST:SS->ListVla ss ))) ; ET func
(command "Pedit" "M" ss "" "J" "" "")
(setq ss (ssget "C" (car pts) (cadr pts) '(( 0 . "LWPOLYLINE")))
i0
)
(while (setq ee (ssname ss i))
(command "Fillet" "P" ee)
(setq i (1+ i))
)
(mapcar 'setvar os ov)
(princ)
)
注册
发表于 2022-10-17 14:17:28
mark一下,备查-------
下文没句号。
发表于 2022-10-17 17:53:27
ketxu 发表于 2019-11-4 14:56
I changed it to not depend on Express function
这个可以 就是英文的Bán kính fillet <10.0000> :Select Line, Arc, Pline to fillet :
kwcs2003
发表于 2022-11-23 19:19:03
保存不了,怎么回来,一保存就乱码
Ming131564
发表于 2023-1-18 11:50:02
我也正需要顶一个!
陈小五
发表于 2023-2-2 09:59:08
时隔11年,请问有这种倒内R角的插件吗C:\Users\111\Desktop\QQ截图20230202095828.png