马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
函数用法:(翻译的坑爹,凑合看吧)
AcGeLinearEnt3d::overlap Function Adesk::Boolean overlap( const AcGeLinearEnt3d& line, AcGeLinearEnt3d*& overlap, const AcGeTol& tol = AcGeContext::gTol) const; line
| 输入任意3D直线实体
| overlap
| 输出与重复部分地区的一致的的线性实体
| tol
| 输入公差
|
判断两条线是否重复,以及是否如此回归与它们重复部分地区一致的直线。 回归完的重复部分线可能是任何AcGeLinearEnt3d的类型所引出的对象,依赖于两条线的类型。 重复部分参数是由操作符建立的且删除它是用户的责任。 如果此函数回归Adesk:kFalse中的值,则重复部分的参数是无效的。
下面代码主要功能,找出两条线重叠的部分给抠出来,平移出重叠部分三分之一长度,颜色变成黄色。
主要函数: (setq ge3 (xdge::getpropertyvalue ge1 "overlap" ge2))
这个函数对AcGeLinearEnt3d派生的子类AcGeLine3d,AcGeLineSeg3d,AcGeRay3d都有效。
 - (defun c:tt ()
- (if (and
- (setq e1 (car (xdrx_entsel "\n拾取第一条曲线<退出>:")))
- (setq e2 (car (xdrx_entsel "\n拾取第二条曲线<退出>:")))
- (setq ge1 (xdge::constructor e1))
- (setq ge2 (xdge::constructor e2))
- )
- (progn
- (if (setq ge3 (xdge::getpropertyvalue ge1 "overlap" ge2))
- (progn
- (setq pnt (xdge::getpropertyvalue ge3 "pointOnLine")
- dir (xdge::getpropertyvalue ge3 "direction")
- vdir (xdrx_vector_PerpVector dir)
- dis (xdge::getpropertyvalue ge3 "length")
- vdir (xdrx_vector_product vdir (/ dis 3.0))
- pnt2 (mapcar '+ pnt vdir)
- )
- (setq e3 (xdge::entity:make ge3))
- (xdrx_entity_copy e3 pnt pnt2)
- (xdrx_entity_setcolor (entlast) 2)
- )
- )
- )
- )
- (princ)
- )
|