PyANGKernel.GKPolygon¶
- class GKPolygon¶
A Polygon class. * Defined by a closed polyline, composed as a collection of consecutive * straight line segments.
Inherited by:
GKSuperNode,GKSimulationArea,GKProblemNet,GKPolygonWithHoles,GKPTZone,GKPTStation,GKGroup,GKExtrudedPolygon,GKCrosswalkArea,GKCentroidSynopsis¶
Methods¶
def
__init__()def
ensureClosed()def
getBrushColor()def
getBrushStyle()def
getTopTexture()def
isClockWise()def
isClosed()def
isFilled()def
reverseOrder()def
setBrushColor()def
setBrushStyle()def
setTopTexture()
Virtual methods¶
def
isNodeInside()
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
- class GKObjectsClassification¶
See
classifyObjects.
- __init__()¶
- __init__(l)
- Parameters:
l –
GKPoints
- __init__(arg__1)
- Parameters:
arg__1 –
GKPolygon
- classifyObjects(scenario)¶
- Parameters:
scenario –
GKGenericScenario- Return type:
.QSetGKGeoObject
Alias to classifyObjects(
eAll).Uses the scenario id for geometry configuration settings.
- classifyObjects(scenario, objsToClassify[, layer=None])
- Parameters:
scenario –
GKGenericScenarioobjsToClassify –
GKObjectsClassificationlayer –
GKLayer
- Return type:
.QSetGKGeoObject
Returns the objects that are inside the polygon (refer to description of “inside” below). If the objsToClassify is
eAll, all the graphical objects will be taken into account. Meanwhile, if it iseOnlyNodesAndSections, only sections and nodes will be classified. If a layer is specified (different than NULL) then only the objects in that layer will be returned. The scenario defines the geometry if it’s not NULL.A node is inside if the center line of any of its turns is totally inside the polygon. A section is inside if its entrance or exit point are inside the polygon or if any of its nodes is inside. So, it might happen that sections or nodes that are outside the polygon are considered “inside” because its turns are.
Uses the scenario id for geometry configuration settings.
Note that this behavior is different from
classifyObjectsInside- classifyObjectsInside(scenario[, layer=None])¶
- Parameters:
scenario –
GKGenericScenariolayer –
GKLayer
- Return type:
.QSetGKGeoObject
Returns the objects that are inside the polygon (refer to description of “inside” below ). If a layer is specified ( different than NULL) then only the objects in that layer will be returned
Objects must be totally inside the polygon to be considered in. Note that this behavior is different from
classifyObjectsandclassifyObjectsPartiallyInside, which will both return more objects than the ones entirely inside.- classifyObjectsPartiallyInside(scenario[, layer=None])¶
- Parameters:
scenario –
GKGenericScenariolayer –
GKLayer
- Return type:
.QSetGKGeoObject
Returns the objects that are inside the polygon (refer to description of “inside” below ). If a layer is specified ( different than NULL) then only the objects in that layer will be returned
Objects must be either partially or totally inside the polygon to be considered in. Note that this behavior is different from
classifyObjects, which may return more objects, and fromclassifyObjectsInsidewhich may return less objects.Uses the scenario id for geometry configuration settings.
- ensureClosed()¶
If the polygon is not closed, add a point equal to the first at the end
- getBottomTexture()¶
- Return type:
Gets the bottom face’s texture name
Gets the brush color to draw the polygon
- getBrushStyle()¶
- Return type:
Gets the brush style to draw the polygon
- getTopTexture()¶
- Return type:
Gets the top face’s texture name
Returns true if the points are in clockwise order
Returns true if the first and last point are equal. Needs at least 3 points
Returns true if the polygon is filled.
Classifies a node as in OUT (do not use) or IN (use) in a polygon. A node is IN if any of its turns is totally inside the polygon.
returns true if the node is IN and false if it’s OUT
Returns true if the section is classified as IN and its origin node is NULL or classified as OUT
Returns true if the section is classified as IN and its destination node is NULL or classified as OUT
- reverseOrder()¶
Reverses the order of the points. Changes order clockwise <-> counterclockwise
- setBottomTexture(textureName, horizontalReps, verticalReps)¶
- Parameters:
textureName – str
horizontalReps – int
verticalReps – int
Sets the bottom face’s texture name. The bottom face is the one looking at the negative z axis.
Sets the brush color to draw the polygon
- setBrushStyle(astyle)¶
- Parameters:
astyle –
BrushStyle
Sets the brush style to draw the polygon
- setTopTexture(textureName, horizontalReps, verticalReps)¶
- Parameters:
textureName – str
horizontalReps – int
verticalReps – int
Sets the top face’s texture name. The top face is the one looking at the positive z axis.