- UID
- 1
- 积分
- 15883
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
发表于 2014-12-10 20:58:34
|
显示全部楼层
API实现的是这个方法的第一个
virtual Acad::ErrorStatus
getClosestPointTo(
const AcGePoint3d& givenPnt,
AcGePoint3d& pointOnCurve,
Adesk::Boolean extend = Adesk::kFalse) const;
givenPnt Input point (in WCS coordinates) for which to find nearest point on curve
pointOnCurve Returns the point (in WCS coordinates) on the curve that is nearest to givenPnt
extend Input Boolean indicating whether or not to extend curve in search for nearest point
This function finds the point on the curve that is nearest to givenPnt and sets pointOnCurve to the result.
If extend==Adesk::kTrue, then the curve is extended along its path to find the closest point.
Returns Acad::eOk if successful. Return values for errors are dependent on the implementation.
In derived classes this function needs to be able to extend the curve if necessary (if extend==Adesk::kTrue), find the point on the curve (or its path, if extend==Adesk::kTrue) that is nearest to givenPnt, then set pointOnCurve to the end result.
Using AcGe classes may be helpful in doing some of the calculation work.
If the operation is successful, this function returns Acad::eOk. Return values for errors are dependent upon the error and the implementor. See header file acdh.h for a list of possible ErrorStatus values.
The default implementation抯 return value is Acad::eNotImplemented.
你贴的这个你觉得常用吗? |
|