# A G-Code Generator for Volumetric Models
## 2 Related Work  
Slicers are essential tools in LM, and much research has been conducted to develop them. In the work of [8], [PERSON] and [PERSON] presented a practical G-code generation procedure. In the paper of [9], [PERSON] et al. proposed another efficient slicer. In these two works, the researchers divided the G-code generation process into stages and designed specialized computational geometric algorithms to gradually translate the input models into G-codes. The architectures of their slicers are similar to ours. However, key computational algorithms in our system have to be revised or invented since our slicer takes volumetric models as input data while their slicers deal with polygonal models. Besidesthe work of [8] and [9], many slicing methods have also been developed. A review paper on these software tools was published in [2]. The authors categorized the slicers into various groups according their methodologies and functionalities. The fundamental pipeline of G-code generation was also presented in this review paper. In the article of [3], several popular commercial and free slicers were introduced and briefly compared. These slicers aim at generating G-codes for 3D printers, ranging from basic models to very advanced systems. Voxel-based modeling is not new for LM applications. In [5], [PERSON] et al. used voxels to create models dedicated for 3D printing. In the work of [10], a voxel-based method was proposed to assess the manufacturability of 3D models in LM processes. In [11], [PERSON] and [PERSON] developed a method aiming to generate supporting structures and to find minimum features for voxel-based models. In the paper of [12], [PERSON] et al. utilized voxel-based modelling techniques to develop a virtual manufacturing system for previewing and debugging G-code programs. These aforementioned researches made significant contributions to LM by using volumetric modeling methods. However, a solid and robust G-code generation procedure for volumetric models is absent from their works. LM is widely used in various medical applications. In the papers of [13; 14], those areas that have benefited from LM are presented, including surgical planning, tissue replacement, pathologic assessment, education, and medical research. In [15], a practical LM procedure had been presented to create a heart model and a fixation patch, which were used in a remedy operation in an infant's heart. In the procedure, the researchers used a segmentation software to extract the blood pools of the heart and major vessels from the input computerized tomography (CT) scan data. Then, they utilized a geometrical modelling program to grow the surfaces of the heart and major vessels from the blood pools. At the following stage, they employed another computer aided design (CAD) software to refine the heart model and to create the fixation patch. Finally, the heart model and fixation patch were converted into G-codes by a slicer and manufactured by 3D printers. Similar procedures for creating implants, bio-models, and related applications can be found in the work of [16]. In the work of [7], [PERSON] et al. proposed a manufacturing method to fabricate scanned objects from magnetic resonance imaging (MRI) and CT-scan data. Their method computes the iso-surface of the object at first. Then, the resultant iso-surface is digitalized into a 3D image and converted into a distance field at the following step. Finally, a surface model is extracted from the distance field and manufactured by using a 3D printer. A similar approach can be found in the work of [6]. In the paper of [17], a geometrical modelling procedure was proposed to build polygonal representations for scanned objects hidden in medical image data. This procedure computes the 2D contours of the target object in all cross-sections of the input volume data at first. Then the surface mesh of the target object is formed by connecting these contours. The resultant surface mesh is a watertight solid geometry and feasible for LM.