Skip to main content

Boolean Operations

Physion supports the following 3 boolean operations:

  • Union
  • Difference
  • Intersection

Boolean operations are accessible via the the following toolbar:

Boolean Toolbar

When there's no active selection, the above toolbar will be disabled. To activate the options in the toolbar you need to select two or more objects in the Scene. Once the objects are selected, click on the desired option and the result of the corresponding operation will be applied.

info
  • Boolean operations will be disabled if the selection contains any joint nodes.
  • Any joints attached to the bodies participating in the boolean operation will be removed.

In all cases (union, differene and intersection) the result will be a single PolygonNode. The originally selected objects (that were used in the operation) will be removed from the Scene.

Note that the properties of the resulting object will be set from the input object with the lowest z-index (e.g. from the blue rectangle in the examples below)

Union

Boolean Operations - Union Example

The union command is used to combine the selected objects by the addition.

Difference

Boolean Operations - Difference Example

Use the difference command to subtract the selected object(s) from the base object.

info

The stacking order of the selected objects is important in this case. The lowest selected object will be the base of the subtraction. All objects above it will be substracted from it. You can use the Raise/Lower commands from the Edit Menu to modify the stacking order if required.

Intersection

Boolean Operations - Intersection Example

Use the intersection command to create an object from the intersection of two other bodies.