So I’m writing a script to automate placing “pilot holes” in a simple square grid onto surfaces.
The rule is that the holes along “vertical” edges are offset X units off and the holes running along “horizontal” edges are offset Y units.
My initial pick would be a point on a surface, so the closest to it would be a “horizontal” edge and the next closest “vertical”.
That’s done to have a reference to what’s vertical and what’s horizontal.
Now, how to determine the rest of the horizontals and vertical edges in case if the surface is L or U or even + shaped using reference edges? By checking angles between reference and other edges? Or is there a better, more elegant way? Like checking for CO-LINEARITY of curves?
Also, the surfaces might or might not be parallel to the world top or planar. And the edges aren’t always 90 degrees to each other.