Skip to main content

KCircle3d

kds-plugin-document / Exports / KCircle3d

Interface: KCircle3d

KCircle3d类代表着三维空间中的一个圆。

The KCircle3d class represents a circle in 3d space.

Hierarchy

Table of contents

Properties

Methods

Properties

center

Readonly center: KPoint3d

获取圆心。

Get center of the circle.

Defined in

api.d.ts:6059


normal

Readonly normal: KVector3d

获取圆的法向量。

Get the normal of the circle.

Defined in

api.d.ts:6071


radius

Readonly radius: number

获取圆的半径。

Get radius of the circle.

Defined in

api.d.ts:6065

Methods

clone

clone(): KCurve3d

复制一个当前曲线。

Return the cloned curve of this.

Returns

KCurve3d

复制的曲线。

The cloned curve.

Inherited from

KCurve3d.clone

Defined in

api.d.ts:6496


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

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

KCurve3d.getCurvatureVector

Defined in

api.d.ts:6518


getInterval

getInterval(): KInterval

获取曲线的参数域区间。

Get the parameter interval of the curve.

Returns

KInterval

曲线的参数域区间。

The parameter interval of the curve.

Inherited from

KCurve3d.getInterval

Defined in

api.d.ts:6390


getParam

getParam(point): number

反求输入点对应的曲线参数值。

Get point's corresponding parameter value on the curve.

Parameters

NameTypeDescription
pointKPoint3d曲线上的一点。 Point on curve

Returns

number

输入点对应的曲线参数值。

The corresponding parameter of the point on curve.

Inherited from

KCurve3d.getParam

Defined in

api.d.ts:6432


getPlane

getPlane(): KPlane

获取当前圆所落的平面。

Get the plane where the circle is on.

Returns

KPlane

当前圆所在的平面。

The plane where the circle is on.

Defined in

api.d.ts:6114


getPoint

getPoint(t): KPoint3d

求曲线参数值对应的曲线上的点位置。

Get the point on the curve specified by the input parameter t.

Parameters

NameTypeDescription
tnumber参数值 Parameter value

Returns

KPoint3d

曲线参数对应的曲线上的点。

The point on the curve for the input parameter.

Inherited from

KCurve3d.getPoint

Defined in

api.d.ts:6418


getTangent

getTangent(point): KVector3d

获取圆上一点的法向量。 注意:传入点需要确保落在圆上。

Get circle's tangent vector of a point on the circle. NOTE: the caller need to make sure the point is on the circle.

Parameters

NameTypeDescription
pointKPoint3d圆上一点。 A point on the circle.

Returns

KVector3d

切向量。

The tangent vector.

Defined in

api.d.ts:6087


getType

getType(): KCurve3dType

获得曲线的类型。

Get the curve's type.

Returns

KCurve3dType

曲线的类型。

The curve's type.

Inherited from

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

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

KCurve3d.isPointOnCurve

Defined in

api.d.ts:6450


reverse

reverse(): void

把当前曲线反向。

reverse the current curve.

Returns

void

Inherited from

KCurve3d.reverse

Defined in

api.d.ts:6502


transform

transform(matrix): boolean

对当前圆进行变换。 注意:如果变换之后的几何不是一个圆,则会抛出error, 本操作仅支持旋转和平移。

Transform this circle to a new one. NOTE: If the new one is not a circle, it will throw error. Only support for rotate and move translation now.

Parameters

NameTypeDescription
matrixKMatrix4变换矩阵。 The transform matrix.

Returns

boolean

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

Return true if successful, otherwise return false.

Overrides

KCurve3d.transform

Defined in

api.d.ts:6103