跳到主要内容

IDP.Math.KGeomLib.pointInFace2D() method

以特定容差判断点是否在面中。

Check whether a point is in loops or not with specified tolerance.

Signature:

pointInFace2D(point: KPoint2d, faceLoops: KFace2d, tolerance?: number): KPtInLoopResult;

Links: pointInFace2D(point: KPoint2d, faceLoops: KFace2d, tolerance?: number): KPtInLoopResult;

Parameters

Parameter

Type

Description

point

KPoint2d

要判断的点。

The point to compare with the faceLoops.

faceLoops

KFace2d

面是由环数组构成。由二维轮廓线集合组成的环,需要保证环的每一个的末点与下一个的起点时相同的,最后一个的末点与第一个的起点时相同的。 还必须确保环没有自相交。

face's loops composed by bounded curve2ds, the first bounded curve array is outer loop and other is inner loop. 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 bounded curve array is not self-intersected.

tolerance

number

(Optional) 特定容差,默认值是1e-6。

The specified tolerance.The default value is 1e-6.

Returns:

KPtInLoopResult

返回KPtInLoopResult,包含点与环的位置关系信息。

The KPtInLoopResult include intersect type, etc.