How to Generate G-code Inside BeeGraphy
Designers usually rely on slicers and external CAM tools to convert geometry into G-code. BeeGraphy changes this by allowing complete G-code creation inside its visual node environment. This gives designers full control over toolpaths without leaving their browser.
In this guide, you will learn how to take a surface, slice it, sample points, and convert those points into ready to use G-code. The process stays entirely inside BeeGraphy, which makes it ideal for procedural modeling and custom fabrication workflows.
1. Preparing the Surface
Required nodes:
2. Creating the UV sampling points
G-code slicing requires multiple rings along the height of the object. Instead of moving geometry in world space, you generate them directly in UV space that we created in the previous step. Its necessary to notice the importance the following nodes:
In the Construct Point, set:
BeeGraphy will now generate as many V Iso rings as you set in List Sequence.
3. Sampling points on each ring
Each ring must be divided into small segments so that a machine can follow the path.
Use:
First List Sequence controls how many points will be sampled on each curve. For example, a sequence of 10 values between 0 and 1 will give you 10 points per ring.
Wire:
This produces a tree of points: one list per ring.
4. Flattening all points into a single ordered path
Machines follow one continuous list of G-code commands. Your points must be flattened in the order that the tool should travel.
Use:
Wire the output from Point On Curve into Flatten Tree. You now have a single ordered list of points.
5. Calculating extrusion values (E values)
G-code for 3D printing requires extrusion calculations. Each move needs an E-value based on the distance between the current point and the next one.
Steps:
*These properties are unique to 3D-Printers. Change the values according to your printer.
6. Formatting G-code lines
Template:
G1 X{X} Y{Y} Z{Z} E{E} F1500
7. Adding header and footer
Recommended by LinkedIn
Add two Text Constant nodes for Header and Footer.
Header example:
M82
G21
G90
G28
G92 E0
G1 Z0.3 F3000
Footer example:
G1 E{E}
G1 Z10 F3000
M104 S0
M140 S0
M84
*Header and Footer are unique to printers. Please use your printer’s preferences.
Use:
Place the header first, then the list of G01 commands, then the footer. Set the separator to newline.
Finally, use BeeGraphy’s text exporter to save your G-code file. Your procedural geometry has now turned into machine ready instructions without using any external slicer or CAM tool.
Outcome
M82
G21
G90
G28
G92 E0
G01 Z0.3 F3000
G01 X5 Y0 Z0 E3.99
G01 X3.85 Y6.39 Z0 E3.99
G01 X0.81 Y9.87 Z0 E3.99
…
G01 X9.74 Y-1.78 Z3 E3.99
G01 X7.17 Y2.06 Z3 E3.99
G01 X1.29 Y4.83 Z3 E3.99
M104 S0
M140 S0
M84
Conclusion
BeeGraphy gives designers full control over the toolpath generation process. By combining UV based slicing, curve sampling, extrusion calculation, and text formatting inside a single node graph, you can generate custom G-code with complete creative freedom. This opens the door to advanced workflows such as procedural prints, toolpath art, machine choreography, and algorithmic fabrication.
Originally published at https://beegraphy.com/blog/ on November 21, 2025.
Interesting, thank you