Mechanical design and manufacturing workflows conventionally begin with conceptual design, followed by the creation of a computer-aided design (CAD) model and fabrication through material-extrusion (MEX) printing. This process requires converting CAD geometry into machine-readable G-code through slicing and path planning. While each step is well established, dependence on CAD modeling remains a major bottleneck: constructing object-specific 3D geometry is slow and poorly suited to rapid prototyping. Even minor design variations typically necessitate manual updates in CAD software, making iteration time-consuming and difficult to scale. To address this limitation, we introduce Image2Gcode, an end-to-end data-driven framework that bypasses the CAD stage and generates printer-ready G-code directly from images and part drawings. Instead of relying on an explicit 3D model, a hand-drawn or captured 2D image serves as the sole input. The framework first extracts slice-wise structural cues from the image and then employs a denoising diffusion probabilistic model (DDPM) over G-code sequences. Through iterative denoising, the model transforms Gaussian noise into executable print-move trajectories with corresponding extrusion parameters, establishing a direct mapping from visual input to native toolpaths. By producing structured G-code directly from 2D imagery, Image2Gcode eliminates the need for CAD or STL intermediates, lowering the entry barrier for additive manufacturing and accelerating the design-to-fabrication cycle. This approach supports on-demand prototyping from simple sketches or visual references and integrates with upstream 2D-to-3D reconstruction modules to enable an automated pipeline from concept to physical artifact. The result is a flexible, computationally efficient framework that advances accessibility in design iteration, repair workflows, and distributed manufacturing.
翻译:机械设计与制造工作流通常从概念设计开始,随后构建计算机辅助设计(CAD)模型,并通过材料挤出(MEX)打印进行制造。这一过程需要将CAD几何通过切片和路径规划转换为机器可读的G代码。尽管每个步骤都已成熟,但对CAD建模的依赖仍是主要瓶颈:构建面向特定物体的三维几何建模速度缓慢,难以适应快速原型开发。即使微小的设计改动也通常需要在CAD软件中手动更新,导致迭代耗时且难以扩展。为解决这一局限,我们提出Image2Gcode——一种绕开CAD阶段、直接从图像和零件图纸生成打印机就绪G代码的端到端数据驱动框架。该框架无需显式三维模型,仅需手绘或捕获的二维图像作为输入。首先从图像中提取切片级结构特征,然后对G代码序列应用去噪扩散概率模型(DDPM)。通过迭代去噪过程,模型将高斯噪声转化为包含相应挤出参数的可执行打印运动轨迹,建立起从视觉输入到原生工具路径的直接映射。通过直接从二维图像生成结构化的G代码,Image2Gcode消除了对CAD或STL中间文件的依赖,降低了增材制造的入门门槛,加快了从设计到制造的循环。该方法支持基于简单草图或视觉参考的按需原型制造,并与上游二维到三维重建模块集成,实现从概念到实物的自动化流水线。最终形成一个灵活且计算高效的框架,提升了设计迭代、修复工作流和分布式制造中的可及性。