Skip to main content

KEllipticalArc3d

kds-plugin-document / Exports / KEllipticalArc3d

Interface: KEllipticalArc3d

KEllipticalArc3d 类代表着三维空间中的一个椭圆弧。

The KEllipticalArc3d class represents an elliptical arc in 3d space.

Hierarchy

Table of contents

Properties

Methods

Properties

center

Readonly center: KPoint3d

获取当前椭圆弧的圆心。

Get center of the elliptical arc.

Defined in

api.d.ts:6592


dx

Readonly dx: KVector3d

获取当前椭圆弧的x轴方向。

Get the x-axis direction of the elliptical arc.

Defined in

api.d.ts:6598


dy

Readonly dy: KVector3d

获取当前椭圆弧的y轴方向。

Get the y-axis direction of the elliptical arc.

Defined in

api.d.ts:6604


dz

Readonly dz: KVector3d

获取当前椭圆弧的z轴方向。

Get the z-axis direction of the elliptical arc.

Defined in

api.d.ts:6610


endParam

Readonly endParam: number

获取椭圆弧的终点参数

Get the end parameter.

Defined in

api.d.ts:6634


endPoint

Readonly endPoint: KPoint3d

获得轮廓线的终点。

Get bounded curve's end point.

Inherited from

KBoundedCurve3d.endPoint

Defined in

api.d.ts:5575


isPeriodic

Readonly isPeriodic: boolean

是否是周期性椭圆弧

Whether the elliptical arc is periodic.

Defined in

api.d.ts:6640


length

Readonly length: number

获得轮廓线的长度。

Get bounded curve's length.

Inherited from

KBoundedCurve3d.length

Defined in

api.d.ts:5587


majorRadius

Readonly majorRadius: number

获取当前椭圆弧的长轴半径。

Get major radius of the elliptical arc.

Defined in

api.d.ts:6616


middlePoint

Readonly middlePoint: KPoint3d

获得轮廓线的中点。

Get bounded curve's middle point.

Inherited from

KBoundedCurve3d.middlePoint

Defined in

api.d.ts:5581


minorRadius

Readonly minorRadius: number

获取当前椭圆弧的短轴半径。

Get minor radius of the elliptical arc.

Defined in

api.d.ts:6622


startParam

Readonly startParam: number

获取椭圆弧的起点参数

Get the start parameter.

Defined in

api.d.ts:6628


startPoint

Readonly startPoint: KPoint3d

获得轮廓线的起点。

Get bounded curve's start point.

Inherited from

KBoundedCurve3d.startPoint

Defined in

api.d.ts:5569

Methods

clone

clone(): KCurve3d

复制一个当前曲线。

Return the cloned curve of this.

Returns

KCurve3d

复制的曲线。

The cloned curve.

Inherited from

KBoundedCurve3d.clone

Defined in

api.d.ts:6496


getApproximatePointsByRatio

getApproximatePointsByRatio(ratio?): KPoint3d[]

Parameters

NameType
ratio?number

Returns

KPoint3d[]

Defined in

api.d.ts:6689


getApproximatePointsInfoByNormalTol

getApproximatePointsInfoByNormalTol(normTol?, areaTol?): Object

对当前有界曲线进行离散,保证相邻两点之间的法向夹角小于给定值,相邻两点之间的曲线段和弦之间的近似三角形面积小于给定值。

Discretize bounded curve to points with specified normal tolerance and area tolerance.

Parameters

NameTypeDescription
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.

Returns

Object

离散点列和它们的参数值。

The approximate points info which contains the point locations and parameters.

NameType
paramsnumber[]
pointsKPoint3d[]

Inherited from

KBoundedCurve3d.getApproximatePointsInfoByNormalTol

Defined in

api.d.ts:5631


getApproximatePointsInfoByRatio

getApproximatePointsInfoByRatio(ratio?, areaTol?): Object

对当前有界曲线进行离散,保证相邻两点之间的弦高和弦长之比小于给定的比例值,相邻两点之间的曲线段和弦之间的近似三角形面积小于给定值。

Discretize bounded curve to points with specified ratio and area tolerance.

Parameters

NameTypeDescription
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.

Returns

Object

离散点列和它们的参数值。

The approximate points info which contains the point locations and parameters.

NameType
paramsnumber[]
pointsKPoint3d[]

Inherited from

KBoundedCurve3d.getApproximatePointsInfoByRatio

Defined in

api.d.ts:5609


getClosestPoint

getClosestPoint(point, tolerance?): KPoint3d

获得在指定容差下曲线上距离传入点最近的一点。

Get the closest point on curve for the input point with specified tolerance.

Parameters

NameTypeDescription
pointKPoint3d传入点。 The input point.
tolerance?number指定容差,默认容差是1e-6。 The specified tolerance.The default value is 1e-6.

Returns

KPoint3d

最近点。

The closest point.

Inherited from

KBoundedCurve3d.getClosestPoint

Defined in

api.d.ts:6468


getCurvatureVector

getCurvatureVector(point): KVector3d

求曲线上某点处的曲率向量。

Get curve's curvature vector for the input point on the curve.

Parameters

NameTypeDescription
pointKPoint3d曲线上一点。 A point on curve.

Returns

KVector3d

曲率向量。 向量的模为曲率值,向量的方向为曲率方向。

A curvature vector. Its norm represents the curvature value. Its direction represents the curvature's direction.

