## 6 Conclusions  
This work focuses on developing a software tool to shorten the design time when conformal 3D printing is required. This consists of a mathematical algorithm to project sequential points of a trajectory through a vector for conformal printing on a tessellated surface defined by an STL file and the direct generation of the machine code (G-code) for 3D printing. The algorithm was implemented in Matlab(tm)(R2018a), and as a proof of concept, sequential points of a Hilbert curve trajectory were generated and projected on a saddle surface to be printed conformally, using FFF. It was demonstrated that the absolute relative error between the location of the projected points using the algorithm versus the analytical values utilizing the surface's equation was due mainly to the resolution of polygonal mesh (number of vertices in STL file) in such a way that error decreased for a tessellated surface with a higher resolution polygonal mesh. The algorithm calculates the normal vector for each projected point so that the Euler angles may be obtained to orientate a tool or extruder of a multi-axis or robotic system. The algorithm concept may be used for the generation of G-codes for printing continuous non-planar lattices or functional structures on an arbitrarily shaped and tessellated surface. The application scope may also be extended to generate G-codes for one or several layers and even by using other AM technologies, such as DW, for the deposition of conductive material for printed electronics. The algorithm was initially created for a looking solution to generate G-codes for 3D printing of conductive tracks on any surface represented by a tessellated file (STL), but its use may be extended for other surface manufacturing applications, where a path trajectory to be followed by a tool is required. Applying the algorithm for 3D printing using an industrial robot is planned for future work, including implementation of a user's interface and some improvements to optimize calculations. The final remark of this paper concerns the advantages of using this algorithm. 1. It allows projecting complex parametric trajectories onto any non-planar surfaces defined by an STL geometry file, so the surface does not have to be analytical. The gen  
Figure 19: Curved lattices printed by the projection of printing trajectories. eration of patterns, such as those used in [6; 41] in a two-dimensional plane, is direct, but generating those patterns in 3D following a curve may be challenging if the surface is complex and not analytical. 2. It allows shortening the design time and the steps for AM of conformal patterns on non-planar surfaces by directly producing a G-code to be transferred to the printing machine. It is a simple software tool that is easy to use and even modified for further specific applications. 3. The algorithm gives each projected point the normal to orient the extruder in a multi-axis system. 4. It allows concatenating different trajectories to create structures with different material densities. 5. It allows printing as many layers as needed or alternating the pattern by layers as the sinusoidal pattern. 6. Having the vector of projection as a user-defined parameter allows playing with trajectories projected at different inclination angles to generate different patterns on the target surface. Similarly, the pattern can be generated at an inclined plane and then projected as required. 7. Non-planar lattice shells, when built from the projection or conformal printing, will have distortions (not present in their planar version) that will affect their resulting mechanical properties (especially if those were characterized in planar samples). This prompts further analysis of the mechanical properties of the lattice shells. Conceptualization, C.R.-P. and A.R.-F.; methodology, C.R.-P., E.C.-U. and J.L.G. ; software, C.R.-P.; validation, C.R.-P.; investigation, C.R.-P.; writing--original draft, C.R.-P.; visualization, C.R.-P., E.C.-U. and A.R.-F; supervision, E.C.-U., A.R.-F., J.L.G.