马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
void getClosestPointTo( const AcGeCurve3d& curve3d, AcGePointOnCurve3d& pntOnThisCrv, AcGePointOnCurve3d& pntOnOtherCrv, const AcGeTol& tol = AcGeContext::gTol) const; curve3d | 输入任意3D曲线 | pntOnThisCrv | 输出这条曲线上的最近点 | pntOnOtherCrv | 输出输入曲线上最近点 | tol | 输入公差 |
找出这条曲线和输入曲线间最近的点。除了最近点被回归为“AcGePointOnCurve2d”的对象之外,此函数与函数“closestPointTo()”一样。
 - (defun c:tt (/ e1 e2 ge1 ge2 gcc ss)
- (if (and (setq e1 (xdrx_entsel
- "\nPick Curve: "
- '((0 . "*LINE,ARC,CIRCLE,RAY,ELLIPSE"))
- )
- )
- (setq e2 (xdrx_entsel
- "\nPick Curve: "
- '((0 . "*LINE,ARC,CIRCLE,RAY,ELLIPSE"))
- )
- )
- (setq ge1 (xdge::constructor (car e1)))
- (setq ge2 (xdge::constructor (car e2)))
- (setq gcc (xdge::getpropertyvalue
- ge1
- "getClosestPointTo"
- ge2
- )
- )
- )
- (progn
- (setq
- ss (apply
- 'xdrx_line_make
- (mapcar '(lambda (x) (xdge::getpropertyvalue x "Point"))
- gcc
- )
- )
- )
- (xdrx_entity_setcolor ss 1)
- (xdge::free)
- )
- )
- (princ)
- )
|