I’m beginning a project. The goal is to create a definition that will take literally any collection of orthogonal lines and output geometry for creating plywood shelves on a CNC router with an auto tool changer.
Phase 1 is figuring out how to go from this:
Problems solved so far in the definition attached:
-sort vertical lines and horizontal lines
-consolidate any resulting collinear lines into single line segments regardless of any overlaps
The 3d version above is a bake of 3d from my definition, but I had to manually alter the result to get butt joints to work out the way I wanted. Here is the definition. It includes a troubleshooting viewer that lets you look at each essential step of the process.
AutoOrthoShelfmk1.gh (45.5 KB)
It requires that you have this component:
Topologizer.gha (19 KB)
What I am asking for help with today:
I want to sort different types of line intersections so I can then decide how to butt joint, miter, or waffle notch the parts at that intersection. Ultimately I want to make options that will insert common flatpack hardware and/or create blind tenon joinery. I intend to share my progress every step of the way, because it drives me nuts that I can’t find any good open source definitions for CNC cabinetry.
Today’s actual task:
There are four conditions I am trying to sort, in each case maintaining a separate tree for the vertical and horizontal lines, so I can alter either later, however I like. In images below, condition is on the right, an example desired outcome is on the left:
If a vertical line endpoint equals a horizontal line endpoint.
If a vertical line end equals any point on a horizontal line that is not the horizontal line’s endpoint.
If a horizontal line end equals any point on a vertical line that is not the horizontal line’s endpoint.
If a horizontal line and vertical line intersect at neither of their endpoints.
Also, maybe it would be better to try to sort these after the curves have been offset to represent shelves, like below?
Is there already a definition floating around out there that does this task? If not, how would you suggest I do it?
Thanks. And thanks to the people who shared the definitions that I incorporated in order to get this far.