Skip to main content

Offset Polygon

Shrink or grow a polygon inside or outside the initiating shape with offset poly.

Written by Holly Conrad Smith

Use this when you want to shrink or grow a polygon inside or outside its original boundary within a flow, for example generating a setback zone or courtyard area.

Inputs

This node runs in Transform mode by default, so its 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, or switch this node to Exposed Inputs to get a connector for each setting.

Name

Abbreviation

Type

Access

Description

Input

I

Feature

Item

The input data

Transform

T

Object

Item

Transform controls (overridden by individual parameters)

Outputs

Name

Abbreviation

Type

Access

Description

Primary

P

Object

List

The primary output

How to:

  1. Add the Offset Polygon node and the Offset Polygon Transform node. Connect the transform's output to the Offset Polygon node's T connector.

  2. Click “edit defaults” to set the starting values

  3. Edit the settings and outputs in Properties

Connect the Offset Polygon Transform node

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

OR

Use the exposed inputs version of the Offset Polygon node, which has its own connector for each setting and needs no transform node.

Offset Polygon Transform settings object

The Offset Polygon 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 Offset Polygon node through the T connector. The object has type set to offsetPoly and the settings inside parameters. The values below are the built-in defaults.

{
"type": "offsetPoly",
"parameters": {
"delta": -5
}
}

The Offset Polygon 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 Offset Polygon Transform node and the T connector, and set Property to a path like parameters.delta.

Offset Polygon Transform Settings

  • Input offset distance

    • use negative distance to shrink

    • use positive distance to grow

  • Select corner type - round, square, or mitre

  • Line-based starting geometry provide a few additional settings:

    • With Holes: Self-Intersecting lines will either fill when creating enclosed polygon areas or not

    • Offset side: Offset left, right, or both

Use the Offset Polygon node with exposed inputs

The exposed inputs version of the Offset Polygon node has its own connector for each setting, so you can wire values straight in without a Offset Polygon Transform node.

  1. Right-click the Offset Polygon node and choose Expose inputs. Giraffe replaces it with the exposed inputs version.

  2. Connect your input to the Features connector.

  3. Type a value into each setting on the node, or connect a value to its connector. A Number node, a value from another node, or an Input Parameter all work.

  4. To let people using the flow change a setting in the Properties Palette, connect an Input Parameter to it. Settings without an Input Parameter stay hidden.

To get the exposed inputs version every time you add a node, turn on Show exposed inputs when creating new nodes (the gearbox icon) in the flow editor toolbar. Settings don't carry over when you switch between versions.

Offset Polygon exposed inputs

Connector

What it does

Features

The input polygon features to offset.

Distance

The distance to offset the polygons. Positive values offset outward, negative values offset inward.

Corners

The type of corner to create during the offset (Square, Round, Miter).

Miter Limit

The miter limit for corners when using the "Miter" corner type.

Holes

Whether to offset holes within the polygons.

Side

The side to offset the polygon: both sides, left side only, or right side only.

Offset Polygon Output

  • The output is a polygon offset by the distance specified

Did this answer your question?