terryxiezan 发表于 2007-12-27 10:37:00

[求助]請教AcDbCurve::getClosestPointTo()

getClosestPointTo(
const AcGePoint3d& givenPnt,
const AcGeVector3d& direction,
AcGePoint3d& pointOnCurve,
Adesk::Boolean extend = Adesk::kFalse) const;
我從點givePnt 沿 direction 找 Curve 上的點時,不是 givePnt沿 direction 沿伸的一條直線與 Curve的交點嗎?
其實我是在Z=0平面內,已知Y坐標想求出curve上的點,不過不知道什麼直接的方法,望各位高手指點。現有的條件是已知曲線兩邊兩點,可以通過構造一條直線 intersectWith() 曲線得到交點。原以為可以用getClosestPointTo()來求。

Sayonana 发表于 2007-12-29 14:39:00

GETCLOSESTPOINTTO是已知曲线和一点.求最近点.
你说的"現有的條件是已知曲線兩邊兩點"不知道是什么意思?该曲线是一条直线?
"我從點givePnt 沿 direction 找 Curve 上的點時,不是 givePnt沿 direction 沿伸的一條直線與 Curve的交點嗎?"
就是这意思.
页: [1]
查看完整版本: [求助]請教AcDbCurve::getClosestPointTo()