Preparing files to CNC milling

I need to create 2D drawings of cabinets parts for CNC milling. I do this “manually”, by making a 2D drawing of the 3D part, and then adjusting its curves into different layers, which will be used for g-coding later.

It takes a lot of time and I’d like to automate this process. Do you have an idea of how to do it or even know a script?

I’m a grasshopper beginner. Thanks



03

More context please, a file with the final output of various conditions ideally.

The cutout is not gonna be that hard. You can sort the surfaces of the polysurface by area and then extract the edges of that surface. Then you need to find a way to check which curves are inside other curves.

Finding the pockets with matching depth shouldn’t be that hard but the tricky thing might be to come up with a logic that knows in which direction to increase the curves for the pocket, when it’s overlapping on the edge.

Here it is!Armario Alto tres gavetas - grasshopper forum.3dm (1.8 MB)

Thanks Siemen,
that puts me in a direction already!

This will take a few hrs (while i’m not a work) so it might get pushed to the weekend. I made good progress last night was on a pos laptop and it crashed, with work that will need to be recreated for explanatory purposes.

Thanks a lot Rickson!
I tried to follow Siemen’s ideas but couldn’t get any results yet

I’ll be using trees, which are an essential to Grasshopper and worth learning about in the interim.

Why do 7 and 10 mm pockets get put on the 8 mm pocket layer? Doesn’t make sense to try and automate converting your polysurfaces to curves if your polysurfaces are drawn wrong.

Oh yeah, you are right. Of course it doesn’t make sense. Curves must be separated into different layers.

Here’s a update. Requires Elefront and Pufferfish i believe.

Will fix the layouts and create the 2D info tomorrow, but you will get the point.

RE_Armario Alto tres gavetas - grasshopper forum.3dm (2.9 MB)
re_cnc output.gh (40.1 KB)

Still needs work; remove duplicate lines, sort-define mill pockets etc, this would be done on the branch level most likely – due to various requirements of the parts. The idea being you can create your own workflow from the various parts of this workflow.

RE_Armario Alto tres gavetas - grasshopper forum.3dm (2.8 MB)
re_cnc output.gh (49.8 KB)

Thanks a lot Rickson!
These has been busy days and I couldn’t take a look at your files yet. But I’ll do it as soon as possible