Skip to content

Latest commit

 

History

History
60 lines (53 loc) · 1.22 KB

File metadata and controls

60 lines (53 loc) · 1.22 KB

ArcByCenter

Description

Creates an arc using a center point, the radius, a start angle, and a sweep.

PROCEDURE ArcByCenter(
				x          : REAL;
				y          : REAL;
				radius     : REAL;
				startAngl  : REAL;
				sweepAngle : REAL);
def vs.ArcByCenter(x, y, radius, startAngl, sweepAngle):
    return None

Parameters

Name Type Description
x REAL X-coordinate of the center point
y REAL Y-coordinate of the center point
radius REAL Radius of the arc
startAngl REAL Starting angle of the arc
sweepAngle REAL Sweep angle of the arc

Examples

VectorScript

PROCEDURE Example;
VAR
x, y, radius, startAngle, sweepAngle :REAL;
BEGIN
GetPt(x, y);
radius := 3;
startAngle := 0;
sweepAngle := 90;
ArcByCenter(x, y, radius, startAngle, sweepAngle);
AlrtDialog(Concat(GetType(LNewObj)));
END;
RUN(Example);

Python

def PickPointCallback(pt):
	radius = 3
	startAngle = 0
	sweepAngle = 90
	vs.ArcByCenter(pt[0], pt[1], radius, startAngle, sweepAngle)
	vs.AlrtDialog(vs.Concat(vs.GetType(vs.LNewObj())));
vs.GetPt( PickPointCallback )

Version

Availability: from VectorWorks10.0

Category