Source code for viiapackage.supports.pile_foundation.remove_supports

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

# 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


### ===================================================================================================================
###   1. Function to remove all supports for pile foundation
### ===================================================================================================================

[docs]def viia_remove_pile_foundation_supports(project: ViiaProject): """ This function removes all pile foundation supports that were previously modelled. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. Output: - All supports for pile foundtions are removed. """ # Remove all point supports of piles for support in reversed(project.collections.point_supports): if 'PAAL' in support.name: support.remove_support() # Remove all pile shapes for pile in reversed(project.collections.piles): pile.remove_shape() # Remove all pile parts for part in reversed(project.collections.parts): if 'PAAL' in part.name: part.remove() # Remove all springs for spring in reversed(project.collections.springs): if 'PAAL' in spring.name: spring.remove_connection() for rebar in reversed(project.collections.line_reinforcements): if 'PAAL' in rebar.name: rebar.remove_shape()
### =================================================================================================================== ### 2. End of script ### ===================================================================================================================