Shape Operations
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:
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.
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.
PDF for code example
Use in conjunction with the code found https://gist.github.com/mako-team/e8c5686957e23256cf0e396ea19fa8fd