Skip to main content

KGeomFace2d

kds-plugin-document / Exports / KGeomFace2d

Interface: KGeomFace2d

二维面的接口类

The interface of a geometry face 2d.

Table of contents​

Methods​

Methods​

area​

▸ area(): number

获得面积。

Get area

Returns​

number

返回face2d的面积。

Return the face2d's area.

Defined in​

api.d.ts:8850


containsPoint​

▸ containsPoint(point, bIncludeOn?): boolean

判断输入点是否位于面上。

Whether the input point is in the face2d.

Parameters​

NameTypeDescription
pointKPoint2d输入点。 The input point.
bIncludeOn?boolean是否考虑边界, 默认不考虑。 Whether to consider the case: input point is on the face2d's boundary. True means the point is on the boundary of the face2d is also be think in face2d. Default value is false.

Returns​

boolean

返回输入点是否在面上。

Return true if the point is in face2d.

Defined in​

api.d.ts:8895


getContour​

▸ getContour(): KGeomLoop2d

获得外轮廓。

Get contour loop.

Returns​

KGeomLoop2d

返回外轮廓。

Return the contour loop.

Defined in​

api.d.ts:8830


getHoles​

▸ getHoles(): KGeomLoop2d[]

获得内轮廓。

Get hole loops

Returns​

KGeomLoop2d[]

返回内轮廓。

Return the hole loops.

Defined in​

api.d.ts:8840


isPositive​

▸ isPositive(): boolean

检查外轮廓是否逆时针。

Check whether face2d's contour is counter-clockwise.

Returns​

boolean

返回外轮廓的绕向是否为逆时针。

Return true if the the contour loop is counter-clockwise.

Defined in​

api.d.ts:8860


isValid​

▸ isValid(): boolean

检查该面是否有效,其中每一个内外轮廓均需都有效, 外轮廓包围所有内轮廓,所有内轮廓不相交。 外轮廓与内轮廓反向。

Whether the face2d is valid, including:

  • Each contour and hole is valid
  • Contour contains all holes and holes are not overlapped.
  • Contour and holes have opposite direction.

Returns​

boolean

返回face2d是否有效。

Return true if the face2d is valid.

Defined in​

api.d.ts:8875