明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: 999999

[提问] 求助各位大神批量倒圆角功能

[复制链接]
 楼主| 发表于 2022-11-15 11:16 | 显示全部楼层

大神您好,我想安装一下您这个插件,把代码复制进去后输入@@弹不出面板,是怎么回事呀
回复

使用道具 举报

发表于 2022-11-15 11:27 | 显示全部楼层
对于有弧线的处理还不完善。
CAD什么版本?需要关闭360安全卫士之类的。

加签名处QQ群详聊
回复

使用道具 举报

 楼主| 发表于 2022-11-15 12:28 | 显示全部楼层
vitalgg 发表于 2022-11-15 11:27
对于有弧线的处理还不完善。
CAD什么版本?需要关闭360安全卫士之类的。

好的呢,刚刚加群了
回复

使用道具 举报

发表于 2022-11-15 12:34 | 显示全部楼层
楼主找到了没有呢?
回复

使用道具 举报

发表于 2022-11-24 12:25 | 显示全部楼层
(defun c:FR (/  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")))
          i  0
   )
   
   (while (setq ee (ssname ss i))
     (command "Fillet" "P" ee)
     (setq i (1+ i))
   )
   (mapcar 'setvar os ov)
   (princ)
)

评分

参与人数 1明经币 +1 收起 理由
Bao_lai + 1 很给力!

查看全部评分

回复

使用道具 举报

发表于 2023-11-8 02:40 | 显示全部楼层
kwok 发表于 2022-11-14 13:54
FILLET 空格 p 空格。基本是这样,加个ssget和循环处理就行了。

大佬,多线段,选择圆弧,框选批量修改相同圆弧,如何改?
回复

使用道具 举报

发表于 2023-12-25 20:57 | 显示全部楼层
月下闲人 发表于 2022-11-24 12:25
(defun c:FR (/  ss pts i ee :ST:SS-Boundingbox :ST:SS->List :ST:SS->ListVla LM:ssget os ov)
(setq
...

不要生成封闭的多段线,怎么处理?谢谢
回复

使用道具 举报

发表于 2023-12-26 15:39 | 显示全部楼层
(while (setq ee (ssname ss i))
     (command "Fillet" "P" ee)
     (command "explode" ee)
     (setq i (1+ i))
   )

加了一行 (command "explode" ee)把封闭的多段线给分解了
回复

使用道具 举报

发表于 2023-12-31 16:13 | 显示全部楼层
hnzkhyyl 发表于 2023-12-26 15:39
(while (setq ee (ssname ss i))
     (command "Fillet" "P" ee)
     (command "explode" ee)

能不能用记住上次输入的R值,直接回车再次重复执行,输入则是新值
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-2 22:29 , Processed in 0.183046 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表