Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 1.49 KB

File metadata and controls

43 lines (35 loc) · 1.49 KB

InsertVertex

Description

Inserts a new vertex into polygon or polyline. If the vertexType is nonzero, it will convert the objectHandle into a polyline.

PROCEDURE InsertVertex(
				objectHandle    : HANDLE;
				x               : REAL;
				y               : REAL;
				beforeVertexNum : INTEGER;
				vertexType      : INTEGER;
				arcRadius       : REAL);
def vs.InsertVertex(objectHandle, x, y, beforeVertexNum, vertexType, arcRadius):
    return None

Parameters

Name Type Description
objectHandle HANDLE Handle to the polygon or polyline
x REAL X-coordinate of the vertex to add
y REAL Y-coordinate of the vertex to add
beforeVertexNum INTEGER Vertex number before which the new vertex is to be inserted
vertexType INTEGER Vertex type of the new vertex: 0 =Corner; 1= Bezier; 2= Cubic; 3= Arc;
arcRadius REAL For arc vertices, the radius of the arc

Remarks

_c_, (2010.12.23) The routine also when used for adding an arc vertex needs a correction of the arc passed:

  • pass "0" --> a radius for arc on circle by three points will be autogenerated
  • pass anything else (custom radius): you need to convert the radius to mm: ** arcRadius := arcRadius / upi * 25.4;

It is not possible insert a vertex as type 4 (radius vertex). You must insert the vertex first, then use SetPolylineVertex to change the type to 4.

Version

Availability: from VectorWorks 10.0

Category