An array of points to store polygon or path data. More...
A pointArray is a variable-length list of point vertices for paths, polygons, and similar shapes. The usual source is getPoints on an element: a box yields two corners, a polygon or path yields every vertex, a cellref or text yields the origin. You can also grow a list with append, attach, or attachPoint, or call static helpers such as circle, bezier2, coil, and spirale. Pass the array to addBox or addPolygon on cell, or read point(i) in a loop. size is the count; minimum and maximum are the bounding-box corners; length is the path length in database units. Chamfer, fillet, flip, and BSpline edit or derive geometry. drawingField getPoints returns the points entered with point or the mouse before box or path.
Example:
element *e = layout->drawing->currentCell->firstElement->thisElement;
if (e == NULL)
return 1;
pointArray pa = e->getPoints();
for (int i = 0; i < pa.size(); i++) {
point p = pa.point(i);
string sx, sy;
sx.setNum(p.x());
sy.setNum(p.y());
}
Creates an empty array of points.
Creates an array of points containing a copy of array.
Creates an array of points with the given size. New vertices start at the origin.
Modifies this array the same way cell addCornerAreaSelect does for selected polygons.
| Parameter: | |
|---|---|
| value1 | first corner-area value |
| value2 | second corner-area value |
| angleInt | optional angle mode; 0 is the default |
Adds p at the end of the array. The size increases by one. Identical to attachPoint. (introduced with release 20210215)
Adds a point with coordinates x, y at the end of the array. The size increases by one.
Adds p at the end of the array. The size increases by one.
Builds a second-order Bezier curve from pstart to pend with control point pbezier. maxDepth sets the iterations: each increase of one doubles the number of points. -2 uses the defaults from the setup.
| Parameter: | |
|---|---|
| pstart | start point |
| pend | end point |
| pbezier | control point |
| maxDepth | iteration depth; -2 uses the setup default |
Returns: a pointArray of the curve.

Builds a third-order Bezier curve from pstart to pend with control points pbezierstart and pbezierend. maxDepth sets the iterations. -2 uses the defaults from the setup.
| Parameter: | |
|---|---|
| pstart | start point |
| pend | end point |
| pbezierstart | first control point |
| pbezierend | second control point |
| maxDepth | iteration depth; -2 uses the setup default |
Returns: a pointArray of the curve.

Builds a B-Spline through the current vertices. If the first point is identical with the last point, a closed B-Spline is assumed.
Returns: a pointArray of the spline.
open and closed B-Spline, red entered pointArray, blue resulting path/polygon
Returns: the centre of the bounding box of the polygon.
Returns: the centre of gravity of the polygon.
Modifies this array the same way cell chamferSelect does for selected polygons.
| Parameter: | |
|---|---|
| value | chamfer length or resulting edge length, depending on type |
| type | 0 or 1, see the table below |
| angleInt | optional angle mode; 0 is the default |
| Option | Result |
|---|---|
| type 0 chamfer length is always the same value |
![]() |
| type 1 chamfer size differ on angle resulting length of edge is the same value |
![]() |
Builds a circle around center with radius. angelstep is the resolution in degrees per point. Zero uses the default circle resolution from the setup.
| Parameter: | |
|---|---|
| center | centre of the circle |
| radius | radius in database units |
| angelstep | degrees per point; 0 uses the setup default |
Returns: a pointArray of the circle.
Removes all items from the list. (introduced with release 20230121)
Builds a coil from p1 to p2 around center. angelstep is the resolution in degrees per point. Zero uses the default circle resolution from the setup. (introduced with release 20211010)
| Parameter: | |
|---|---|
| center | centre of the coil |
| p1 | start point |
| p2 | end point |
| turns | number of turns |
| angelstep | degrees per point; 0 uses the setup default |
Returns: a pointArray of the coil.

Builds an ellipse around center. rx and ry are the radii along x and y. angelstep is the resolution in degrees per point. Zero uses the default circle resolution from the setup.
| Parameter: | |
|---|---|
| center | centre of the ellipse |
| rx | radius along x |
| ry | radius along y |
| angelstep | degrees per point; 0 uses the setup default |
Returns: a pointArray of the ellipse.
Modifies this array the same way cell filletBezierSelect does for selected polygons. Corners are replaced by Bezier curves. type influences the size the same way chamfer does.
| Parameter: | |
|---|---|
| value | fillet size |
| type | size mode, same meaning as for chamfer |
| angleInt | optional angle mode; 0 is the default |

Modifies this array the same way cell filletRoundSelect does for selected polygons. Corners are replaced by circular curves. type influences the size the same way chamfer does.
| Parameter: | |
|---|---|
| value | fillet size |
| type | size mode, same meaning as for chamfer |
| angleInt | optional angle mode; 0 is the default |

Reverses the order of the points. The first point becomes the last, and so on.
Inserts p at index i. The size increases by one.
| Parameter: | |
|---|---|
| i | i |
| p | p |
Returns: the length of the polyline in database units. (introduced with release 20231231)
Returns: the upper-right corner of the bounding box.
Returns: the lower-left corner of the bounding box.
Returns: the point at index i.
Inserts value at the beginning of the list. (introduced with release 20260724)
Changes the size of the array. If size is larger than the current size, new points are added at the end. If it is smaller, points at the end are deleted.
Sets the coordinates of the point at index i to x and y.
| Parameter: | |
|---|---|
| i | index of the point |
| x | new x coordinate |
| y | new y coordinate |
Sets index i to p.
| Parameter: | |
|---|---|
| i | i |
| p | p |
Returns: the number of points in the array.
Builds a spiral from p1 to p2 around center. angelstep is the resolution in degrees per point. Zero uses the default circle resolution from the setup. The spiral always has a single turn; for several turns use coil.
| Parameter: | |
|---|---|
| center | centre of the spiral |
| p1 | start point |
| p2 | end point |
| angelstep | degrees per point; 0 uses the setup default |
Returns: a pointArray of the spiral.
