Skip to main content

Subdivide Rectangles

Subdivides rectangular polygons into a grid of dwellings with configurable spacing and dimensions

Written by Holly Conrad Smith

Use this when you want to divide a rectangular polygon into a grid of dwellings within a flow, for example generating a terrace or apartment grid with configurable spacing and dimensions. (Often used with Skeleton editor)

Inputs

This node's settings come from the paired Transform node through the T connector. You can't wire a value straight into a single setting. To drive one setting from your flow, override it with a Write Property node between the Transform node and T.

Name

Abbreviation

Type

Access

Description

Input

I

Feature

List

The input data

Transform

T

Object

Item

Transform controls (overridden by individual parameters) (optional)

Outputs

Name

Abbreviation

Type

Access

Description

Subdivisions

S

Feature

List

List of subdivisions

Excess

E

Feature

List

List of excess features

Points

P

Feature

List

List of points

Blocks

B

Feature

List

Room points carrying the block chosen for their dwelling

Warnings and errors

Message

Cause

Fix

No input provided to subdivideRects

Nothing is connected to the input, or the connected node returns no geometry.

Connect a polygon to the input, and check that the upstream node is returning geometry.

No features were generated. Please check the parameters.

The settings produced no units, for example dwelling sizes larger than the rectangles.

Lower the dwelling sizes or check the dwelling mix in the transform settings.

How to

  1. Add the subdivide rectangles node

    1. connect the Subdivide Rectangles Transform to the T connector

    2. edit the settings in the transform by clicking "edit defaults"

  2. Connect the S and E outputs to a write features to generate the subdivisions and excess polygons.

    1. Or, connect the outputs to another node to continue processing.

    2. Note, the outputs generate lists of geometries. Use a map node to process each geometry if necessary for additional commands.

Connect the Subdivide Rectangles Transform node

The Subdivide Rectangles node needs the Subdivide Rectangles Transform node connected to its T connector to use your settings. Without it, the Subdivide Rectangles node runs on Giraffe's built-in default settings, and you can't change any of them in Edit Defaults or the Properties Palette.

Subdivide Rectangles Transform settings object

The Subdivide Rectangles Transform node creates a set of inputs in the Properties Palette for anyone using the flow to fill out. It converts those inputs into a plain JSON object and sends it to the Subdivide Rectangles node through the T connector. The object has type set to subdivideRects and the settings inside parameters. The values below are the built-in defaults.

{
"type": "subdivideRects",
"parameters": {
"mode": "area",
"dwellings": [ ... ],
"excessUsage": "Core"
}
}

The Subdivide Rectangles Transform settings in the Properties Palette show lengths, areas, and volumes in your project units. The JSON always stores them in meters, square meters, and cubic meters, so a value you write into it with Write Property must use those units too.

To drive one setting from elsewhere in your flow, override it with a Write Property node. Put Write Property between the Subdivide Rectangles Transform node and the T connector, and set Property to a path like parameters.stretch.

Subdivide Rectangles Settings

The Subdivide Rectangle Transform automatically adds all of the necessary settings to the flow. You can edit them from the properties Palette to adjust the flow results.

  1. Mode

    1. area: calculates unit sizes by overall area

    2. width: sets each dwelling's size as a width. With Stretch on, units only grow to fill the run, so the width you enter is the minimum. With Stretch off, units stay at exactly that width.

  2. Dwellings

    1. Set the dwelling sizes

    2. Set the dwelling mix with the number spinner or the slider

    3. Add more dwellings

    4. Delete a dwelling

    5. Adjust the dwelling order by dragging a card

  3. Stretch

    1. Toggle on to fill the entire run with units (stretch units to fit)

    2. Toggle off to fill excess with the excess usage

  4. Excess

    1. Pick the usage to be applied to excess when "stretch" is toggled off.

    2. Defaults to "Core".

  5. Edit Mode

    1. Toggle on edit mode to detail edit units

  6. Reset

    1. Reset everything to the default.

Output

The outputs are:

  • Subdivisions (S[]): These are the units designated in the dwellings section

  • Excess (E[]): The excess left over when stretch mode is toggled off.

  • Points (P[]): A list of points.

  • Blocks (B[]): Room points carrying the block chosen for their dwelling.

Use with the Skeleton Editor

The Subdivide Rectangles node is almost always paired with the Skeleton Editor node. The Skeleton Editor generates the residential massing, with corners, corridors, end caps, and enclosures. The Subdivide Rectangles node fills in the units along the edges.

The Subdivide Rectangles node sets unit sizes and mix. The Skeleton Editor controls where units go. To remove the units on the sides facing an enclosure, select the building, press Shift + A, click the enclosure edit control, and turn on Remove Inner Units.

Example: wrap-style development

In a wrap development, apartments wrap around a central parking garage. Draw the skeleton so it creates an enclosure in the middle. Set the enclosure's usage to Carpark - Multi-Deck and turn on Remove Inner Units in the Skeleton Editor's edit mode (Shift + A). The Subdivide Rectangles node then fills only the outer edges with units, and the garage stays clear.

In detail edit mode, use shortcut shift+a multiple times to cycle through detail mode on different flow nodes

Set up the enclosure and its usage in the Skeleton Editor.

Did this answer your question?