zag0666 发表于 2009-3-24 13:34:00

[分享]册除重复线

<p>网上找的,东西不错,就是不够完善,斜线删除会误删,请高手修改。</p><p>(defun c:adk ()<br/>(graphscr)<br/>(setvar "cmdecho" 0)<br/>(command "pickbox" 3)<br/>(command "dim" "dimzin" 0 "e")<br/>&nbsp; (setq cen (getvar "viewctr"))<br/>&nbsp; (setq vpt1 (getvar "vsmin"))<br/>&nbsp; (setq vpt2 (getvar "vsmax"))<br/>(setq<br/>&nbsp;&nbsp;&nbsp;&nbsp; p&nbsp; (/ pi 2.0)<br/>&nbsp;&nbsp;&nbsp;&nbsp; g (+ pi p))<br/>(setq aa (ssget "c" vpt1 vpt2 ))<br/>(command "pickbox" 0)<br/>&nbsp;&nbsp; (setq zz 0)<br/>&nbsp;&nbsp; (setq ui 0)<br/>&nbsp;&nbsp; (setq ab (ssadd))<br/>(princ "\n 请稍候;正在去除......") <br/>&nbsp;&nbsp; (repeat (sslength aa)<br/>&nbsp;&nbsp; (setq aab (ssname aa ui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq bb (cdr (assoc 0 (entget aab))))<br/>(cond ((= bb "LINE")<br/>(setq qst (cdr (assoc 11 (entget aab))))<br/>(setq qed (cdr (assoc 10 (entget aab))))<br/>(setq qedq (cdr (assoc 210 (entget aab))))<br/>(setq ad (distance qst qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd (angle qst qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; de (angle qed qst)<br/>)&nbsp;&nbsp; <br/>;(cond ((&gt; ad 4)<br/>(setq aj (/ ad 2.25))<br/>(setq aq (/ ad 3.0))<br/>(setq qxa (polar qst dd aj))<br/>(setq qxb (polar qst dd aq))<br/>(setq pt1 (list (car qxa)(cadr qxa)))<br/>&nbsp;&nbsp; (setq qaa (ssget "c" qxa qxb '((0 . "LINE"))))<br/>;&nbsp;&nbsp; (setq qaa (ssget '(4.4444 10.0)))<br/>&nbsp;&nbsp; (setq xuui 0)<br/>&nbsp;&nbsp; (setq qab (ssadd))<br/>&nbsp;&nbsp; (repeat (sslength qaa)<br/>&nbsp;&nbsp; (setq qaab (ssname qaa xuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq qbb (cdr (assoc 0 (entget qaab))))<br/>(cond ((= qbb "LINE")&nbsp; <br/>(cond ((= xuui 0)&nbsp;&nbsp; <br/>&nbsp;&nbsp; (setq caab (ssname qaa xuui))<br/>&nbsp;&nbsp; (setq dqbb (cdr (assoc 0 (entget caab))))<br/>(cond ((= dqbb "LINE")<br/>(setq qst (cdr (assoc 11 (entget caab))))<br/>(setq qed (cdr (assoc 10 (entget caab))))<br/>(setq ad (distance qst qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd (angle qst qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; de (angle qed qst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hdd (angtos dd 0 2)<br/>)<br/>(setq a1 (car qst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a2 (cadr qst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a3 (car qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a4 (cadr qed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha1 (rtos a1 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha2 (rtos a2 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha3 (rtos a3 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha4 (rtos a4 2 4)<br/>)<br/>))))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>(cond ((&gt;= xuui 1)<br/>&nbsp;&nbsp; (setq baab (ssname qaa xuui))<br/>&nbsp;&nbsp; (setq bqbb (cdr (assoc 0 (entget baab))))<br/>(cond ((= bqbb "LINE")&nbsp; <br/>(setq aqst (cdr (assoc 11 (entget baab))))<br/>(setq aqed (cdr (assoc 10 (entget baab))))<br/>(setq aad (distance aqst aqed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add (angle aqst aqed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ade (angle aqed aqst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hadd (angtos add 0 2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hade (angtos ade 0 2)<br/>)<br/>(setq a5 (car aqst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a6 (cadr aqst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a7 (car aqed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a8 (cadr aqed)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha5 (rtos a5 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha6 (rtos a6 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha7 (rtos a7 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha8 (rtos a8 2 4)<br/>)<br/>))))))<br/>(cond ((= bqbb "LINE")&nbsp; <br/>(cond ((= dqbb "LINE") <br/>(cond ((&gt; xuui 0)&nbsp; <br/>(cond ((/= hdd "0.00")<br/>(cond ((/= hdd "90.00")<br/>(cond ((/= hdd "180.00")<br/>(cond ((/= hdd "270.00")<br/>(cond ((= hadd hdd)<br/>(cond ((&lt;= aad ad)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; aad ad)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((= hade hdd)<br/>(cond ((&lt;= aad ad)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; aad ad)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))))<br/>))))))))<br/>(cond ((= ha2 ha8)<br/>(cond ((= hdd "0.00")<br/>(cond ((= hadd "0.00")<br/>(cond ((&lt;= a1 a5)<br/>(cond ((&gt;= a3 a7)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a3 a7)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qst aqed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a1 a5)<br/>(cond ((&lt;= a3 a7)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a3 a7)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqst qed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))<br/>(cond ((= hadd "180.00")<br/>(cond ((&lt;= a1 a7)<br/>(cond ((&gt;= a3 a5)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a3 a5)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qst aqst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a1 a7)<br/>(cond ((&lt;= a3 a5)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a3 a5)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqed qed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))))<br/>(cond ((= hdd "180.00")<br/>(cond ((= hadd "180.00")<br/>(cond ((&lt;= a3 a7)<br/>(cond ((&gt;= a1 a5)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a1 a5)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qed aqst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a3 a7)<br/>(cond ((&lt;= a1 a5)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a1 a5)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqed qst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))<br/>(cond ((= hadd "0.00")<br/>(cond ((&lt;= a3 a5)<br/>(cond ((&gt;= a1 a7)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a1 a7)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qed aqed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a3 a5)<br/>(cond ((&lt;= a1 a7)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a1 a7)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqst qst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))))<br/>))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>(cond ((= ha1 ha5)<br/>(cond ((= hdd "90.00")<br/>(cond ((= hadd "90.00")<br/>(cond ((&lt;= a2 a6)<br/>(cond ((&gt;= a4 a8)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a4 a8)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qst aqed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a2 a6)<br/>(cond ((&lt;= a4 a8)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a4 a8)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqst qed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))<br/>(cond ((= hadd "270.00")<br/>(cond ((&lt;= a2 a8)<br/>(cond ((&gt;= a4 a6)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a4 a6)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqst qst "")<br/>(setq zz (+ zz 1))<br/>))))</p><p>(cond ((&gt; a2 a8)<br/>(cond ((&lt;= a4 a6)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a4 a6)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqed qed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))))<br/>(cond ((= hdd "270.00")<br/>(cond ((= hadd "270.00")<br/>(cond ((&lt;= a4 a8)<br/>(cond ((&gt;= a2 a6)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a2 a6)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qed aqst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a4 a8)<br/>(cond ((&lt;= a2 a6)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a2 a6)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqed qst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))<br/>(cond ((= hadd "90.00")<br/>(cond ((&lt;= a4 a6)<br/>(cond ((&gt;= a2 a8)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&lt; a2 a8)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" qed aqed "")<br/>(setq zz (+ zz 1))<br/>))))<br/>(cond ((&gt; a4 a6)<br/>(cond ((&lt;= a2 a8)<br/>(entdel caab)<br/>(setq zz (+ zz 1))<br/>))<br/>(cond ((&gt; a2 a8)<br/>(entdel caab)<br/>(entdel baab)<br/>(command "line" aqst qst "")<br/>(setq zz (+ zz 1))<br/>))))<br/>))))<br/>))<br/>))<br/>))<br/>))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>(setq xuui (+ xuui 1))<br/>)&nbsp;&nbsp;&nbsp;&nbsp; <br/>));))<br/>(cond ((= bb "CIRCLE")<br/>&nbsp; (setq bst (cdr (assoc 10 (entget aab))))<br/>&nbsp; (setq bed (cdr (assoc 40 (entget aab))))<br/>(setq qxa (polar bst (/ p 2.0) bed))<br/>;&nbsp;&nbsp; (setq jqaa (ssget "c" qxa qxa '((0 . "CIRCLE")(0 . "ARC"))))<br/>&nbsp;&nbsp; (setq jqaa (ssget "c" qxa qxa '((-4 . "&lt;OR")(-4 . "&lt;AND")(0 . "CIRCLE")<br/>(-4 . "AND&gt;") (-4 . "&lt;AND")(0 . "ARC")(-4 . "AND&gt;")(-4 . "OR&gt;"))))<br/>;&nbsp;&nbsp; (setq jqaa (ssget "c" qxa qxa ))<br/>&nbsp;&nbsp; (setq uui 0)<br/>&nbsp;&nbsp; (setq qab (ssadd))<br/>&nbsp;&nbsp; (repeat (sslength jqaa)<br/>&nbsp;&nbsp; (setq jqaab (ssname jqaa uui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq wqbb (cdr (assoc 0 (entget jqaab))))<br/>(cond ((= wqbb "CIRCLE")<br/>(cond ((= uui 0)<br/>&nbsp; (setq bst (cdr (assoc 10 (entget jqaab))))<br/>&nbsp; (setq bed (cdr (assoc 40 (entget jqaab))))<br/>(setq sa1 (car bst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sa2 (cadr bst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha11 (rtos bed 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha1 (rtos sa1 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha2 (rtos sa2 2 3))<br/>))<br/>(cond ((&gt; uui 0)<br/>&nbsp;&nbsp; (setq baab (ssname jqaa uui))<br/>&nbsp;&nbsp; (setq bqbb (cdr (assoc 0 (entget baab))))<br/>&nbsp; (setq bcst (cdr (assoc 10 (entget baab))))<br/>&nbsp; (setq bced (cdr (assoc 40 (entget baab))))<br/>(setq sa3 (car bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sa4 (cadr bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha12 (rtos bced 2 4)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha3 (rtos sa3 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sha4 (rtos sa4 2 3))<br/>))))<br/>(cond ((= wqbb "CIRCLE")<br/>(cond ((&gt; uui 0)<br/>(cond ((= sha1 sha3)<br/>(cond ((= sha2 sha4)<br/>(cond ((= sha12 sha11)<br/>(entdel baab)<br/>(setq zz (+ zz 1))<br/>))))))))))<br/>(setq uui (+ uui 1))<br/>))<br/>)<br/>(cond ((= bb "ARC")<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq aab (ssname aa ui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq qbb (cdr (assoc 0 (entget aab))))<br/>&nbsp; (setq dst (cdr (assoc 10 (entget aab))))<br/>&nbsp; (setq ast (cdr (assoc 50 (entget aab))))<br/>&nbsp; (setq sst (cdr (assoc 51 (entget aab))))<br/>&nbsp; (setq beed (cdr (assoc 40 (entget aab))))<br/>(cond ((&gt; ast sst)<br/>(cond ((&lt;= ast p)<br/>(setq xb (+(- p ast) g sst))<br/>(setq xxb (/ xb 2.0))<br/>(setq xb (+ ast xxb))))<br/>(cond ((&lt;= ast pi)<br/>(setq xb (+(- pi ast) pi sst))<br/>(setq xxb (/ xb 2.0))<br/>(setq xb (+ ast xxb))))<br/>(cond ((&lt;= ast g)<br/>(setq xb (+(- g ast) p sst))<br/>(setq xxb (/ xb 2.0))<br/>(setq xb (+ ast xxb))))<br/>(cond ((&lt;= ast (* pi 2.0))<br/>(setq xb (+(- (* pi 2.0) ast)sst))<br/>(setq xxb (/ xb 2.0))<br/>(setq xb (+ ast xxb))))<br/>))<br/>(cond ((&lt; ast sst)<br/>(setq xb (- sst ast))<br/>(setq xxb (/ xb 2.0))<br/>(setq xb (+ ast xxb))))<br/>(setq<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qxa (polar dst xb beed))<br/>;&nbsp;&nbsp; (setq sqaa (ssget "c" qxa qxa ))<br/>&nbsp;&nbsp; (setq sqaa (ssget "c" qxa qxa '((-4 . "&lt;OR")(-4 . "&lt;AND")(0 . "ARC")<br/>(-4 . "AND&gt;") (-4 . "&lt;AND")(0 . "CIRCLE")(-4 . "AND&gt;")(-4 . "OR&gt;"))))<br/>&nbsp;&nbsp; (setq yuui 0)&nbsp;&nbsp; <br/>&nbsp;&nbsp; (setq qab (ssadd))<br/>&nbsp;&nbsp; (repeat (sslength sqaa)<br/>&nbsp;&nbsp; (setq qaab (ssname sqaa yuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq aqbb (cdr (assoc 0 (entget qaab))))<br/>(cond ((= yuui 0)<br/>(cond ((= aqbb "ARC")<br/>&nbsp;&nbsp; (setq xqaab (ssname sqaa yuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq saqbb (cdr (assoc 0 (entget xqaab))))<br/>&nbsp; (setq dst (cdr (assoc 10 (entget xqaab))))<br/>&nbsp; (setq ast (cdr (assoc 50 (entget xqaab))))<br/>&nbsp; (setq sst (cdr (assoc 51 (entget xqaab))))<br/>&nbsp; (setq beed (cdr (assoc 40 (entget xqaab))))<br/>(setq yui 0)<br/>(setq&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa1 (car dst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa2 (cadr dst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha1 (rtos wa1 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha2 (rtos wa2 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha3 (rtos ast 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha4 (rtos sst 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha11 (rtos beed 2 4))<br/>))<br/>(cond ((= aqbb "CIRCLE")<br/>&nbsp;&nbsp; (setq eaab (ssname sqaa yuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq waqbb (cdr (assoc 0 (entget eaab))))<br/>&nbsp;&nbsp; (setq bqbb (cdr (assoc 0 (entget eaab))))<br/>&nbsp; (setq bcst (cdr (assoc 10 (entget eaab))))<br/>&nbsp; (setq cbed (cdr (assoc 40 (entget eaab))))<br/>(setq yui 1)<br/>(setq a9 (car bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a10 (cadr bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha9 (rtos a9 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha10 (rtos a10 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha12 (rtos cbed 2 4))<br/>))<br/>))<br/>(cond ((&gt; yuui 0)<br/>(cond ((= aqbb "ARC")<br/>&nbsp;&nbsp; (setq xqaab (ssname sqaa yuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq saqbb (cdr (assoc 0 (entget xqaab))))<br/>&nbsp; (setq cdst (cdr (assoc 10 (entget xqaab))))<br/>&nbsp; (setq cast (cdr (assoc 50 (entget xqaab))))<br/>&nbsp; (setq csst (cdr (assoc 51 (entget xqaab))))<br/>&nbsp; (setq cbeed (cdr (assoc 40 (entget xqaab))))<br/>(setq&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa5 (car cdst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa6 (cadr cdst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha5 (rtos wa5 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha6 (rtos wa6 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha7 (rtos cast 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha8 (rtos csst 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha11 (rtos cbeed 2 4))<br/>))<br/>(cond ((= aqbb "CIRCLE")<br/>&nbsp;&nbsp; (setq eaab (ssname qaa yuui))<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq waqbb (cdr (assoc 0 (entget eaab))))<br/>&nbsp;&nbsp; (setq bqbb (cdr (assoc 0 (entget eaab))))<br/>&nbsp; (setq bcst (cdr (assoc 10 (entget eaab))))<br/>&nbsp; (setq cbed (cdr (assoc 40 (entget eaab))))<br/>(setq a9 (car bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a10 (cadr bcst)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha9 (rtos a9 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha10 (rtos a10 2 3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qha12 (rtos cbed 2 4))<br/>))<br/>))<br/>(cond ((&gt; yuui 0)<br/>(cond ((= bb "ARC")<br/>(cond ((= saqbb "ARC")<br/>(cond ((= cbeed beed)<br/>(cond ((= qha1 qha5)<br/>(cond ((= qha2 qha6)<br/>(cond ((= qha3 qha7)<br/>(cond ((= qha4 qha8)<br/>(entdel xqaab)<br/>(setq zz (+ zz 1))<br/>))))))))))))<br/>(cond ((= yui 0)<br/>(cond ((= waqbb "CIRCLE")<br/>(cond ((= saqbb "ARC")<br/>(cond ((= qha11 qha12)<br/>(cond ((= qha1 qha9)<br/>(cond ((= qha2 qha10)<br/>(entdel xqaab)<br/>(setq zz (+ zz 1))))))))))))))<br/>(cond ((= yui 1)<br/>(cond ((= waqbb "CIRCLE")<br/>(cond ((= saqbb "ARC")<br/>(cond ((= qha11 qha12)<br/>(cond ((= qha5 qha9)<br/>(cond ((= qha6 qha10)<br/>(entdel xqaab)<br/>(setq zz (+ zz 1))))))))))))))</p><p>))))</p><p>(setq yuui (+ yuui 1))<br/>))<br/>)<br/>(setq ui (+ ui 1))<br/>)<br/>(setq sss "册除重复线")<br/>(setq ss1 "条")<br/>(setq aqqq (rtos zz 2 0))<br/>(prompt (strcat sss aqqq ss1))<br/>(command "pickbox" 5)<br/>(command "dim" "dimzin" 8 "e")<br/>(princ)<br/>)<br/></p>

至今没学会 发表于 2020-6-15 10:52:09

能删除重复圆孔吗

jishen 发表于 2009-9-26 17:26:00

<p>探索者自带的还不错</p>

zag0666 发表于 2011-3-29 15:55:54

本帖最后由 zag0666 于 2011-3-29 15:56 编辑

AutoCAD 2006\Express

可惜不能发附件
添加以下附件
acetauto.lsp
acetdomnu.fas
acettest.fas
acetutil2.fas
acetutil3.fas
acetutil4.fas
acetutil.arx
acetutil.dll
acetutil.fas
overkill.dcl
overkill.lsp
Overkillsup.lsp


MaKaiJin 发表于 2011-5-20 18:46:09

小题大做啊!

yhkk0317 发表于 2011-5-21 19:36:25

用CAD的EXPRESSTOOLS的OVERKILL.LSP

苍天白鹤 发表于 2011-6-14 08:11:06

感谢楼主分享,下去试一下。

springwillow 发表于 2011-10-4 08:34:03

可以看一下,无所不及编的柱体积配箍率的程序,里面有一个删除重复线的函数,编的不错。可以去.jgcad.com找

lichunyu 发表于 2011-10-30 07:41:26

在那里有啊      

jxcaixiaomeng 发表于 2011-11-17 15:21:22

好东西啊,哈哈   

13579 发表于 2011-11-17 16:38:28

又学了一招。
页: [1] 2
查看完整版本: [分享]册除重复线