Now I need to find “good” locations for the dowel holes that will allow me to align my parts properly to form my milling stock ; the number of holes being at least 2, so that rotation is locked.
The idea is to create points that are both far appart and far from the edges, locally.
I was about to try the Kangaroo approach, as it smells like a form-finding problem, but I was wondering if there could be an easier way to get suitable hole locations, with random shapes.
Any ideas ? 230224_IMG_Section samples.3dm (84.2 KB)
Aha ! Creating slopes inwards from the boundaries ; good idea.
The examples I see are really squarish though.
Pufferfish has a “Extrude tapered” component, but it fails quite fast…
For more slices/layer you could do all the same but let kangaroo use a single sphere collide with all the points.
To tune layer<>layer interaction, temporary distance the layer each-other until sphere collision make the pins distance enough but not too much. Then re-project the points on their correct plane.
Can you give us clean data please? Surfaces in GH, not curves in Rhino or internalized curves in GH that have duplicates in two of the four branches. I’d rather not squander my time in data cleanup.
Here’s an idea for a different approach, using the polylabel script for finding the pole of inaccessibility I posted here.
It first gets this pole, then splits the curve where the largest circle touches, takes the larger part and gets the pole of that:
Yes - I usually find it simpler to work like this when dealing with a 2d problem - transform it to XY, do whatever process is needed, then transform back at the end.
OK, done, but I realize it’s working on curves individually.
If I try to place two curves in a branch (region with a hole), it falls apart.
In this post, it seemed to work though.
EDIT : Actually, it does work with regions that have holes ; it’s the rest of the definition that falls apart, as it’s not robust enough to deal with this kind of topology, I guess.
yes the script works for finding the pole on surfaces with holes, you just need to adjust the splitting part, since one cut won’t divide an annulus into separate regions. It’s not a big change - just add another splitting line.
No kidding! The white curves show the edges of the original surfaces, the extruded bits are the intersections between one layer and the next. I haven’t even tried to locate “dowels”. Code is a mess.
Don’t bother with the correspondence between stratas ; I’ve sorted that out already.
The issue is finding two “good” locations given a region, which may or may not have holes.