Troubles about creating hulls
Hello, I've translated the functions in geometryutil.js into C# for a course project. The problem is that sometimes the polygonHull function may lose several parts in the process. I've been captured that overlapping points with the one on the upper half of A and the other is in the lower cause the problem. Still, there are lots of problems cases I cannot handle. I wonder if there is another feasible and reliable mean to create the hull of the parts? thx in advance
ah, sorry about that. That function was used in a previous version but I haven't gotten around to removing it. You might notice that it's not actually referenced anywhere else in the code.
there are a lot of edge cases that this function fails to handle, unfortunately. I don't know of any robust implementations for this problem, but I think a better way to approach it would be to first get the convex hull, then iteratively adding points on the convex edges.
I've noticed that there is a clipper class library in the util file. Is the SVGnest using this library to connect the NFPs to iteratively placing parts?
yes the boolean operations are done with jsclipper
it seems that double coordinates have to be trasferred into int before being processed in jsclipper?