Closed mathedu4all closed 6 months ago
Hi, @mathedu4all, Not exactly what you describe, but you can create 5 polygons and then unify them. If you already have one polygon with 5 faces, you can do following:
import {Polygon, BooleanOperations} from "@flatten-js/core"
let parts = polygon.toArray(); // create array of 5 polygons
let polygon1 = new Polygon();
for (const part of parts) {
polygon1 = BooleanOperations.unify(polygon1, part);
}
In the resulted polygon duplicated edges will be eliminated
Forgive me ignoring the 'unify' method, thanks a lot for your great contribution.
If it works for you, @mathedu4all , that is great! Thank you for collaboration
For example, can i construct the cross shape as polygon with 5 faces. and use some algorithm to merge these 5 faces as one face.
This is not a bug, but to check if this feature can be accomplish theoretically?