DFRemoveBeam component

Contents

_images/icon26.png

DFRemoveBeam component#

Remove a single or list of beams by providing their assembly indexes.

Inputs:

i_assembly (ghdoc ,item)

The DFAssembly object to which remove the beams.

i_idx_2_remove (int ,list)

The list of indexes assembly of the beams to remove.

Outputs:

o_assembly

The new DFAssembly with less beams.

Code:

#! python3

import System

from ghpythonlib.componentbase import executingcomponent as component


class DFRemoveBeam(component):
    def RunScript(self,
            i_assembly,
            i_idx_2_remove: System.Collections.Generic.List[int]):

        if i_assembly is None or i_idx_2_remove is None:
            return None

        o_assembly = i_assembly.deepcopy()
        for idx in i_idx_2_remove:
            o_assembly.remove_beam(idx)

        return o_assembly