Researchers from Johns Hopkins University have developed a new 3D printing programming language called Time Code (T-Code). In a study published in Nature Communications, co-authors Sarah Propst and Jochen Mueller claim that T-Code enhances 3D printing speed and quality for complex multi-material parts.
Optimized for Direct Ink Writing (DIW) additive manufacturing, this new method uses a Python script to split traditional G-Code into two separate tracks. One track controls the 3D print path, while the other manages printhead functions.
Unlike G-Code, which executes tasks line-by-line, T-Code uses time to synchronize the 3D printer’s motion with key commands like material switching and flow adjustments. This eliminates common start-stop interruptions that slow production and cause defects, allowing for continuous, uninterrupted fabrication. As a result, 3D printing becomes faster without losing accuracy or detail, enabling advanced capabilities like smooth gradients and in-situ material changes.
According to the Baltimore-based researchers, their new method can handle complex designs that are difficult to achieve with G-Code. T-Code is said to have potential in various fields, including biology, electronics, mechanics, and optics. Propst and Mueller believe it could aid in producing 3D-printed wearable electronics and smart prosthetics. They also highlight T-Code's ability to speed up simultaneous manufacturing, offering promise for scaling mass customization.
Introducing T-Code: a new programming language for 3D printers
G-Code (short for Geometry Code) is the standard programming language for extrusion-based 3D printing. Originally developed for CNC machines in the 1950s, it uses line-by-line execution, which requires the 3D printer to slow down and stop when executing a new command. This slows the 3D printing process and can cause over-extrusion defects that affect accuracy and precision.
In single-material DIW printing, pauses usually occur only when the print path changes direction. However, when adding operations like material switching, extra commands must be inserted into the G-Code, disrupting the extrusion process and increasing the risk of defects. By separating auxiliary controls from movement, T-Code ensures the printhead functions smoothly without interrupting the 3D printing process.
How does T-Code work? First, a regular G-Code file with the desired locations for auxiliary commands is imported into Python. The researchers' script separates the movement and auxiliary commands into two groups while keeping them aligned.
Once separated, the movement commands are combined into a smooth, continuous 3D print path. Then, the Python script calculates the 3D printer's speed and velocity to create a velocity profile. It determines the exact timings for the auxiliary commands by mapping their locations on the velocity profile. These timestamps are formatted into a list, ready for execution. Finally, a signal from the 3D printer runs the script, synchronizing the printhead operations.
According to the researchers, this method helps create objects with better functional gradients. These are hard to achieve with conventional G-Code, which breaks the print path into separate steps. This means gradual changes, like varying filament thickness, material composition, or UV-curing intensity, are done in segmented steps, which can cause defects, longer print times, and less precision.
Using T-Code allows for smooth, continuous adjustments, creating multi-material gradients without interruptions. This new method can also produce objects with different densities or material compositions in specific areas. By precisely controlling material ratios during 3D printing, T-Code can create complex parts with varied mechanical, optical, or compositional properties.
This new approach is designed to integrate into existing 3D printers without changing the hardware or software. Its creators claim that T-Code enables low-cost, desktop 3D printers to "produce structures comparable in quality to high-end alternatives." Although optimized for DIW, the programming language is universally compatible with all applications, materials, and extrusion systems that use conventional G-Code. This includes FDM technology, high-viscosity inks, and volumetric extruders. It can even be used with CNC milling machines and lathes.
Propst and Mueller are confident that their approach will be valuable for creating scalable, multifunctional components across various fields, including biological, electrical, optical, and mechanical.