明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 891|回复: 2

[讨论] 两条重合边多线段合并成一条多线段

[复制链接]
发表于 2015-5-21 09:52:28 | 显示全部楼层 |阅读模式
本帖最后由 lameduck 于 2015-5-21 09:53 编辑

下面程序是把两条多线段变成一条多线段!都是调用cad里的命令,哪位高手能写个不调用cad命令的版本么?
  1. (defun pe_trim()
  2.   (setq a_el(car(entsel)) b_el (car(entsel)))
  3.   (setq xdata_li(assoc -3 (entget a_el '("*"))))
  4.   (command "region" a_el "")
  5.   (setq ar_el(entlast))
  6.   (command "erase" a_el "")
  7.   (command "region" b_el "")
  8.   (setq br_el(entlast))
  9.   (command "erase" b_el "")
  10.   (command "union" ar_el br_el "")
  11.   (setq sr_el(entlast))
  12.   (command "_explode" sr_el "")
  13.   (setq sr_line(entlast))
  14.   (command "_pedit" sr_line "y" "j" "all" "")
  15.   (setq sr_el(entlast))
  16.   (entmod (cons xdata_li (entget sr_el)))
  17.   )

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2015-5-21 10:01:09 | 显示全部楼层
加载XLRX_API:
(XLRX-Curve-GetOutPoly (ssget))
 楼主| 发表于 2015-5-21 10:16:42 | 显示全部楼层
Gu_xl 发表于 2015-5-21 10:01
加载XLRX_API:
(XLRX-Curve-GetOutPoly (ssget))

老大,没有钱下载函数说明额,能否无私分享个?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-21 21:54 , Processed in 0.161267 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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