VS:ArcByCenter

From Vectorworks Developer
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

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

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

Example

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