VS:Poly: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
No edit summary
 
Line 40: Line 40:
==== Python ====
==== Python ====
<code lang="py">
<code lang="py">
vs.Poly(0,0,-0.5,1,0.5,1.5,2,1,1,-0.5)


# Or using a list:
points = [0,0,-0.5,1,0.5,1.5,2,1,1,-0.5]
vs.Poly(*points)
</code>
</code>
</sample>
</sample>

Latest revision as of 13:08, 2 September 2015

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

Description

Procedure Poly creates a polygon object in the document. Vertices of the polygon are specified by a parameter list of x1,y1 through xn,yn, which correspond to the coordinate locations of each vertex.

PROCEDURE Poly(
p :REAL);
def vs.Poly(p):
    return None

Parameters

p REAL

Example

VectorScript

Poly(0,0,-0.5,1,0.5,1.5,2,1,1,-0.5);

Python

vs.Poly(0,0,-0.5,1,0.5,1.5,2,1,1,-0.5)

# Or using a list:
points = [0,0,-0.5,1,0.5,1.5,2,1,1,-0.5]
vs.Poly(*points)

Version

Availability: from All Versions