IDP.Math.KGeomLib.pointInLoop2D() method
以特定容差检查一点是否在环中。
Check whether a point is in a loop or not with specified tolerance.
Signature:
pointInLoop2D(point: KPoint2d, loop: KLoop2d, tolerance?: number): KPtInLoopResult;
Links: pointInLoop2D(point: KPoint2d, loop: KLoop2d, tolerance?: number): KPtInLoopResult;
Parameters
Parameter | Type | Description |
---|---|---|
point | 要判断的点。 The point to compare with the loop. | |
loop | 由二维轮廓线集合组成的环,需要保证环的每一个的末点与下一个的起点时相同的,最后一个的末点与第一个的起点时相同的。 还必须确保环没有自相交。 The loop composed by bounded curve2ds. The caller need to make sure each curve's end point is equal to next one's start point, and last curve's end point is equal to the first one's start point. The caller also need to make sure the loop is not self-intersected. | |
tolerance | number | (Optional) 特定容差,默认值是1e-6。 The specified tolerance.The default value is 1e-6. |
Returns:
返回KPtInLoopResult,包含点与环的位置关系信息。
The KPtInLoopResult include intersect type, etc.