Planar-to-Rotary G-code Transformation Via Post-Processing for Discrete 4-Axis Machining

Notice

This is an unedited manuscript accepted for publication and provided as an Article in Press for early access at the author’s request. The article will undergo copyediting, typesetting, and galley proof review before final publication. Please be aware that errors may be identified during production that could affect the content. All legal disclaimers of the journal apply.

Volume: 12 | Issue: 1 | Year 2026 | Subscription
International Journal of Computer Aided Manufacturing
Received Date: 02/26/2026
Acceptance Date: 02/27/2026
Published On: 2026-03-13
First Page:
Last Page:

Journal Menu


By: Pedro Portugal, Damian Venghaus, and Diego Lopez.

1. Tecnologico de Monterrey, Queretaro School of Engineering and Sciences
2. Grafisch Lyceum Rotterdam, Rotterdam, 3013 AK
3. Tecnologico de Monterrey, Queretaro, 76130

Abstract

Conventional 4-axis CNC machining remains inaccessible to many due to the high costs of industrial hardware and the complexity of firmware modifications for entry-level controllers. This paper presents a software-defined framework that enables Planar-to-Rotary G-code Transformation, allowing standard 3-axis CNC systems to perform discrete 4-axis machining without hardware retrofits or firmware changes. The core of the proposed method is a custom Python-based post-processor that maps Cartesian XZ toolpaths onto a cylindrical coordinate system by injecting indexed Y-axis rotations.

The framework incorporates an automated calculation module that determines optimal angular displacement based on stock diameter and tool geometry, utilizing an 80% overlap factor to ensure surface continuity. To facilitate user adoption, the system was implemented as both a desktop GUI with 3D visualization capabilities and a platform-independent web interface. Experimental validation using hardwood and copper specimens demonstrated high dimensional fidelity, with average deviations within ±0.25 mm. By shifting the complexity from hardware to a post-processing software layer, this approach provides a cost-effective solution for indexed rotary fabrication, expanding the capabilities of desktop CNCs in educational, prototyping, and makerspace environments.

Loading

Citation:

How to cite this article: Pedro Portugal, Damian Venghaus, and Diego Lopez Planar-to-Rotary G-code Transformation Via Post-Processing for Discrete 4-Axis Machining. International Journal of Computer Aided Manufacturing. 2026; 12(1): -p.

How to cite this URL: Pedro Portugal, Damian Venghaus, and Diego Lopez, Planar-to-Rotary G-code Transformation Via Post-Processing for Discrete 4-Axis Machining. International Journal of Computer Aided Manufacturing. 2026; 12(1): -p. Available from:https://journalspub.com/publication/ijcam/article=26082

Refrences:

  1. Abolarin, V. O. (2024). Generating G and M code for lathe machine using Python. ResearchGate. https://www.researchgate.net/publication/383870792

 

  1. Araujo, P. R. M., & Lins, R. G. (2020). Computer vision system for workpiece referencing in three-axis machining centers. The International Journal of Advanced Manufacturing Technology, 106(5–6), 1–14. https://doi.org/10.1007/s00170-019-04626-w

 

  1. Breaz, R., Racz, S.-G., Girjob, C., & Tera, M. (2024). Using open source software CNC controllers and modular multi-axis mechanical structure as integrated teaching environment for CAD/CAM/CAE training. IOP Conference Series: Materials Science and Engineering, 968(1), 012024. https://doi.org/10.1088/1757-899X/968/1/012024

 

  1. Dai, Y., Li, Y., Li, Z., & Wen, W. (2022). Temperature measurement point optimization and experimental research for bi‑rotary milling head of five‑axis CNC machine tool. International Journal of Advanced Manufacturing Technology, 121, 309–322. https://doi.org/10.1007/s00170-022-09317-7

 

  1. Fahmi, Z., Abidin, Z., & Nafis, O. Z. (2019). Comparative study of tool path strategies in CNC machining for part with B-spline surfaces. In iMEC-APCOMS 2019, Proceedings of the 4th International Manufacturing Engineering Conference (pp. 564–569). https://doi.org/10.1007/978-981-15-0950-6_86

 

  1. García‑Ruiz, M.‑E., & Lena‑Acebo, F.  (2022). FabLabs: The Road to Distributed and Sustainable Technological Training through Digital Manufacturing. Sustainability, 14(7), 3938. https://doi.org/10.3390/su14073938

 

  1. Huang, K. L. Mak, & P. G. Maropoulos (Eds.), Proceedings of the 6th CIRP‑Sponsored International Conference on Digital Enterprise Technology (pp. 469–482). https://doi.org/10.1007/978-3-642-10430-5_36

 

 

  1. Jiang, P., & Li, P. (2019). Shared factory: A new production node for social manufacturing in the context of sharing economy. arXiv. https://arxiv.org/abs/1904.11377

 

  1. Jung, H.-C., Hwang, J.-D., Park, K.-B., & Jung, Y.-G. (2011). Development of practical postprocessor for five-axis machine tool with non-orthogonal rotary axes. Journal of Central South University of Technology, 18(1), 159–164. https://doi.org/10.1007/s11771-011-0674-x

 

  1. Krantz, M., & Niggemann, O. (2023). Diagnostic algorithms for a rotary indexing machine. arXiv preprint. https://arxiv.org/abs/2305.15934

 

  1. Lee, R.-S., Lin, Y.-H., & Kuo, L.-A. (2010). Development of automated universal postprocessor for non‑orthogonal multi‑axis machine tools with modified D–H notation. In G. Q.

 

  1. Lena‑Acebo, F. , & García‑Ruiz, M. E. (2019). The FabLab movement: Democratization of digital manufacturing. In A. Guerra (Ed.), Organizational Transformation… Hershey, PA: Business Science Reference. https://www.researchgate.net/publication/330426056

 

  1. Lin, W.-Z., Xiao, J.-X., Lin, Y.-C., Chang, B.-W., & Hung, J.-P. (2024). Innovative design and machining verification of a dual-axis swivel table for a milling machine. Advances in Science and Technology – Research Journal, 18(1), 306–319. https://doi.org/10.12913/22998624/178528

 

  1. Lo Valvo, E., Licari, R., & Adornetto, A. (2012). CNC milling machine simulation in engineering education. International Journal of Online and Biomedical Engineering (iJOE), 8(2), 33–38. https://doi.org/10.3991/ijoe.v8i2.2047

 

  1. (2025). Carvera Air Desktop CNC Machine with 4th Axis Bundle. Retrieved from https://www.makera.com/products/carvera-air

 

  1. Moroşanu, G.-A., Moroșanu, F.-I., Susac, F., Teodor, V.-G., Păunoiu, V., & Baroiu, N. (2025). Implementation of an academic learning module for CNC manufacturing technology of the part “Double Fixing Fork.” Inventions, 10(4), 63. https://doi.org/10.3390/inventions10040063

 

  1. Sarguroh, S. S., & Rane, A. B. (2018, January 5). Using GRBL-Arduino-based controller to run a two-axis computerized numerical control machine. In 2018 International Conference on Smart City and Emerging Technology (ICSCET) (pp. 1–5). IEEE. https://doi.org/10.1109/ICSCET.2018.8537315

 

  1. Srai, J. , Kumar, M., Graham, G., & Phillips, W. (2020). Distributed manufacturing: A new form of localised production. International Journal of Operations & Production Management, 40(1), 1–20. https://doi.org/10.1108/IJOPM-08-2019-0600

 

  1. Xu, S., Anwer, N., & Lavernhe, S. (2014). Conversion of G-code programs for milling into STEP-NC. arXiv. https://arxiv.org/abs/1412.5496