Computes the intersection, union or difference of two polygons.
Does not manage holes yet, when union or difference operators are selected.
// sample use
const points0 = [{x: x0, y: y0}, ..., {x: xn, y: yn}];
const points1 = [{x: x0, y: y0}, ..., {x: xn, y: yn}];
const polygon0 = { vertices: points0 };
const polygon1 = { vertices: points1 };
const { polygons, mesh } = Pacem.Geometry.Utils.combinePolygons(polygon0, polygon1, 'intersect' /* 'union' | 'difference' */);
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.