Sets the attributes of the specified polyline vertex to the specified values.
PROCEDURE SetPolylineVertex(
obj : HANDLE;
vertexNum : INTEGER;
pX,pY : REAL;
vertexType : INTEGER;
arcRadiusDistance : REAL;
recalcBounds : BOOLEAN);def vs.SetPolylineVertex(obj, vertexNum, p, vertexType, arcRadiusDistance, recalcBounds):
return None| Name | Type | Description |
|---|---|---|
| obj | HANDLE | Handle to object. |
| vertexNum | INTEGER | Index (1-based) of vertex to be modified. |
| p | REAL | New X-Y coordinates of vertex. |
| vertexType | INTEGER | Type of vertex. |
| arcRadiusDistance | REAL | Radius of vertex corner (arc or radius vertex only). |
| recalcBounds | BOOLEAN | Recalculate object bounds. |
Sets the specified vertex of the referenced polyline object. Vertex type constant values are 0 - Corner, 1 - Bezier, 2 - Cubic, 3 - Arc, 4 - Radius
PROCEDURE Example;
{This will convert anything it can in the drawing to a polyline
(including rectangles, polygons, etc.), and then it will fillet
all of the corners with a radius of .015".}
CONST
kFilletRadius = .015";
VAR
cnt :INTEGER;
x, y :REAL;
vertexType :INTEGER;
vertexRadius :REAL;
criteria :STRING;
PROCEDURE FilletPolygon(h :HANDLE);
BEGIN
h := ConvertToPolyline(h);
FOR cnt := 1 to GetVertNum(h) DO BEGIN
GetPolylineVertex(h, cnt, x, y, vertexType, vertexRadius);
SetPolylineVertex(h, cnt, x, y, 3, kFilletRadius, TRUE);
END;
END;
BEGIN
criteria := '(ALL)';
ForEachObject(FilletPolygon, criteria);
END;
RUN(Example);gVTemp[2] := gV2[2];
gVTemp[3] := gV2[3];
FOR i := 2 TO gEdgeCount DO BEGIN
gVTemp := gVTemp + gVecArray[i];
SetPolylineVertex(gHPoly,i+1,gX + gVTemp[1],gY + gVTemp[2],0,0,FALSE);
END;
5, 8, 21: FOR ptIndex := 1 TO getvertnum(hTemp) DO BEGIN { Polygon, Freehand, Polyline }
GetPolylineVertex(hTemp, ptIndex, x1, y1, ptType, arcRad);
IF (ptType = 3) THEN SetPolyLineVertex(hTemp, ptIndex, x1*factor, y1*factor, ptType, arcRad*factor, TRUE)
ELSE SetPolyLineVertex(hTemp, ptIndex, x1*factor, y1*factor, ptType, 0, TRUE);
END;
edgeH := PolyLineOffset(gPathH,gDepth);
numV := getvertnum(edgeH)+1;
IF NOT(gIsClosed) THEN BEGIN
temp_v := gCorners[1]+gBisectors[1];
SetPolylineVertex(edgeH,1,temp_v.x,temp_v.y,0,0,TRUE);
temp_v := gCorners[gNumVert]+gBisectors[gNumVert];
SetPolylineVertex(edgeH,numV,temp_v.x,temp_v.y,0,0,TRUE);
END;vs.SetPolylineVertex(obj, 1, (0, 0), 'Example', 1.0, recalcBounds)For polylines:
For polygons:
Availability: from VectorWorks 8.5