Source code for viiapackage.supports.shallow_foundation.remove_supports

### ===================================================================================================================
###   Remove shallow foundation supports
### ===================================================================================================================
# Copyright ©VIIA 2024

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

# General imports
from __future__ import annotations
from typing import TYPE_CHECKING

# References for functions and classes in the viiaPackage
if TYPE_CHECKING:
    from viiapackage.viiaStatus import ViiaProject


### ===================================================================================================================
###   2. Function to remove all supports for shallow foundation
### ===================================================================================================================

[docs]def viia_remove_shallow_foundation_supports(project: ViiaProject): """ This function removes all shallow foundation supports that were previously modelled. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. Output: - All supports for shallow foundtions are removed. """ # Remove all point supports that are not piles in reversed order for support in reversed(project.collections.point_supports): if 'PAAL' not in support.name: support.remove_support() # Remove all line supports in reversed order for support in reversed(project.collections.line_supports): support.remove_support() # Remove all surface supports in reversed order for support in reversed(project.collections.surface_supports): support.remove_support()
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================