跳到主要内容

KPolylineCurve2d interface

KPolylineCurve2d 类代表着二维空间中的一个折线段。

The KPolylineCurve2d class represents a polyline in 2d space.

Signature:

export interface KPolylineCurve2d extends KBoundedCurve2d 

Links: export interface KPolylineCurve2d extends KBoundedCurve2d

Extends: KBoundedCurve2d

Properties

Property

Modifiers

Type

Description

params

readonly

number[]

获取当前折线段每个顶点的弧长参数。

Get arc length parameters of all the vertices of the polyline.

points

readonly

KPoint2d[]

获取当前折线段的所有顶点。

Get all the vertices of the polyline.

Methods

Method

Description

getTangent(point)

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

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