IDP.Math.KBoundedCurve3d.getApproximatePointsInfoByRatio() method
对当前有界曲线进行离散,保证相邻两点之间的弦高和弦长之比小于给定的比例值,相邻两点之间的曲线段和弦之间的近似三角形面积小于给定值。
Discretize bounded curve to points with specified ratio and area tolerance.
Signature:
getApproximatePointsInfoByRatio(ratio?: number, areaTol?: number): {
points: KPoint3d[];
params: number[];
};
Links: getApproximatePointsInfoByRatio(ratio?: number, areaTol?: number): { points: KPoint3d[]; params: number[]; };
Parameters
Parameter | Type | Description |
---|---|---|
ratio | number | (Optional) 相邻两点之间曲线段的弦高和弦长之比。 如果没有输入弦高和弦长比例值或者输入值不在(0,1)之间,则默认会采用0.1。 ratio = sagitta / chord length. If ratio is not provided or the value is not between (0,1), then it will use ratio = 0.1 to discretize the bounded curve. |
areaTol | number | (Optional) 相邻两点之间的曲线段和弦之间的近似三角形面积。 如果没有输入面积值或者面积值过小(<1.0e-6), 则不使用面积误差作为判断条件。 The approximate area between the bounded curve and the chord of two adjacent points. If the area is not provided or the vlaue is too small(<1.0e-6), then the check condition will not use the area. |
Returns:
{ points: KPoint3d[]; params: number[]; }
离散点列和它们的参数值。
The approximate points info which contains the point locations and parameters.