明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1897|回复: 6

About the "boundary" command

[复制链接]
发表于 2004-2-25 16:28:00 | 显示全部楼层 |阅读模式
How to use "boundary" in LISP and get the boundary set?
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2004-2-25 17:07:00 | 显示全部楼层
1. (setq bp (bpoly pt))


2. (command "bpoly" pt "")


兩者在孤島運用上有些微差異
 楼主| 发表于 2004-2-26 14:13:00 | 显示全部楼层
(defun C:steph()
;;; (make_layer "BOUNDARY" 8 nil)
(setvar "CLAYER" "BOUNDARY")
(command "boundary")
(setq ss_b (ssget "x" '((8 . "BOUNDARY"))))
(command "_hatch" "_user" 75 50 "n" ss_b "")
); The rutine above stop after the boundaries are created, why? Anybody can help me fix it? Many thanks
发表于 2004-2-26 15:04:00 | 显示全部楼层
"BOUNDARY“层上的都闭合么?
 楼主| 发表于 2004-2-26 20:11:00 | 显示全部楼层
Boundary图层是开着的. 其实不关图层的事. 问题是(command "boundary")之后,边界生成了,程序就不再往下运行了. 记得陈坛主曾回答过一个关于判断一点在闭合形内还是外的问题, 应该对这问题的回答有帮助.
发表于 2004-2-27 08:58:00 | 显示全部楼层
邊界已生成就不是點在內外的問題,改用2樓的方法試一下吧
 楼主| 发表于 2004-2-27 11:18:00 | 显示全部楼层
(defun C:steph()
(setq ss_b (ssadd))
(while (setq boundary (bpoly (getpoint "\nSelect internal point: ")))
(setq ss_b (ssadd boundary ss_b))
(vla-highlight (vlax-ename->vla-object boundary) :vlax-true)
);while
(if ss_b
(progn
(command "_hatch" "_user" 75 50 "n" ss_b "")
(command "_hatch" "_user" 105 50 "n" ss_b "")
(setq idx 0)
(repeat (sslength ss_b)
(entdel (ssname ss_b idx))
(setq idx (1+ idx))
);
)
)
(princ)
); Now it better. Thanks BUt it dosen't work quite well... 1. The neighbouring existing boundaries will be de-highlighted when a new boundary is created.
2. How to deal with the duplicated existing boundaries?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-27 16:47 , Processed in 0.270169 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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