Research

Is T-Code the New G-Code? Researchers Develop New Programming Language

Researchers from John Hopkins University have developed a new 3D printing programming language called Time Code (T-Code). Outlined in a Nature Communications study, co-authors Sarah Propst and Jochen Mueller claim T-Code improves 3D printing speed and quality for complex multi-material parts. 

Optimized for Direct Ink Writing (DIW) additive manufacturing, this new approach uses a Python script to divide traditional G-Code into two separate tracks. One 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 create defects, enabling continuous, uninterrupted fabrication. As a result, 3D printing becomes faster without losing accuracy or detail, facilitating advanced capabilities like smooth gradients and in-situ material changes.

According to the Baltimore-based researchers, their new methodology can handle complex designs that are challenging to achieve with G-Code. T-Code reportedly offers potential across various fields, including biology, electronics, mechanics, and optics. Propst and Mueller believe it could support the production of 3D printed wearable electronics and smart prosthetics. They also emphasize T-Code’s ability to accelerate simultaneous manufacturing, offering promise for scaling mass customization.

Multi-color 3D printing with T-Code. Photo via Johns Hopkins University.
Multi-color 3D printing with T-Code. Photo via Johns Hopkins University.

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 employs line-by-line execution that requires the 3D printer to decelerate and stop when executing a new command. This slows the 3D printing process and can lead to over-extrusion defects that impact accuracy and precision. 

In single-material DIW printing, pauses usually happen only when the print path changes direction. However, when adding operations like material switching, additional commands must be inserted into the G-code, which disrupts the extrusion process and increases the risk of defects. By separating auxiliary controls from movement, T-Code ensures that the printhead functions smoothly without interrupting the 3D printing process.

How does T-Code work? First, a regular G-Code file containing the desired locations of auxiliary commands is imported into Python. The researcher’s script separates the movement and auxiliary commands into two groups while keeping them properly aligned. 

Once decoupled, separate movement commands are merged into a smooth, uninterrupted 3D print path. Next, the Python script calculates the 3D printer’s speed and velocity to generate a velocity profile. It then determines the exact timings of the auxiliary commands by mapping their location on the velocity profile. These timestamps are formatted into a list, ready for execution. Finally, a signal from the 3D printer executes the script, synchronizing the printhead operations.

According to the researchers, this approach facilitates the creation of objects with superior functional gradients. These are difficult to achieve using conventional G-Code, which breaks down the print patch into discrete steps. This means that gradual changes, such as varying the filament thickness, material composition, or UV-curing intensity, are executed in segmented steps, which can lead to defects, long print times, and reduced precision.

Using T-Code, however, unlocks smooth, continual adjustments that create multi-material gradients without stoppages. The new approach can also create objects with varying densities or material compositions in specific areas. By precisely controlling the material ratios during 3D painting, T-Code can produce complex parts with graded mechanical, optical, or compositional properties. 

The new approach has been designed for integration into existing 3D printers without altering the hardware or software. As such, its creators claim that T-Code allows low-cost, desktop 3D printers to “produce structures comparable in quality to high-end alternatives.” While optimized for DIW, the programming language offers universal compatibility with all applications, materials, and extrusion systems that work with conventional G-Code. This includes FDM technology, high-viscosity inks, and volumetric extruders. It can even be used alongside CNC milling machines and lathes.       

Propst and Mueller are confident that their approach will be valuable for producing scalable, multifunctional components across a wide range of applications, including biological, electrical, optical, and mechanical fields.      

3D printing with G-Code on the left and T-Code on the right. Photo via Johns Hopkins University.
3D printing with G-Code on the left and T-Code on the right. Photo via Johns Hopkins University.

Research enhances multi-material 3D printing

John Hopkins University is not the only institution exploring novel ways to optimize multi-material 3D printing. Last year, a team from Seoul National University developed a two-step process to create parts with specific gradient properties in FDM 3D printing.

Generally, users can’t achieve precise spatial control over material composition with FDM 3D printers because the nozzles can only extrude a single filament at a time. The South Korea-based team overcame this hurdle by fabricating a “digital material.” This was created by depositing different base materials layer by layer. During extrusion, these materials were homogenously blended in the nozzle, creating functional material gradients in the final part.     

The research paper, published in Nature, presented a novel blended FDM (b-FDM) process that successfully creates parts with significant property variations. For example, it can combine mechanical strength, electrical conductivity, and color in ways that traditional methods cannot. Importantly, this approach can be implemented using standard FDM 3D printers and filaments, providing a low-cost and accessible means of producing functional gradient materials.

Elsewhere, University of Illinois Urbana-Champaign and the Beckman Institute for Advanced Science and Technology developed a chameleon-inspired method for multi-color 3D printing. While most multi-color approaches require multiple materials, this method only needs a single ink, increasing efficiency and sustainability. 

The team’s UV-assisted-ink-writing approach allows colors to be altered “on the fly” during 3D printing. Changing the strength of the UV-light radiation as it cured an ink made from photo-cross-linkable bottlebrush block copolymers (BBCP) caused the polymers to crosslink in different ways. This translated to a broad spectrum of 3D printable colors, demonstrated by the team’s multi-color chameleon image and recreation of Vincent Van Gogh’s “Starry Night” painting.   

Who won the 2024 3D Printing Industry Awards?

Subscribe to the 3D Printing Industry newsletter to keep up with the latest 3D printing news.
 
You can also follow us on LinkedIn, and subscribe to the 3D Printing Industry Youtube channel to access more exclusive content.

Featured image shows Multi-color 3D printing with T-Code. Photo via Johns Hopkins University.

© Copyright 2017 | All Rights Reserved | 3D Printing Industry