PGS shape union

Hello @matheplica,

It works here with this simple example that I conjured up:

import micycle.pgs.*;
import java.util.List;

PShape s, s1, s2;
boolean inward = true;

void setup() 
  {
  size(400, 400);

  s1 = createShape(RECT, 0, 0, 50, 50);
  s2 = createShape(TRIANGLE, 0, 0, 50, 25, 35, 80);

  s = new PShape();
  s = PGS_ShapeBoolean.union(s1, s2);
  
  shape(s, 100, 100);
  }
  
void draw()
  {
  background(0);
  shape(s1, 100, 50);
  shape(s2, 250, 50); 
  shape(s, mouseX, mouseY);
  }

image

Reference:

My first time using this library and can’t add more to this topic.

Can you provide a minimal example?

:)