{'fraction_non_alphanumeric': 0.03280990016638935, 'fraction_numerical': 0.01211522462562396, 'mean_word_length': 4.645142353977106, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Development of Fused Deposition Modeling Using Five-Axis Machine and Printing Methods

Fused deposition modeling (FDM) is one of most widely used 3D printing technologies due to inexpensive equipment and materials, and easy to operate. FDM forms a 3D geometry by slicing a model along the XY-plane and assembling the resulting individual layers along the Z-axis, with extruded thermoplastic filaments. FDM printed parts usually need supporting structures, have stair step effect, and unfavorable mechanical properties. In order to address these deficiencies, a five-axis 3D printer and corresponding printing methods are proposed and developed in this paper. The 3D printer was designed five degrees of freedom through adding a platform that can rotate and swing. Based on the obtained results from different case studies, the discussed machine and methods could become more significant in industrial applications such as low cost, fabricating parts with better surface quality and lightweight structures.


Introduction
3D printing technology, also called rapid prototyping or additive manufacturing, has been rapidly developed and widely used in various fields [1], such as electronics [2], energy devices [3], medicines [4], biotechnology [5], optics [6], structural industry [7], automobile and aerospace applications [8] and etc. The process of 3D printing is based on layer-by-layer fabrication from an arbitrary geometric model to a real object. FDM 3D printers become popular and affordable with the smaller apparatus and widely open development sources [9]. In that case, FDM is the most famous for both the researchers and customers. So far, many researchers are studying on the problem caused by FDM process, such as stair step effect and low mechanical strength, and put forward corresponding solutions.
In terms of printing methods, Huang et al. [10], Jin et al. [12], Zhang et al. [13] and Allen et al. [14] proposed curve layer slicing method compared with flat layer slicing. Huang integrated to develop the adaptive curved layer slicing based on the three-plane intersection method for curved layer offsetting and consideration of facet angles together with the residual heights for adaptive slicing. Allen allowed the manufacture of free form surfaces where individual tool paths mapped the surface topology. Xu et al. [15] proposed a novel multidirectional process planning algorithm, the core of the strategy was to decompose the model into support-free parts directly pertaining to the cusp-height constraint, each with its own build direction. Coupek et al. [16] proposed new optimization and path planning methods for multi-axis additive manufacturing which included an adaptation of the building direction and an algorithm for the special case of cylindrical axes. These methods could reduce the production time drastically by avoiding support structures and by using the integration of predefined building blocks to substitute the infill. Zhao et al. [17] proposed a novel and simple printing strategy, inclined layer printing, which allowed printing without assisted supporting structures. The printed structures were sliced in an incline and overhanging structures were supported by adjacent layers under a suitable slicing angle.
In order to print the path by curve layer slicing, it should be combined with multi-axis printer. Enferadi et al. [17] and Shen et al. [19] added two degrees of freedom to the platform on the Delta printer model. Grutle [20] added A and C axes to the platform on the Cartesian printer model, and Asif et al. [21] added A and B axes to the extruder. Keating et al. [22] and Ding et al. [23] combined a robotic arm with 3D printing to increase freedom. Li et al. [24] developed a novel 6-axis hybrid additive-subtractive manufacturing process to overcome the limitations of additive manufacturing technologies, the favorable capabilities of subtractive manufacturing, i.e., high surface quality, could be integrated to form a hybrid process.
In summary, research to date has mainly focused on the problems of serious stratification, waste of supporting materials and low mechanical strength existing in the 3D printing. Taking discussed factors above into consideration, this paper presents a five-axis 3D printer and corresponding printing methods in order to improve FDM process. Thus, the supporting materials are removed, the post-processing process is simplified, the waste of materials is greatly reduced and the printing efficiency is improved.

Methods: Machine design 2.1. Structure design
The five-axis 3D printer was added A-axis that rotated around the X-axis and C-axis that rotated around the Z-axis, in addition to the three ordinary axes of the Cartesian printer model. As shown in Fig.1, the overall size of the printer frame was 760mm × 760mm × 1100mm, the movable range of nozzle is 500mm×500mm×600 mm, the diameter of the print adhesion surface of the receiving platform is 220mm, the rotation range of the receiving platform A axis is ±90°, the receiving platform C axis can be rotated freely (360°), the X and Y axis movement accuracy of printer is 0.01mm, the movement accuracy of Z axis is 0.005mm, and the rotation accuracy of A-axis and C-axis rotation accuracy are both 0.028°.

Control design
As shown in Fig.2, the printer adopted ATmega2560 which used the same CPU as Arduino MEGA as the master control chip of the slave computer, called RUMBA (RepRap Universal Mega Board with Allegro driver). Marlin was used as firmware to communicate with the host computer in order to control five-axis printing. The slave computer control system included the control module and detecting module. The control module was comprised of the G-code compiler and six stepper drivers, and was tasked with the translation of the G-code and relative movement of motors. The detecting module ensured the machine coordinate system and suitable printing temperature. When the A-axis and C-axis were rotated, the points in space were changed accordingly. For the C-axis, the location of the rotated center in the XY-plane was (M, N), so a rotated transformation matrix was needed: For the A-axis, two translation matrices and one rotated transformation matrix were needed as the coordinate system of the printer was actually determined by the bracket touching the limit switch, and not the real point. Furthermore, the motor of the A-axis was installed in the middle position of the platform, and is the distance from the platform was denoted by D. The transformation matrix of A-axis was:

Results and discussion: case studies 3.1 Non-support printing methods 3.1.1 Model partition
The STL models that require additional support material usually have sudden changes in cross-sectional area. The sudden change is due to a large difference in the areas of two adjacent sections of the part, and therefore, model partitioning is required. In model partitioning, three directions, X, Y, and Z must be traversed. The X direction is taken as an example to illustrate the partitioning process. First, the thickness of each slice is set as d, and the cross-sectional area of Surface (i) and Surface (i + 1) are calculated, which are two adjacent sections after cutting. The area of Surface (i) is S sup and the area of Surface (i + 1) is S sub . Next, the sectional area coefficient ∂ of the section is set. A large number of experiments have shown that the angle between one side of the object (L1) and vertical line (L2) is greater than 45 and dangling [14,20], and collapse will occur without a base. Assuming Surface (i + 1) is greater than Surface (i), the difference in length between Surface (i + 1) and Surface (i) is Line (L3). Since the angle is 45, Line (L3) and Line (L4) have the same length, therefore, the area coefficient ∂ can be derived and the formula is where i is the slice number and i ≥ 1. When ∂ > 1, the model must be split, and the distance from the origin is i *d. When Surface (i + 1) is greater than Surface (i), ∂ is greater than -1, and needs to be divided.
The derivation of sectional area coefficient ∂ is shown in Fig. 4.
As shown in Fig. 3 (B), when the model is divided Surface 1 and Surface 2 are called the partition surfaces. Derivation of sectional area coefficient ∂ To perform model partitioning, geometric characteristics of the model should be analyzed to judge whether the model requires support structures during the printing process. If there is no requirement for support material, traditional 3D printing can be used and a path is immediately generated to print the model. If the model requires support material, a surface should be identified which can be used to divides model into multiple sub-parts [22]. As shown in Fig.3 and Table 1, the model partition printing method showed superiority in two aspects, that the printing time was reduced by 50% and consumables were reduced by nearly 60% (measured in mm) using the same slice parameters.

Dynamic slicing
The dynamic slicing method mainly apply to the FDM printing of an unsupported structure with internal holes or slotted cantilever structures [23]. In the 5-axis dynamic slicing process, a real-time dynamic adjustment of the slice plane results in non-parallel planes between the layers, thus leading to a non-uniform thickness between layers. In Fig.4 (b), the blue part is the model with a central skeleton curve. The thickness of the printed layer is related to the distance between the layers and the distance from the midpoint of the layer to the center of the curvature. Every slicing point is determined by the length of the skeleton curve which can approximately represent the 5-axis composite printed stack thickness scalar and the provided layer thickness t. The length of the curve can be expressed as follows: Where i is the slice layer number, t is the slice layer thickness. Next, find the slicing point of the slice and the tangent of the point location. According to Eq.4, the current point relative parameters u can be calculated as u c = f(i, t),therefore, the coordinates of the intersection point of current slice and skeleton curve is p c = (x(u c ), y(u c ), z(u c )) and the intersection tangent vector at this point can be expressed as: τ c = (x , (u c ), y , (u c ), z , (u c )).
The coordinates of the intersection point of each slice and the intersection tangent vector data of the fitted skeleton curve are calculated, these data are constructed as a slice parameter object.
Inter-layer printing is generally a continuous line segment printing. To improve the accuracy and the overall print quality of the model, a continuous line segment is subdivided into many small line segments, and then the extrusion thickness of each line segment is calculated by the distance from the midline point of each line segment to the center point of curvature. For this kind of model with a particular neutral trajectory feature, the curve skeleton can be extracted from the point cloud data composed of the nodes on the STL model triangle patch, the dynamic slicing of cantilever structure model realize by the curve skeleton, and the layer thickness can be calculated between the slices. As shown in Table 1, the time saving was 44% and material saving was 32%.

Multi-directional printing
The tree-like structure model inevitably printed support structure when sliced in ordinary 3D slicing software. The supporting material in the through-hole of model is difficult to peel off. Even if the supporting material can be peeled off, the peeling device can easily scratch the surface of the printed piece, and the peeling process requires a lot of physical and time. On the contrary, the multi-direction printing method based on model partitioning toward 5-axis additive manufacturing can use printing material as the base material to realize self-support by slicing the sub-model and five-axis printer. As shown in Fig.6, the five-axis unsupported 3D printing method based on model partitioning is presented. According to the input three-dimensional model, the model is partitioned by clustering method based on K-means. The STL model file is extracted as a point cloud model file. Extract the center of the gravity position vector of triangular faces, and marked as {x 1 , x 2 ,…, x n }，φ i m represents the class i of the m-th merger, the final number of clusters K is determined beforehand. The specific K-means clustering process is as follows: Input: Clustering numbers K, {x 1 , x 2 ,…, x N } . Output: Clustering partition: φ = φ 1 ∪ φ 2 ⋯ ∪ φ k .
Step1: K feature vectors are selected from the set of the center of gravity position vector of triangular faces, marked in z 1 0 , z 2 0 ,…z k 0 as the initial clustering center.
Step2: According to the principle of minimum distance, each feature vector is divided into K classes. If the distance between the center of the feature vector x i and Z j m which is the center of the class φ j m , marked as d il m , the distance satisfies the equation: as a result, x i is considered to belong to φ l m+1 in the new clustering results.
Step3: New clustering centers are recalculated which are the average of all feature vectors in the new clustering results.
Step4: Repeat Step2-Step3 until the new class center is the same as the previous one, or the number of clusters is larger than the preset K value, the clustering ends. As shown in Table 1, the above mentioned method is also better than traditional slicing method.

Reinforced printing methods 3.2.1 Reinforced path
The mechanical strength of printed parts can also be enhanced by changing the arrangement of filaments. The parts printed by traditional slicing method are the weakest in Z direction. In the reinforced path printing process, the traditional layer by layer printing method is used to the support, and the printed support is rotated 90 ° around the A-axis, as shown in Fig.7 (b). Then start to print axially, after each path of the nozzle along the surface of the pipe, rotate the c-axis by a certain angle, and then continue to print the next path until the end of printing.
Firstly, sliced in a direction perpendicular to the neutral skeleton curve as shown in Figure 1.Taking the plane perpendicular to the neutral skeleton curve as the tangent plane, the intersection of the tangent plane and the neutral skeleton curve and the angle between the tangent plane and the horizontal plane are obtained. Secondly, from the section equation, the coordinates on the section parallel to the Z-axis direction and the angle θ j at which the platform C-axis needs to be rotated during printing are determined as shown in Fig.2. Nest, by rotating and translating the cross section, the angle between the tangent plane and the horizontal plane is converted into the rotation angle of the section(γ i =δ i -90°), and the coordinates of the other sections are obtained as shown in Fig.3. The E section is rotated by γ i degrees to the F i section, and the F i section is translated to the Pi section. Finally, calculate the coordinates of the print model based on the angle at which the C-axis needs to be rotated.

Reinforced filament
The main limitation of FDM is its inferiority in-terms of the mechanical properties of the resulting prototypes. This led to the development of various types of alternative materials in order to improve the application domain of this technology. Research on fiber-reinforced thermoplastic composites can be categorized according to the type or size of reinforcements. In conclusion, continuous fiber-reinforced plastic fabricated using prepreg showed superior mechanical properties. The most widely studied is carbon fiber, but carbon fiber manufacturing process is complex, high cost, high energy consumption and low output. On the contrary, natural fibers have not only high strength and modulus, but also light density, low price and abundant sources.
As shown in Figure 7, a single screw extruder and composite extrusion mold were employed for the manufacturing process. The diameter of PLA pellets was 0.5mm, added through the barrel. The single screw extruder squeeze the molten PLA resin into the composite extrusion die. The die had a vertical opening where a 3D printer nozzle was attached and a flax fiber was introduced and coated by the molten PLA resin. The diameter of the CFFRP prepreg filaments could be changed by varying the 3D printer nozzle. The haul-off machine maintained constant speed and tension during the entire manufacturing process. The heating band, which could be heated up to 300°C, was placed in the front part of the single screw extruder. The melt extrusion temperature of PLA was set at 190°C. The extrusion speed of the screw was from 200mm/min to 600mm/min. The flax was a two-ply yarn of 68Tex. The diameter of CFFRP prepreg filaments was set to 0.8mm, 1.0mm, and 1.2mm by the 3D printer nozzle. The tensile strength of PLA filaments was 47.013MPa, and the tensile modulus was 1.675GPa. The tensile strength and modulus of continuous flax fiber reinforced composites which we manufactured increased by 89% and 73% respectively, compared with PLA filaments. If natural fibers can be used instead of carbon fibers in the field of lightweight, it will be very meaningful. As shown in Fig.8, fiber-reinforced printing can also be combined with the five-axis printer to maximize the mechanical property of the printed parts.

Conclusions
This paper aims at the shortcomings of FDM process, such as long printing time, poor surface quality and low mechanical properties. Many improvements have been proposed in the structure of the printer and method of the printing.
(1) A five-axis printer was designed which added A-axis and C-axis. The five-axis printer bids farewell to the traditional 3D printing single layer-by-layer stacking manufacturing form, so it provides the possibility of forming various complex parts.
(2) Non-support printing methods (model partition, dynamic slicing and multi-directional printing) showed a good effect in the application of five-axis 3D printer. To compare the traditional slicing method, the new methods decreased printing time 23% ~ 50%, and decreased printing materials 21% ~ 60%.
(3) Reinforced path and filament printing methods also improved the process. The axial path reduced anisotropy of printed parts effectively, and continuous flax fiber-reinforced plastic showed superior mechanical properties than PLA.
However, some limitations need to be considered, such as collision between the platform and nozzle. The new printer has five degrees of freedom like CNC machining, but the method of path planning in additive manufacturing is much more difficult. We hope these new printing methods could reduce the printing time and the filament consumables compared to the ordinary 3D printing, and avoids the post-treatment process of removing the support, thereby further improving the flexibility, convenience, and economy of the FDM manufacturing process.

Declarations Ethics approval and consent to participate
Not applicable.

Consent for publication
Not applicable.

Availability of data and materials
The datasets used or analysed during the current study are available from the corresponding author on reasonable request.