Tharwat 发表于 2022-7-6 08:08:24

 
这里确实很好。
 
我一直在想在多个实体上做圆角是不可能的,但你破坏了这个想法。

marko_ribar 发表于 2022-7-6 08:09:40

我没有躺着,这是我得到的-见附件。。。也许是我的上网本不能正确操作-不知道,请用发布的dwg测试它。。。
 
M、 R。

xf。图纸

Tharwat 发表于 2022-7-6 08:14:21

 
我不认为有人认为你或其他人在撒谎。
 
只需将实体展平,然后重试。

marko_ribar 发表于 2022-7-6 08:16:18

但它们已经被展平了-它们像往常一样在2d中绘制。。。对于李的代码,有时它是正确的,但有时不是。。。当我执行代码时,就可以了。。。就像我说的,当实体被提供给圆角时,它不知道在哪一边做,当你提供中点时,没有错误。。。请不要用我的代码检查,而是用第一次发布的。。。
 
M、 R。
 
P、 我在我的另一个电脑上测试了它。2012年的结果也是一样的。。。有时正确,有时不正确。。。

careca 发表于 2022-7-6 08:20:30

哇-看到这样的lisp专家在处理业余编码问题时给出的回复,我感到受宠若惊!
 
嗯,我已经尝试了两个版本的更新lisp,但它们仍然产生了有趣的结果:
 
李·麦克的Lisp:

 
Marko Ribar的Lisp:

 
也许这是因为我包括了一个折线弯曲方向的改变。。。
 
非常感谢你的努力,以我有限的知识,我将做额外的测试。

Dadgad 发表于 2022-7-6 08:24:59

 
你使用了哪个命令?

careca 发表于 2022-7-6 08:25:56

 
哈哈-我猜我的大脑在写帖子的时候正在思考一个不同的问题!

Dadgad 发表于 2022-7-6 08:29:20

我可以说,我有点泄气,因为我没有给你提供一个可行的解决方案。

marko_ribar 发表于 2022-7-6 08:33:53

对于外部偏移-可能只是这样:
 

(defun c:xf ( / *error* cm e0 e1 e2 e3 el p1 pe ch ) (vl-load-com)

   (defun *error* ( msg )
       (if (= 'int (type cm))
         (setvar 'cmdecho cm)
       )
       (if (= 'int (type pe))
         (setvar 'peditaccept pe)
       )
       (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
         (princ (strcat "\nError: " msg))
       )
       (princ)
   )
   
   (setq cm (getvar 'cmdecho)
         pe (getvar 'peditaccept)
   )
   (setvar 'cmdecho 0)
   (setvar 'peditaccept 1)
   (while (setq p1 (getpoint "\nPick Internal Point <Exit>: "))
       (setq e0 (entlast)
             el nil
       )
       (command "_.-boundary" "_A" "_I" "_N" "" "_O" "_P" "" "_non" p1 "")
       (setq e1 (entlast))
       (if (not (eq e0 e1))
         (progn
               (initget "Outside Inside")
               (setq ch (getkword "\nOutside or Inside <Inside> : "))
               (if (or (null ch) (eq ch "Inside"))
                   (command "_.offset" 10.0 e1 "_non" p1 "")
                   (command "_.offset" 10.0 e1 "_non" (getvar 'extmax) "")
               )
               (setq e2 (entlast))
               (if (not (eq e1 e2))
                   (progn
                     (command "_.chprop" e2 "" "_LA" "0" "_C" 1 "")
                     (command "_.explode" e2)
                     (setq e3 e2)
                     (while (setq e3 (entnext e3))
                           (setq el (cons (vlax-curve-getpointatparam e3 (+ (vlax-curve-getstartparam e3) (/ (- (vlax-curve-getendparam e3) (vlax-curve-getstartparam e3)) 2.0))) el))
                     )
                     (mapcar
                        '(lambda ( a b ) (setvar 'filletrad 10.0) (command "_.fillet" a b))
                           (cons (last el) el)
                           el
                     )
                     (command "_.pedit" "_M")
                     (while (setq e2 (entnext e2))
                           (command e2)
                     )
                     (command "" "_J" "" "")
                   )
                   (alert "Unable to perform offset.")
               )
               (entdel e1)
         )
         (alert "Unable to detect boundary.")
       )
   )
   (setvar 'peditaccept pe)
   (setvar 'cmdecho cm)
   (princ)
)
M.R。

careca 发表于 2022-7-6 08:36:28

太棒了,马尔科-非常感谢。
我不知道sysvar extmax。
我想我可以接受,非常感谢你们的支持-你们让我学到了很多;-)
 
页: 1 [2]
查看完整版本: 帮助Lisp执行多个