Boolean Operations

Overview

Boolean operations combine two or more shapes into a single vector result. The operation hides the source shapes, creates a new shape, and selects the result.

Boolean Operation API

editor.booleanOperation([shapeAId, shapeBId], 'union')

Supported operations:

  • union → merge all shapes
  • intersect → overlap only
  • subtract → subtract later shapes from the first
  • exclude → xor (symmetric difference)

Notes

  • Provide at least two shape IDs.
  • The result shape is marked with isBooleanResult metadata.
  • Source shapes are hidden, but their IDs are stored on the result for toggling.