IDP.Math.KBoundedCurve3d 接口
export interface KBoundedCurve3d extends KCurve3d 
所有三维轮廓曲线的基类,例如KLineSegment3d(线段)和KArc3d(圆弧)。
The base class for all 3D bounded curves, such as KLineSegment3d and KArc3d.
继承: KCurve3d
属性
endPoint
readonly endPoint: KPoint3d;
获得轮廓线的终点。
Get bounded curve's end point.
类型: KPoint3d
length
readonly length: number;
获得轮 廓线的长度。
Get bounded curve's length.
middlePoint
readonly middlePoint: KPoint3d;
获得轮廓线的中点。
Get bounded curve's middle point.
类型: KPoint3d
startPoint
readonly startPoint: KPoint3d;
获得轮廓线的起点。
Get bounded curve's start point.
类型: KPoint3d
方法
getApproximatePointsInfoByNormalTol
getApproximatePointsInfoByNormalTol(normTol?: number, areaTol?: number): {
        points: KPoint3d[];
        params: number[];
    };
对当前有界曲线进行离散,保证相邻两点之间的法向夹角小于给定值,相邻两点之间的曲线段和弦之间的近似三角形面积小于给定值。
Discretize bounded curve to points with specified normal tolerance and area tolerance.
参数:
- 
normTol: number相邻两点之间法向夹角误差(angle < acos(1-normTol))。 如果没有输入法向误差值或者输入值过小(<1.0e-6)或者过大(>1.0 - 1.0e-6),则默认会采用0.01。 The normal tolerance between two adjacent points (angle < acos(1-normTol)). If normTol is not provided or the value is too small(<1.0e-6) or too big(>1.0 - 1.0e-6), then it will use default value 0.01. 
- 
areaTol: number相邻两点之间的曲线段和弦之间的近似三角形面积。 如果没有输入面积值或者面积值过小(<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. 
返回值: { points: KPoint3d[]; params: number[]; }
离散点列和它们的参数值。
The approximate points info which contains the point locations and parameters.
getApproximatePointsInfoByRatio
getApproximatePointsInfoByRatio(ratio?: number, areaTol?: number): {
        points: KPoint3d[];
        params: number[];
    };
对当前有界曲线进行离散,保证相邻两点之间的弦高和弦长之比小于给定的比例值,相邻两点之间的曲线段和弦之间的近似三角形面积小于给定值。
Discretize bounded curve to points with specified ratio and area tolerance.
参数:
- 
ratio: number相邻两点之间曲线段的弦高和弦长之比。 如果没有输入弦高和弦长比例值或者输入值不在(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相邻两点之间的曲线段和弦之间的近似三角形面积。 如果没有输入面积值或者面积值过小(<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. 
返回值: { points: KPoint3d[]; params: number[]; }
离散点列和它们的参数值。
The approximate points info which contains the point locations and parameters.
splitByPoint
splitByPoint(point: KPoint3d, distTol?: number): KBoundedCurve3d[];
把当前有界曲线按给定点分成两段。
Split the bounded curve into two segments by the given point.
参数:
- 
point: KPoint3d分割点。 split point. 
- 
distTol: number距离容差。如果不给定,则使用全局容差。 Distance tolerance. If not provided, then global tolerance will be used. 
返回值: KBoundedCurve3d[]
多段有界曲线。 如果分割点靠近当前有界曲线的起点或者终点,则返回一条克隆曲线。
Multiple segments of bounded curves. If the split point is close to start or end point, a cloned bounded curve will be returned.
splitByPoints
splitByPoints(points: KPoint3d[], distTol?: number): KBoundedCurve3d[];
把当前有界曲线按给定点分成多段。
Split the bounded curve into multiple segments by the given points.
参数:
- 
points: KPoint3d[]分割点列。 split points. 
- 
distTol: number距离容差。如果不给定,则使用全局容差。 Distance tolerance. If not provided, then global tolerance will be used. 
返回值: KBoundedCurve3d[]
多段有界曲线。 如果点列只包含起点和终点,则返回空数组。
Multiple segments of bounded curves. If points only contain start and end points, empty array will be returned.