Here is something a bit different. The other day, by mistake I right-clicked on a c2d file, and it opened in my text editor. I was cursing and about to close the file but then saw that the content was clear text in a familiar (JSON) formatting. About 0.1 seconds later, my software coding itch needed scratching, and I started thinking about generating c2d files.
So I wrote this Python script that generates a c2d file describing a grid of square shapes, with vertical and horizontal slots in between:
And generates associated toolpaths:
- deep pockets for the vertical and horizontal slots
- one pocket toolpath per square, with a depth computed from a simple fun looking sine waveform function
And here is the result simulation:
The generated c2d file is here:
generated.c2d (242.1 KB)
Notes:
-
This is a 16x16 grid. I originally went for an 80x80 grid for fun, but Carbide Create was not ready to deal with this kind of abuse, and never finished loading the 5MB generated c2d file. For fun I checked how far I can push it, and 48x48 is the limit with my PC (it takes 5+minutes to open the file though…you can almost hear CC hurting ). I picked 16x16 since it is a size that I think would give a cutting time below 2h, whereas 48x48 at say 10 seconds per pocket would take many hours.
-
I wanted perfectly square shapes, so the pocket toolpath for each square is slightly larger than the square itself, to avoid rounded corners (hence the need for the vertical & horizontal slots)
-
the tools and feeds & speeds used in the generated file are not correct, this was not the point for this test.
-
Thank you Carbide Create developers, for using an open standard for the file format. I am pretty sure I will push this experiment further later to come up with more interesting generated designs.
Now if only I had some appropriately sized cutters to run this job for real on my Shapeoko…
EDIT:
- I tuned the script to have a reasonable runtime, so as to actually mill something generated this way
- What I have right now that is manageable is an 8x8 matrix and used a 1/4" endmill at relatively high feedrate (1905mm/min), and I chose to do a bell curve inside of the sine waveform (which does not look good on such a small size grid). It will look like this:
- not very spectacular but the only MDF I have on hand is 19mm thickness only, so I had to flatten things.