RAGeometryCollection
Last update: 17.07.2025class RAGeometryCollection
Rocky PrePost Scripting wrapper for the collection of geometries in a project.
The class represents the “Geometries” item on the project data tree. To get the RAGeometryCollection
from a RAStudy, use:
geometry_collection = study.GetGeometryCollection()
This class contains methods to iterate and retrieve the geometries in a given project, manipulating the collection as a regular Python list, e.g.:
for geometry in geometry_collection:
print(geometry.GetName())
feed_conveyor = geometry_collection[1]
inlet = geometry_collection.GetGeometry('Inlet 01>')
To create the different kind of geometries (conveyors, inlets and custom geometries), see
RAStudy.
Methods:
| Name | Description |
|---|---|
GetBoundingBox(time_step[, force_load]) |
Get the bounding box containing all geometries in this collection, at the given time. |
GetGeometry(geometry_name) |
Get a geometry from its name. |
GetGeometryNames() |
Get the names of the geometries in this collection. |
IterInletGeometries() |
Iterate over the inlet geometries. |
IterInputGeometries() |
Deprecated: Use IterInletGeometries() instead. |
IterSurfaces() |
Iterate over the surface geometries. |
IterSystemCouplingWalls() |
Iterate over the System Coupling walls geometries. |
IterWalls() |
Iterate over the walls geometries. |
RemoveGeometry(geometry) |
Remove the given geometry from the project. |
GetBoundingBox(time_step: coilib50.time.time_step_interface.ITimeStep | None, force_load: bool = False)
Get the bounding box containing all geometries in this collection, at the given time.
- Parameters:
- time_step (ITimeStep) –
- force_load (bool) –
- Rtype (FixedArray, FixedArray):
- Returns: The bounding box of all the geometries in the passed time step, or None if the box could not be computed.
GetGeometry(geometry_name)
Get a geometry from its name.
- Parameters: geometry_name (unicode) –
GetGeometryNames()
Get the names of the geometries in this collection.
IterInletGeometries()
Iterate over the inlet geometries.
IterInputGeometries()
Deprecated: Use IterInletGeometries() instead.
IterSurfaces()
Iterate over the surface geometries.
IterSystemCouplingWalls()
Iterate over the System Coupling walls geometries.
IterWalls()
Iterate over the walls geometries.
RemoveGeometry(geometry: rocky30.plugins.api.ra_base_geometry.RABaseGeometry | str | None)
Remove the given geometry from the project.