跳到主要内容

IDP.Math.KGeomLib.createArc2dByTwoPointsAndRadius() method

创建给定半径并经过给定起点和终点的圆弧。 当给定圆弧起点、终点和半径之后,总共有4种选择,通过isMinorArc和isCCW两个参数再来决定是哪一种选择。 . . . . . . . .e . . . . . . . . . . . . . . . . . . .s . . . . . . .

Create an arc by start end points and the radius. There will be 4 choices if the start end points and radius of the arc are determined, and the other two parameters isMinorArc and isCCW will determine which one.

Signature:

createArc2dByTwoPointsAndRadius(startPoint: KPoint2d, endPoint: KPoint2d, radius: number, isMinorArc: boolean, isCCW: boolean): KArc2d;

Links: createArc2dByTwoPointsAndRadius(startPoint: KPoint2d, endPoint: KPoint2d, radius: number, isMinorArc: boolean, isCCW: boolean): KArc2d;

Parameters

Parameter

Type

Description

startPoint

KPoint2d

圆弧的起点。

The startPoint point of the 2D arc.

endPoint

KPoint2d

圆弧的终点。

The end point of the 2D arc.

radius

number

圆弧半径。 如果半径小于起点和终点之间距离的一半,则取这个距离的一半。也就是圆弧会是经过起点和终点的一个半圆弧。

The radius of the 2d arc. If radius is smaller than the half distance from startPoint to endPoint, it will return a semicircle arc whose diameter is the distance.

isMinorArc

boolean

当值为true时,表示的是起点和终点之间小的那两段圆弧其中之一。当值为false时,表示的是起点和终点之间大的那两段圆弧其中之一。

true: minor arc; false: major arc

isCCW

boolean

圆弧是否是逆时针方向。 如果圆弧是逆时针方向,则表示圆弧是圆上从起点开始沿逆时针方向到达终点的那一段圆,反之则表示圆上另外一侧的一段。

Whether the 2d arc is counter clockwise from startPoint to endPoint. True means the counter clockwise segment of the circle from startPoint to endPoint. False means the clockwise segment of the circle from startPoint to endPoint.

Returns:

KArc2d

圆弧。

The 2d arc.