Shape Operations

Introduction

Mako's IDOMShape class offers methods to create a new shape from the interaction of two or more shapes. The operations are analogous to the Shape Modes offered by the Pathfinder tool in Adobe® Illustrator™.

https://gist.github.com/mako-team/e8c5686957e23256cf0e396ea19fa8fd is a simple Mako code sample that demonstrates these, using the attached PDF (see bottom of page). The results are shown below.

Unite

A new shape is created that combines the targets. The resulting shape looks like this:

Unite.png

Intersect

A new shape is created from the area where the two shapes overlap. The resulting shape is shown here; the color image helps explain the shape.

Intersect.png
image2019-6-20_12-41-41.png

Difference

A new shape is created from where the two shapes differ. Note the result, shown here, is not contiguous. The color image shows the effect of the equivalent "Minus Front" operation in Illustrator.

Difference.png
image2019-6-20_12-53-17.png

PDF for code example

IDOMShapeTest.pdf

Use in conjunction with the code found https://gist.github.com/mako-team/e8c5686957e23256cf0e396ea19fa8fd