{"id":11750,"date":"2025-11-21T11:53:36","date_gmt":"2025-11-21T07:53:36","guid":{"rendered":"https:\/\/beegraphy.com\/blog\/?p=11750"},"modified":"2025-11-21T11:53:36","modified_gmt":"2025-11-21T07:53:36","slug":"how-to-generate-g-code-inside-beegraphy","status":"publish","type":"post","link":"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/","title":{"rendered":"How to Generate G-code Inside BeeGraphy"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_75 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69e4e223e1385\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #757575;color:#757575\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #757575;color:#757575\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69e4e223e1385\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#1_Preparing_the_Surface\" >1. Preparing the Surface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#2_Creating_the_UV_sampling_points\" >2. Creating the UV sampling points<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#3_Sampling_points_on_each_ring\" >3. Sampling points on each ring<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#4_Flattening_all_points_into_a_single_ordered_path\" >4. Flattening all points into a single ordered path<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#5_Calculating_extrusion_values_E_values\" >5. Calculating extrusion values (E values)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#6_Formatting_G-code_lines\" >6. Formatting G-code lines<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#7_Adding_header_and_footer\" >7. Adding header and footer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#Outcome\" >Outcome<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/beegraphy.com\/blog\/how-to-generate-g-code-inside-beegraphy\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><span style=\"font-weight: 400;\">Designers usually rely on slicers and external CAM tools to convert geometry into <em>G-code.<\/em> BeeGraphy changes this by allowing complete <em>G-code<\/em> creation inside its visual node environment. This gives designers full control over toolpaths without leaving their browser.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this guide, you will learn how to take a surface, slice it, sample points, and convert those points into ready to use <em>G-code<\/em>. The process stays entirely inside<em> BeeGraphy<\/em>, which makes it ideal for procedural modeling and custom fabrication workflows.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"1_Preparing_the_Surface\"><\/span><b>1. Preparing the Surface<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-11751 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM.png\" alt=\"G-code\" width=\"1225\" height=\"582\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM.png 1225w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM-300x143.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM-1024x487.png 1024w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM-768x365.png 768w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM-800x380.png 800w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.12-PM-20x10.png 20w\" sizes=\"(max-width: 1225px) 100vw, 1225px\" \/><\/p>\n<ul>\n<li>Start with any surface that you want to slice. A lofted surface works best because it has a clean UV structure. We have taken a <em>basic spiral vase<\/em> as our model.<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Required nodes:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em><span style=\"font-weight: 400;\">Loft Surface<\/span><\/em><\/li>\n<li><em><span style=\"font-weight: 400;\">Surface Iso Curves<\/span><\/em><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Connect the <em>Loft Surface<\/em> into the <em>Surface Iso Curves<\/em> node. The output we have to use is <\/span><b>V Iso<\/b><span style=\"font-weight: 400;\">. <em>V Iso<\/em> produces horizontal rings in UV space, which are perfect slicing profiles. Move the rings on the <em>Z-axis<\/em> by creating a <em>List SEC<\/em> as per your preferences. As you can see in the panel, the rings have now moved up from top to bottom.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"2_Creating_the_UV_sampling_points\"><\/span><b>2. Creating the UV sampling points<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-11759 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM.png\" alt=\"\" width=\"1240\" height=\"467\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM.png 1240w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM-300x113.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM-1024x386.png 1024w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM-768x289.png 768w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM-800x301.png 800w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.19-PM-20x8.png 20w\" sizes=\"(max-width: 1240px) 100vw, 1240px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">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:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">List Sequence<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/em><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">Construct Point<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/em><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 In the <em>Construct Point<\/em>, set:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">X = 0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Y = 0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Z = List Sequence from 0 to 1 with the number of layers you want<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><span style=\"font-weight: 400;\">This gives you a stack of UV coordinates that represent slicing planes along the Z axis. Connect this <em>Construct Point<\/em> node to the Point input of the <em>Surface Iso Curves<\/em> node.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">BeeGraphy will now generate as many V Iso rings as you set in List Sequence.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Sampling_points_on_each_ring\"><\/span><b>3. Sampling points on each ring<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Each ring must be divided into small segments so that a machine can follow the path.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Use:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">List Sequence<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/em><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">Point On Curve<\/span><\/em><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">First <em>List Sequence<\/em> 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.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Wire:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">V Iso \u2192 Curve input of Point On Curve<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/em><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">List Sequence \u2192 Parameter input<\/span><\/em><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">This produces a tree of points: one list per ring.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-11760 size-full lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466.png\" alt=\"\" width=\"1040\" height=\"522\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466.png 1040w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466-300x151.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466-1024x514.png 1024w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466-768x385.png 768w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466-800x402.png 800w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/gchftf-e1763709001466-20x10.png 20w\" sizes=\"(max-width: 1040px) 100vw, 1040px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"4_Flattening_all_points_into_a_single_ordered_path\"><\/span><b>4. Flattening all points into a single ordered path<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11758 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.29-PM.png\" alt=\"\" width=\"720\" height=\"300\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.29-PM.png 720w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.29-PM-300x125.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.29-PM-20x8.png 20w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Machines follow one continuous list of G-code commands. Your points must be flattened in the order that the tool should travel.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Use:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">Flatten Tree<\/span><\/em><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Wire the output from <em>Point On Curve<\/em> into <em>Flatten Tree<\/em>. You now have a single ordered list of points.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_Calculating_extrusion_values_E_values\"><\/span><b>5. Calculating extrusion values (E values)<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11757 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM.png\" alt=\"\" width=\"1255\" height=\"360\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM.png 1255w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM-300x86.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM-1024x294.png 1024w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM-768x220.png 768w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM-800x229.png 800w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.38-PM-20x6.png 20w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">G-code for 3D printing requires extrusion calculations. Each move needs an <em>E-value<\/em> based on the distance between the current point and the next one.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Steps:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Shift the <em>Point List<\/em> from <em>Point on Curve<\/em> by one using <em>Shift List<\/em>.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use <em>Vector By 2Pnt<\/em> to compute vectors between corresponding pairs.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use <em>Vector Length<\/em> to get segment lengths.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Multiply<\/em> each segment length by <em>extrusion per millimeter<\/em>.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Calculating <em>extrusion_per_mm<\/em><\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nozzle: 0.4 <em>(Number const.)<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Layer height: 0.5 <em>(Number const.)<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Filament Diameter: 1.74 <em>(Number const.)<\/em><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>\u00a0 *These properties are unique to 3D-Printers. Change the values according to your printer.<\/strong><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Divide<\/em> Filament diameter by 2 to get Radius.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Raise the <em>power<\/em> of radius to 2. <em>Multiply<\/em> the outcome with Pi. This gives us the <em>Filament area.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Multiply<\/em> Nozzle with Layer height. This returns<em> Line_area.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Divide<\/em> Line_area with Filament area. The resulting outcome is <em>extrusion_per_mm.<\/em><\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\"><em>Multiply Vector by 2pnt<\/em> length output with <em>extrusion_per_mm.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Pass the resulting values into <em>Mass Addition<\/em> to turn them into a cumulative sequence. These are your <em>E values.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Round them off<\/em> to 2-3 decimal places.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Convert this Number list to String using<em> NumberToString.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use J<em>oin Text<\/em> to add the letter E before the E-values.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"6_Formatting_G-code_lines\"><\/span><b>6. Formatting G-code lines<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11756 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM.png\" alt=\"\" width=\"983\" height=\"424\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM.png 983w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM-300x129.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM-768x331.png 768w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM-800x345.png 800w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.46-PM-20x9.png 20w\" sizes=\"(max-width: 983px) 100vw, 983px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Template:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G1 X{X} Y{Y} Z{Z} E{E} F1500<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Graft<\/em> X, Y, Z from <em>Deconstruct point<\/em> and <em>round all<\/em> the values to 2-3 decimal places<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Convert <em>NumberToString<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use C<em>oncatenate<\/em> to and X, Y and Z prefix to them respectively.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><em>Join<\/em> the 3 lists and add the prefix G01 (used for clockwise circular movements.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">In the 4th input of <em>text join<\/em>, input out <em>E-values<\/em> from the previous <em>text join.<\/em><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The output now looks like the template.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">This creates one <em>G-code<\/em> command per point.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"7_Adding_header_and_footer\"><\/span><b>7. Adding header and footer<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11755 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.50-PM.png\" alt=\"\" width=\"483\" height=\"188\" data-sizes=\"auto\" data-srcset=\"https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.50-PM.png 483w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.50-PM-300x117.png 300w, https:\/\/beegraphy.com\/blog\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-21-at-12.33.50-PM-20x8.png 20w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Add two <em>Text Constant<\/em> nodes for Header and Footer.<\/span><\/p>\n<p><strong>Header example:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">M82<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G21<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G90<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G28<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G92 E0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G1 Z0.3 F3000<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Footer example:<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">G1 E{E}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G1 Z10 F3000<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M104 S0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M140 S0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M84<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">*Header and Footer are unique to printers. Please use your printer\u2019s preferences.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Use:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><em><span style=\"font-weight: 400;\">Text Join<\/span><\/em><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Place the header first, then the list of G01 commands, then the footer. Set the separator to newline.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Finally, use BeeGraphy\u2019s 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.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Outcome\"><\/span><b>Outcome<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">M82<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G21<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G90<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G28<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G92 E0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 Z0.3 F3000<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 X5 Y0 Z0 E3.99<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 X3.85 Y6.39 Z0 E3.99<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 X0.81 Y9.87 Z0 E3.99<\/span><\/p>\n<p>&#8230;<\/p>\n<p><span style=\"font-weight: 400;\">G01 X9.74 Y-1.78 Z3 E3.99<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 X7.17 Y2.06 Z3 E3.99<\/span><\/p>\n<p><span style=\"font-weight: 400;\">G01 X1.29 Y4.83 Z3 E3.99<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M104 S0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M140 S0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M84<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><b>Conclusion<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">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<\/span><span style=\"font-weight: 400;\">\u00a0fabrication.<\/span><\/p>\n<p><a href=\"https:\/\/beegraphy.com\/workspace\/edit\/691c5839413dfbd13ff71a05\">File link<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":11766,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"gallery","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11750","post","type-post","status-publish","format-gallery","has-post-thumbnail","hentry","category-featured","post_format-post-format-gallery"],"_links":{"self":[{"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/posts\/11750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/comments?post=11750"}],"version-history":[{"count":4,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/posts\/11750\/revisions"}],"predecessor-version":[{"id":11767,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/posts\/11750\/revisions\/11767"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/media\/11766"}],"wp:attachment":[{"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/media?parent=11750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/categories?post=11750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beegraphy.com\/blog\/wp-json\/wp\/v2\/tags?post=11750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}