From an AI image to a file a CNC machine can cut: what I learned
I run a furniture factory in Egypt. Building Cre-Cra, an AI platform that takes furniture designs all the way to CNC files, taught me that the hardest part of "AI for manufacturing" is not the AI. The gap betwe
I run a furniture factory in Egypt. Building Cre-Cra, an AI platform that takes furniture designs all the way to CNC files, taught me that the hardest part of "AI for manufacturing" is not the AI.
The gap between a pretty picture and a machine that cuts
Every AI design tool I saw produced images. Beautiful renders. Accurate-looking cabinets. But a CNC machine does not cut images. It needs coordinates, kerf allowances, board dimensions, grain direction, and a DXF or G-code file your CAM software will accept.
I had customers who could use an AI tool to get a stunning kitchen render in minutes. Then they would spend two days figuring out how to actually build it. The gap is not inspiration; it is translation.
Why a cutting list is harder than it looks
A cutting list sounds simple: list every panel, give its dimensions, done. In practice there are several things that break this:
Grain direction. On cabinet doors and visible panels, grain must run the long way. If your software does not know that, it will suggest cuts that look fine on paper and look wrong in the showroom.
Edge banding. A panel is never just L x W. The CNC has to leave the right offset for the edge-banding strip on each exposed face. Miss this and panels do not fit.
Kerf. The blade removes material. On a single cut this is 3-4 mm. Across 60 cuts on a sheet, it compounds. A naive cutting list will tell you that 10 panels fit on a board; the actual answer is 9.
Board sizes. Suppliers in Egypt do not always stock the same 2800 x 2070 mm boards that European software assumes. Sizes vary. If your nesting engine uses the wrong sheet size, the output is useless.
Nesting: where the real savings are
Nesting is the problem of packing all your cut parts onto as few boards as possible to minimize waste.
Before I added the nesting engine to Cre-Cra, the factories I work with were manually arranging panels on a printed sheet sketch. Waste was typically around 33%. After running the same jobs through the optimizer, it dropped to 12%. On a job that uses 20 boards, that is roughly 4 boards saved. Over a month that is a real difference in material cost.
The algorithm I ended up using is a variant of the first-fit-decreasing bin-packing approach, constrained by grain direction and board dimensions. Getting it to output a DXF that maps correctly to the original part list took more time than the algorithm itself.
Exporting DXF and G-code: the mistakes I made
DXF is a surprisingly unfriendly format for automatic generation. The first version of my exporter produced files that opened in AutoCAD but had every panel as a separate closed polyline with no layer information. The CNC operator had to manually assign tool paths.
The fix was to organize output by layer: one layer per cut type (through cuts, pocket cuts, drilling), so the CAM software can apply the right tool path automatically. This change alone took the files from "needs an hour of setup" to "load and run."
G-code was harder. Different CNC controllers use different dialects. I ended up exporting DXF and letting the factory's CAM software handle the G-code conversion. If your machine uses Mach3, Fanuc, or a proprietary controller, test the DXF in your software before you commit to the format.
Building in Arabic
Arabic is right-to-left. Most UI frameworks handle this reasonably if you set the HTML dir attribute and pick your CSS carefully. The harder part was vocabulary. There is no settled Arabic term for "edge banding" or "kerf." I ended up using the terms the carpenters in my factory actually use, which sometimes means transliterations of English words and sometimes means Arabic words that do not appear in any software dictionary.
What I would do differently
I would start with real CNC files from day one. I spent months building a beautiful design tool before I tried to export a DXF. The first DXF I exported did not work. If I had started with the export format and worked backwards, I would have made better decisions about how to store geometry internally.
This is what runs behind Cre-Cra (crecra.co).
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.