DFDeconstructBeam component

Contents

_images/icon12.png

DFDeconstructBeam component#

Deconstruct the DFBeam objects into semantic Rhino objects.

Inputs:

i_beams (ghdoc ,list)

The DFBeam objects to deconstruct.

Outputs:

o_side_faces

The side faces of as Breps of the beam.

o_joint_faces

The faces as Breps belonging to joints of the beam.

o_joint_ids

An integer indicating to which joint the joint faces are belonging to.

Code:

#! python3

import System

from ghpythonlib.componentbase import executingcomponent as component


class DFDeconstructBeam(component):
    def RunScript(self, i_beams: System.Collections.Generic.List[object]):
        o_side_faces, o_joint_faces, o_joint_ids = [], [], []

        for i_b in i_beams:
            o_side_faces = [f.to_brep_face() for f in i_b.side_faces]
            o_joint_faces = [f.to_brep_face() for f in i_b.joint_faces]
            o_joint_ids = [f.joint_id for f in i_b.joint_faces]

        return o_side_faces, o_joint_faces, o_joint_ids