Simple CNC shelves definition, part 1 - How do I sort different types of line intersections?

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:

to 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:

Condition A:
If a vertical line endpoint equals a horizontal line endpoint.

Condition B:
If a vertical line end equals any point on a horizontal line that is not the horizontal line’s endpoint.

Condition C:
If a horizontal line end equals any point on a vertical line that is not the horizontal line’s endpoint.

Condition D:
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.

Hi,

This could be a way to do it :
discourse_AutoOrthoShelfmk1.gh (15.8 KB)

Clipper is required :

1 Like

http://chipchopdk.firebaseapp.com is made with GH and the underlying program does exactly what you want. Check out www.Chipchop.dk for seeing some examples of furniture made with the process. My definition also contains options for lids, drawers, back plates etc. I would like to show you what we got and hear about your idea. Please drop me an email on morten@chipchop.dk

In regards to you concrete problem I use a simple python program to sort the 4 different types of points/intersections. Something like:
If (a == 0 OR a == 1 AND b != 0)
Case 1
If (a != 0 OR a != 1 AND b != 0 OR b != 1)
Waffle case
Etc…

Thanks. I’m a designer and a builder with very little programming knowledge, so the python thing is going to be a bit of a challenge.

the link you shared is pretty much exactly the concept I’m aiming for, though I was hoping to add some more options than what I see there, like some of my preferred blind joinery for CNC.

I love it. I was also pretty sure that someone else must have thought of it before me.

Also, are you based in Copenhagen? I’m in Lund about once every year, and would love to see your work.

Yes I based in Copenhagen. Where are you from? You are more than welcome. I have attached what you need for this step I guess. You are gonna have one hell of a journey designing the definition, it has taken me many many nights and days.

orthomaker.gh (16.3 KB)

Yeah, I expect it’s going to be a major learning experience. I’m going at it in chunks, doing what I know I can do myself until I get stuck. Some things are easier than expected, others are harder. Usually what hangs me up is sorting, because I’m not a programmer. Getting geometry to go where I want is not much trouble.

I’m in New York City. My spouse has family in Lund so we fly in to Copenhagen at least once a year.

Thanks for your help!

There will be some Boolean splits eating up your computer.

Yes, sorting is also a challenge for me at times, sometimes you think that you finally got the hang of trees and then… BOOM your lost again.

Do you CNC yourself?

I do CNC myself. Shopsabre Pro 408 with tool changer, rotary axis, C-axis, and a pretty great vacuum table for processing sheets fast. Mostly using RhinoCAM.

Most of my work currently is props and sets for fashion shows and retail, but it’s frustrating because none of the things I build last very long. Looking to get more into furniture, interiors, architectural millwork.

We do those types of shows as well, it’s extremely lame to trash things after 2 days of expo. We try to convince our customers to build something they or we can reuse. But we do build shitty things in white MDF from time to time…

Do you have a website?

The chipchop project is something that we would very much like to share under some kind of license. So you would pay, XXX$ a month for being able to build furniture for your clients. We don’t believe in sending other than digital drawings around the world. Local production.

As said earlier the system is quite versatile and we have features for drawers (with automatic generation for the body of the drawer and holes for different runner lengths from hettich).
Inlay lids with hinges from hettich.
Back plates for hanging the furniture on a wall.
Everything is dynamic in regard to material thicknesses.
We do also have a system for producing rhino geometry, so for nesting and generating DXF files organized with layers that contains information about the different machine operations( pocket, inside cut, outside cut. We use cambam because we a primarily running Mac version of rhino and thereby don’t have rhinocam).

I’m honestly not sure how to make any of this work as a business model. I just decided to try to make a kind of parametric cabinet I thought would be cool.

There are companies like Mozaik that license a parametric cabinet maker for a monthly fee, but they seem to make their business model work by targeting millworkers who do a lot of very generic work. Their templates aren’t adventurous.

Maybe marketing to architects would work better?

No site up yet. I have too much work in my niche already so I perpetually procrastinate making a site.