Source code for viiapackage.geometries.viia_get_geometry_group

### ===================================================================================================================
###   Function to collect the geometry-group based on VIIA naming conventions
### ===================================================================================================================
# Copyright ©VIIA 2024

### ===================================================================================================================
###    1. Import modules
### ===================================================================================================================

# No imports required

### ===================================================================================================================
###    2. Get geometry-group based on geometry-name
### ===================================================================================================================

[docs]def viia_get_geometry_group(geometry_name: str) -> str: """ Function to find the geometry-group of the element geometry based on the name of the geometry. The groups are related to the shape type it is applied on. All information needed is in the name of the geometry (VIIA naming convention). Input: - geometry_name (str): Name of the element geometry to be created (VIIA naming convention). Output: - Returns the name of the geometry-group based on VIIA naming conventuon, returned as string. """ # Element geometries for shapes of type surface reinforcement for name_part in ['WAP', 'CFRPMESH']: if name_part in geometry_name: return 'surface-reinforcements' # Element geometries for shapes of type surface for name_part in ['WAND', 'VLOER', 'FOS']: if name_part in geometry_name: return 'surfaces' # Element geometries for shapes of type line for name_part in ['BALK', 'STAAF', 'KOLOM', 'LATEI', 'PAAL', 'LIJN']: if name_part in geometry_name: return 'lines' # Element geometries for shapes of type line reinforcement without bond slip for name_part in ['EmbeddedPile']: if name_part in geometry_name: return 'line-reinforcements' # Element geometries for shapes of type line reinforcement with bond slip for name_part in ['CFRPSTRIP']: if name_part in geometry_name: return 'line-reinforcements-with-bondslip' # Element geometries for shapes of type point for name_part in ['VEER', 'ROTVEER', 'PUNTIF', 'PUNTMASSA']: if name_part in geometry_name: return 'points'
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================