PyANGKernel.GKPolyline¶
- class GKPolyline¶
-
Inherited by:
GKPolygon,GKSuperNode,GKSimulationArea,GKProblemNet,GKPolygonWithHoles,GKPTZone,GKPTStation,GKGroup,GKExtrudedPolygon,GKCrosswalkArea,GKCentroid,GKImage3D,GKExtrudedPolyline,GKBezierCurve,GKTurning,GKSuperNodeTrajectory,GKSection,GKObjectConnection,GKCenConnectionSynopsis¶
Methods¶
def
__init__()def
getPenSize()def
getPenStyle()def
getPoint()def
getPoints()def
getSlope()def
hasSlope()def
nbPoints()def
push_back()def
setPenColor()def
setPenSize()def
setPenStyle()
Virtual methods¶
def
add()def
addPoint()def
addPointAt()def
canBeJoined()def
getNbSelPoints()def
getPenColor()def
join()def
length2D()def
length3D()def
prepend()def
removePoint()def
removePoints()def
setPoint()def
setPoints()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Array of points defining a polyline.
- PyANGKernel.GKPolyline.gcMinimumLength¶
- PyANGKernel.GKPolyline.gkDefaultPolylineColor¶
- __init__()¶
- __init__(l)
- Parameters:
l –
GKPoints
- __init__(rhs)
- Parameters:
rhs –
GKPolyline
Add points at the end of this polyline
Adds a point to the polyline
Adds a point to the polyline at the desired position
- canBeJoined(pol)¶
- Parameters:
pol –
GKPolyline- Return type:
Return true if “this” and “pol” can be joined in a single object. In this case if both are polylines.
Can a new point at position “pos” be added?
- changeDirection()¶
Changes the direction of this polyline, that is: changes the order of the points so the first one becomes the last one and so on.
Gets the number of the selected points
Gets the pen color to draw the polyline
Gets the size of the pen
Gets the pen size units
Gets the pen style to draw the polyline
Gets the
GKPointof the polyline at the desired positionGet the points that define the polyline in a vector of
GKPointIt returns the slope for the segment ‘segmentPos’ that is, between point at ‘segmentPos’ and point at ‘segmentPos+1’
- getSlope(pointPos1, pointPos2)
- Parameters:
pointPos1 – int
pointPos2 – int
- Return type:
It returns the slope for the segment definet by ‘pointPos1’ and ‘pointPos2’. Warning: Position must exist or crash.
It returns true if at least two point are at a different height. It returns false if all the points are at the same height.
Returns true if point p is located at the right side of this polyline (right going from the first point to the last one) and false if p is located at the left side
Returns true if the desired point is selected. Return false if the desired point is not selected
- join(pol, atStart)¶
- Parameters:
pol –
GKPolylineatStart – bool
Add “pol” information to this polyline either at the beginning (atStart = true) or at the end (atStart = false). Note that pol will not be moified and/or removed.
Returns the length of the polyline in 2D
Returns the length of the polyline in 2D from the first point to the given index point in the polyline
Returns the length of the polyline in 3D
Returns the length of the polyline in 3D from the first point to the given index point in the polyline
Gets the number of points in the polyline
Add points at the beginning of this polyline
STL like interface for adding points to the back.
- removePoint(pos)¶
- Parameters:
pos – int
Removes the desired point in the polyline
- removePoints(nbPoints, atStart)¶
- Parameters:
nbPoints – int
atStart – bool
Removes
nbPointsfrom this polyline either at the beginning (atStart = true) or at the end (atStart = false).- selectAllPoints()¶
Selects all the points contained in the polyline
Sets the pen color to draw the polyline
- setPenSize(size)¶
- Parameters:
size – float
Sets the size of the pen
Sets the pen size units
Sets the pen style to draw the polyline
Sets the values of a point in a desired position
- setPointSelected(p, value)¶
- Parameters:
p – int
value – bool
Changes the selection status of a desired point
See also
Constructs the polyline using the given
GKPointsas the new definition points- unselectAllPoints()¶
Unselects all the points contained in the polyline