An array of points to store polygon or path data. More...
This class stores an array of class point. The size of the array can be adjusted at runtime and has no limitation. It can be used to create paths, polygons or other shapes.
Example:
pointArray pa=l->thisElement->getPoints();
string sx,sy;
for (i=0; i<pa.size(); i++){
p=pa.point(i);
sx.setNum(p.x());
sy.setNum(p.y());
}
See also: class point, class drawingField
Creates an empty array of points.
Creates an array of points containing a copy of array
Creates a array of points with the given size.
Modifies a pointArray in the same way as cell::addCornerAreaSelect it does for selected polygons.
Add the point p to the end of the pointArray. The size of the array will be increased. This method is identical with attachPoint and was introduced with release 20210215 to get an identcal syntax with other list classes.
Add a point with the cooridinates (x,y) to the end of the pointArray. The size of the array will be increased.
Add the point p to the end of the pointArray. The size of the array will be increased.
Returns: a pointArray with the shape of a bezier curve in second order. maxDepth will set the iterations. An increase of one will double the number of points. A value of -2 will use the defaults from the setup. (introduced with release 20190807)
Returns: a pointArray with the shape of a bezier curve in third order. maxDepth will set the iterations. An increase of one will double the number of points. A value of -2 will use the defaults from the setup. (introduced with release 20190807)
a B-Spline is created and returned, if the first point is identical with the last point a closed B-Spline is assumed. (introduced with release 20190202)
open and closed B-Spline, red entered pointArray, blue resulting path/polygon
Returns: the center of of the bounding box of the polygon (introduced with release 20180623)
Returns: the center of gravity of the polygon
Modifies a pointArray in the same way as cell::chamferSelect it does for selected polygons.
Option | Result |
---|---|
type 0 chamfer length is always the same value |
|
type 1 chmafer size differ on angle resulting length of edge is the same value |
Returns: a pointArray with the shape of a circle. angelstep will set the resolution in deg/point. In case zerro is entered the default circle resultion from the setup is used. (introduced with release 20190807)
Removes all items from the list. (introduced with release 20230121)
Returns: a pointArray with the shape of a coil from p1 to p2. angelstep will set the resolution in deg/point. In case zerro is entered the default circle resultion from the setup is used. (introduced with release 20211010)
Returns: a pointArray with the shape of a ellipse. rx and ry will set he radius in the x- and y-axis. angelstep will set the resolution in deg/point. In case zerro is entered the default circle resultion from the setup is used. (introduced with release 20190807)
Modifies a pointArray in the same way as cell::filletBezierSelect it does for selected polygons. Corners are replaced by Bezier curves. type will influence the size in the same way chamfer does.
Modifies a pointArray in the same way as cell::filletRoundSelect it does for selected polygons. Corners are replaced by circular curves. type will influence the size in the same way chamfer does.
will flip the order of the point in the array. First point will get last point, etc.
Inserts the point p at position i into the array. The size of the array will be increased.
Returns: the length of the pointarray in database units (introduced with release 20231231)
Returns: the upper right corner of the bounding box of the polygon (introduced with release 20180623)
Returns: the lower left corner of the bounding box of the polygon (introduced with release 20180623)
Returns: the point at the position i
Changed the size of the array. If size is bigger than the current size of the array, new points will be added to the end of the array. If it is smaller, points at the end will be deleted.
Changed the coordinates of the point at position i to the values x and y.
Sets the point p at the index of i.
Returns: the size of the array
Returns: a pointArray with the shape of a spiral from p1 to p2. angelstep will set the resolution in deg/point. In case zerro is entered the default circle resultion from the setup is used. The spiral has always a single turn. For multi turn spiral please use coil instead. (introduced with release 20190807)