PREID 发表于 2022-7-5 17:00:44

查找连接多段线

大家好!
 
我正在寻找我在lisp论坛中找到的连接多段线lisp,我丢失了所有命令,这一条成为了我例行程序的一部分,我找了几个小时都没有成功。如果您能帮我定位,我们将不胜感激!
 
 
谢谢

Tharwat 发表于 2022-7-5 17:11:36

使用命令:圆角半径等于零。

troggarf 发表于 2022-7-5 17:14:05

我不知道您是否指的是Autodesk论坛上的“Silent PEDIT”线程。。。仅在这一条线上就有一些很棒的。
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Silent-Pedit/td-p/2048261/page/2
这是我最喜欢的。选择一个对象,与该对象“端到端”接触的任何对象都会变成多段线。
;Entity Join All
;Joins lines, arcs & Polylines at their endpoints automatically.
; All you have to do is select one object
; by Kent Cooper @ Autodesk forums

(defun C:EJA (/ peac cmde); = Polyline Edit: Join All
(setq peac (getvar 'peditaccept))
(setvar 'peditaccept 1)
(setq cmde (getvar 'cmdecho))
(setvar 'cmdecho 0)
(command "_.pedit" pause "_join" "_all" "" "")
(setvar 'peditaccept peac)
(setvar 'cmdecho cmde)
(princ)
)

Lee Mac 发表于 2022-7-5 17:26:15

另一种方法是将所有人加入到选择中:
 
(defun c:pj ( / pe ss )
(setq pe (getvar 'PEDITACCEPT))
(setvar 'PEDITACCEPT 1)
(if (setq ss (ssget "_:L" '((0 . "ARC,LINE,LWPOLYLINE"))))
   (command "_.pedit" "_M" ss "" "_J" "" "")
)
(setvar 'PEDITACCEPT pe)
(princ)
)

StevJ 发表于 2022-7-5 17:29:19

这根线就是那个吗?
 
史蒂夫

kam1967 发表于 2022-7-5 17:35:18

李,
 
 
有没有可能让它只连接同一层的直线、圆弧和多段线?提前谢谢。

Lee Mac 发表于 2022-7-5 17:45:51

 
请在Autodesk讨论组中查看我的回复:http://autode.sk/1op6xwy

judd167 发表于 2022-7-5 17:49:46

你好
 
我是这个论坛的新手,对AutoLisp有些陌生。我在连接以下lisp中创建的两个圆弧时遇到问题。我希望lisp自动加入这些弧,而无需用户选择。非常感谢您的任何帮助!!!我已经绞尽脑汁两天了!
 
(defun c:Head()
(命令-s“cmdecho”“0”)
(命令“osmode”“0”)
(命令“3dosmode”“0”)
(命令“attdia”“0”)
(命令“delobj”“1”)
(命令-s“-layer”“unlock”“*”“”)
(命令-s“-layer”set“0”)
(命令-s“erase”“all”“))
(命令-s“-layer”“delete”“*”“”)
(命令-s“grid”“off”)
(command-s“-color”“253”)
(命令-s“vscurrent”“e”)
(命令-s“-vpoint”“1,-1,1”)
 
(命令-s“_.arc”“66.24134.684270796556”“c”“0,6.82394700531876”“a”“27.387107026539”)
(命令-s“_.arc”“72124.707658144959”“c”“60.48124.707658144959”“a”“60”)
 
“我需要一个命令来连接刚刚创建的两个弧。。。
 
(命令“osmode”183)(命令“orthomode”0)(princ))

marko_ribar 发表于 2022-7-5 17:57:18

在这里试试这个,下次在代码标签中发布代码:[不
Your code here...
 

(defun c:Head ( / arc1 arc2 pea )
(setvar 'cmdecho 0)
(setvar 'osmode 0)
(if '3dosmode
   (setvar '3dosmode 0)
)
(setvar 'attdia 0)
(setvar 'delobj 1)
(command "_.-layer" "unlock" "*" "")
(command "_.-layer" "set" "0" "")
(command "_.erase" "all" "")
(command "_.-layer" "delete" "*" "")
(setvar 'gridmode 0)
(setvar 'cecolor "253")
(command "_.vscurrent" "e")
(command "_.vpoint" "1,-1,1")
(command "_.arc" "66.24,134.684270796556" "c" "0,6.82394700531876" "a" "27.3871075026539")
(setq arc1 (entlast))
(command "_.arc" "72,124.707658144959" "c" "60.48,124.707658144959" "a" "60")
(setq arc2 (entlast))
(setq pea (getvar 'peditaccept))
(setvar 'peditaccept 1)
(command "_.pedit" "m" arc1 arc2 "" "j")
(while (< 0 (getvar 'cmdactive))
   (command "")
)
(setvar 'peditaccept pea)
(command "_.zoom" "e")
(setvar 'osmode 183)
(setvar 'orthomode 0)
(princ)
)

 
您好,M.R。

eldon 发表于 2022-7-5 18:01:43

或者首先将弧绘制为连续的多段线
 
这两条弧不相切。
页: [1]
查看完整版本: 查找连接多段线