i hacked together some of the stuff you got in here for my generative lasercutting/3d printing/papercutting stuff, but it was always hacky and not consistent. will try to redo my patches with your library and report back.
Now updated to 1.0.3
-Consistent GetBounds method for Polygon and PolyPath
-Added Splitting Circles Example patch kindly contributed by ██ ██
-Added option to Compartments operation to avoid including outer stroke
“how to extrude a polypath in 3d” contains an obsolete version of “extruded polygon.”
“how to render a polypath plane in 3d” is missing the “polygonPlane”
I did not look through all the help patches (yet) but thank’s lot for sharing! This is quite extensive, and especially the distance and intersection tools are pretty cool. snap on path, nearest point… those will be really fun to use!
Yes but I think it makes sense in VL.Polytools as a collection of functions that build on skia and make solving geometric problems easier. It’s also much easier for me to just include it then to mess about with a pull request to VL.Skia (If it’s even on github?)
The data inside a polygon is the list of points that make a shape with straight edges. So this list also simply describes the outline of the shape.
The data inside a polypath is indeed the control points. For straight sections will be equivalent to polygon but for curves they are bezier type control points (although possibly one of the verbs is not bezier, don’t remember. In any case it’s control points)
So you got the right idea already: to get a list of points from a polypath that is the outside shape you must sample the curves and ‘flatten’ it into a polygon. You can see there is trade offs here with resolution and losing the vector information.
I’m not near a laptop to find the exact nodes but I think they are in the helppatch ‘convert a polypath to a polygon’