dragonfly.subdivide module

Utilities to interpret parameters for subdividing building masses.

dragonfly.subdivide.interpret_core_perimeter_subdivide(perimeter_depths, floor_count)[source]

Interpret a list of instructions for subdividing a building mass into floors.

Parameters:
  • perimeter_depths – An array of perimeter depth instructions that describe how a building floors should be divided into core/perimeter Rooms. The array should run from bottom floor to top floor. Each item in the array can be either a single number for the perimeter depth or a text string that codes for over how many floors a given perimeter depth should be applies. For example, inputting “2@4” will offset the first 2 floors 4 units. Simply inputting “@3” will make all floors offset at 3 units. Putting in sequential arrays of these text strings will offset floors accordingly. For example, the list [“1@5”, “2@4”, “@3”] will offset the ground floor at 5 units, two floors above that at 4 units and all remaining floors at 3 units.

  • floor_count – An integer for the number of floors within the building. The array output from this function will have a length equal to this number.

Returns:

An array of float values for perimeter depths, which can be used to offset perimeters over a building’s stories.

dragonfly.subdivide.interpret_floor_height_subdivide(floor_to_floor_heights, max_height, first_floor_height=0)[source]

Interpret a list of instructions for subdividing a building mass into floors.

Parameters:
  • floor_to_floor_heights – An array of floor-to-floor height instructions that describe how a building mass should be divided into floors. The array should run from bottom floor to top floor. Each item in the array can be either a single number for the floor-to-floor height or a text string that codes for how many floors of each height should be generated. For example, inputting “2@4” will make two floors with a height of 4 units. Simply inputting “@3” will make all floors at 3 units. Putting in sequential arrays of these text strings will divide up floors accordingly. For example, the list [“1@5”, “2@4”, “@3”] will make a ground floor of 5 units, two floors above that at 4 units and all remaining floors at 3 units.

  • max_height – The maximum height of the building, noting the z-value above which no new floor heights should be generated.

  • first_floor_height – The z-value of the first floor.

Returns:

A tuple with two elements

  • floor_heights – An array of float values for the floor heights, which can be used to generate planes that subdivide a building mass.

  • interpreted_f2f – An array of float values noting the distance between each floor. Note that, unlike the input floor_to_floor_heights, this array always has float values and is the same length as the floor_heights.