Extracting BREPs for Outdoor walls from HB_object

Hello,
For a specific problem, I am trying to extract the BREPs or polyline curve boundaries for the Exterior walls with outdoor boundary condition. I am using default HB tools, like HB Label Faces, and trying some python script to extract the required outputs (I am quite new to python :sweat_smile:, so there might be errors). At this stage, I am first doing it for the walls, later on I will do a similar step for the windows and ultimately need, the ‘free’ exterior wall surface (remaining exterior walls without the apertures) for the next steps. Also, at this point, the input geometry is generated in the grasshopper, but this is a trial workflow, that will be applied to another workflow, where the geometry is supplied externally.
Issues:

  • Need BREPs to recreate geometries
  • Most relevant outputs are meshes, not good for simulations
  • Simple python script to match the boundary coundition and extract the relevant wireframes
  • Issue is that the list of value outputs and the list of output wireframes don’t match, and therefore the polylines picked using index from the value list,
    to search in the wireframe list don’t return relevant/consistent outputs
  • Ultimately need: Walls with boundary condition: outdoors (wireframe/polyline/curve/BREP only, but not mesh) for further operations
    Much appreciate if anyone has an answer, or knows a more efficient way of handling this (PFA some pics. I am having trouble to upload the .ghp file as a new user)

Thanks!

241118_TC2_Sim_Snip_02

hi @an_s4 does this code work for your purposes:


from ladybug_rhino.fromgeometry import from_face3d

geometry_ = []
for room in _rooms:
    for face in room.faces:
        if str(face.type) == 'Wall':
            if str(face.boundary_condition) == 'Outdoors':
                if face.punched_geometry:
                    geometry_.append(from_face3d(face.punched_geometry))

don’t forget to set the _rooms access to list


best
-trevor

1 Like