只需一步,快速开始
如何判断一个点位于一条线的端点上?谢谢
线是指所有类型的线
使用道具 举报
(if (equal (distance pt (osnap pt "END")) 1e-6 1e-8) (princ "\n点在端点。") (princ "\n点不在端点。"))
谢谢,我回去试下看看
Z版主,试了好像不行的,不知道是什么原因:
(defun c:tt( / pt)(setq pt (getpoint "请点取一点:"))(if (equal (distance pt (osnap pt "END")) 1e-6 1e-8) (princ "\n点在端点。") (princ "\n点不在端点。"))(princ))
无论怎么点,都是出现:“点不在端点”不知道是什么回事呀?
;;vl方法
(defun IstEndPoint (curve point) (or (equal (vlax-curve-getStartPoint curve) point 0.00001) (equal (vlax-curve-getEndPoint curve) point 0.00001) ))
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2025-2-24 17:47 , Processed in 0.161971 second(s), 26 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.