Inherited from

KBoundedCurve3d.getCurvatureVector

Defined in

api.d.ts:6518


getDerivatives

getDerivatives(t, orderNum): KVector3d[]

获取给定参数处的椭圆弧上点的导数。

Get the derivative of the parameter.

Parameters

NameTypeDescription
tnumber给定的参数
orderNumnumber导数阶数

Returns

KVector3d[]

椭圆弧上点的导数, 从低阶到高阶排列

Defined in

api.d.ts:6688


getInterval

getInterval(): KInterval

获取曲线的参数域区间。

Get the parameter interval of the curve.

Returns

KInterval

曲线的参数域区间。

The parameter interval of the curve.

Inherited from

KBoundedCurve3d.getInterval

Defined in

api.d.ts:6390


getParam

getParam(point): number

获取椭圆弧上点的参数

Get the parameter of the point on the elliptical arc.

Parameters

NameType
pointKPoint3d

Returns

number

Overrides

KBoundedCurve3d.getParam

Defined in

api.d.ts:6662


getPeriod

getPeriod(): number

获取椭圆弧的周期

get the period of the elliptical arc.

Returns

number

Defined in

api.d.ts:6646


getPoint

getPoint(t): KPoint3d

获取椭圆弧上参数为t的点。

Get the point on the elliptical arc at parameter t.

Parameters

NameTypeDescription
tnumbert为椭圆弧上的参数

Returns

KPoint3d

椭圆弧上参数为t的点

Overrides

KBoundedCurve3d.getPoint

Defined in

api.d.ts:6655


getTangent

getTangent(point): KVector3d

获得椭圆弧上一点处的切向量。 注意:该函数调用需要确保传入点在椭圆弧上。

Get tangent vector of a point on the elliptical arc. NOTE: the caller needs to make sure the point is on the arc.

Parameters

NameTypeDescription
pointKPoint3d椭圆弧上一点。 A point on the arc.

Returns

KVector3d

切向量。

The tangent vector.

Defined in

api.d.ts:6678


getType

getType(): KCurve3dType

获得曲线的类型。

Get the curve's type.

Returns

KCurve3dType

曲线的类型。

The curve's type.

Inherited from

KBoundedCurve3d.getType

Defined in

api.d.ts:6380


isEqual

isEqual(other, tolerance?): boolean

检查两个曲线在指定容差下是否相等。

Check whether two curves are equal with specified tolerance.

Parameters

NameTypeDescription
otherKCurve3d要比对的曲线。 The curve to compare this curve with.
tolerance?number指定容差,默认容差是1e-6。 The specified tolerance.The default value is 1e-6.

Returns

boolean

如果相等返回true。

Return true if equal, otherwise return false.

Inherited from

KBoundedCurve3d.isEqual

Defined in

api.d.ts:6486


isPointOnCurve

isPointOnCurve(point, tolerance?): boolean

检查传入点在指定容差下是否位于曲线上。

Check whether the input point is on the curve or not with specified tolerance.

Parameters

NameTypeDescription
pointKPoint3d传入点。 The input point.
tolerance?number指定容差,默认容差是1e-6。 The specified tolerance.The default value is 1e-6.

Returns

boolean

如果在曲线上返回true。

Return true if on the curve, otherwise return false.

Inherited from

KBoundedCurve3d.isPointOnCurve

Defined in

api.d.ts:6450


reverse

reverse(): void

把当前曲线反向。

reverse the current curve.

Returns

void

Inherited from

KBoundedCurve3d.reverse

Defined in

api.d.ts:6502


splitByPoint

splitByPoint(point, distTol?): KBoundedCurve3d[]

把当前有界曲线按给定点分成两段。

Split the bounded curve into two segments by the given point.

Parameters

NameTypeDescription
pointKPoint3d分割点。 split point.
distTol?number距离容差。如果不给定,则使用全局容差。 Distance tolerance. If not provided, then global tolerance will be used.

Returns

KBoundedCurve3d[]

多段有界曲线。 如果分割点靠近当前有界曲线的起点或者终点,则返回一条克隆曲线。

Multiple segments of bounded curves. If the split point is close to start or end point, a cloned bounded curve will be returned.

Inherited from

KBoundedCurve3d.splitByPoint

Defined in

api.d.ts:5671


splitByPoints

splitByPoints(points, distTol?): KBoundedCurve3d[]

把当前有界曲线按给定点分成多段。

Split the bounded curve into multiple segments by the given points.

Parameters

NameTypeDescription
pointsKPoint3d[]分割点列。 split points.
distTol?number距离容差。如果不给定,则使用全局容差。 Distance tolerance. If not provided, then global tolerance will be used.

Returns

KBoundedCurve3d[]

多段有界曲线。 如果点列只包含起点和终点,则返回空数组。

Multiple segments of bounded curves. If points only contain start and end points, empty array will be returned.

Inherited from

KBoundedCurve3d.splitByPoints

Defined in

api.d.ts:5651


transform

transform(matrix): boolean

对当前曲线进行变换。

Transform this curve to a new one.

Parameters

NameTypeDescription
matrixKMatrix4变换矩阵。 The transform matrix.

Returns

boolean

当执行正确的话,返回true。

Return true if successful, otherwise return false.

Inherited from

KBoundedCurve3d.transform

Defined in

api.d.ts:6404