Surface slicing and toolpath planning for in-situ bioprinting of skin implants

Bioprinting has emerged as a successful method for fabricating engineered tissue implants, offering great potential for wound healing applications. This study focuses on an advanced surface-based slicing approach aimed at designing a skin implant specifically for in-situ bioprinting. The slicing step plays a crucial role in determining the layering arrangement of the tissue during printing. By utilizing surface slicing, a significant shift from planar fabrication methods is achieved. The developed methodology involves the utilization of a customized robotic printer to deliver biomaterials. A multilayer slicing and toolpath generation procedure is presented, enabling the fabrication of skin implants that incorporate the epidermal, dermal, and hypodermal layers. One notable advantage of using the approximate representation of the native wound site surface as the slicing surface is the avoidance of planar printing effects such as staircasing. This surface slicing method allows for the design of non-planar and ultra-thin skin implants, ensuring a higher degree of geometric match between the implant and the wound interface. Furthermore, the proposed methodology demonstrates superior surface quality of the in-situ bio-printed implant on a hand model, validating its ability to create toolpaths on implants with complex surfaces.


Introduction
3D printing technology has readily evolved to provide specialized solutions for skin wound healing applications in tissue engineering [1].In the in-vitro approach to bioprinting, a complex geometry scaffold is fabricated to provide the necessary structural and biological environment for the cells to regenerate [2].Recent advancement in the in-situ approach to bioprinting has enabled the printing of engineered biomaterial for skin (with or without cells) directly on the body (see figure 1) [3].These bio-printed implants attached to the biological host interact with the natural response of the body to trigger the woundhealing process [4].The most challenging aspect of bioprinting is ensuring that the printed tissues remain functional after printing [5].Based on the biology of the cells being used and the target tissue, biomaterials, growth factors, and implant design must be understood and balanced appropriately [6].It has been shown that the surface characteristics of the implants significantly affect tunning the innate and adaptive immune response and are crucial to the transfer of blood and nutrients to cells embedded in the implant [7].To achieve customized surface characteristics and tunable implants, it is necessary to create specialized in-situ bioprinting techniques suitable for the complex working environment encountered in in-situ printing skin material.
There are four fundamental steps to printing engineered tissue using bioprinting: modelling, slicing, printing, and quality control.Modeling is the process of creating a digital 3D representation of tissue using computer-aided design software (CAD) [8].When an in-situ approach is used, a surface scan of the target location will be used to design the implant geometry.Implants are typically generated by subtracting the target model's geometry from the healthy model.To slice an object, a CAD model is exported as an stereolithography tessellation language (STL) model, which is accepted by most slicer applications.An STL representation is a collection of triangles that represent an object's exterior surface boundary [9].During the slicing process, the STL model is sliced into thin layers (slices), typically around 0.05-0.3mm thick.A slicer converts a 3D model of an object into a series of 2D cross-sectional layers.The toolpath is generated on each slice with a specific linewidth, layer height, and percentage infill.In the printing step, 3D printers then build objects layer by layer using the sliced model, which is sent to them as instructions.Following the instructions provided by the slicing software, the printer deposits material in a precise pattern.Lastly, the quality and accuracy of the printed object are tested.Measurements, checks for defects, and comparisons with the original design may be involved.In in-situ skin printing, the options for any post-processing are not available, and the quality control capability is limited as the implant is made to work on the wound.The current 3D in vitro-printing technology is based on the following principal: (i) the printing workflow is based on planar slicing, and (ii) it prints on a flat surface [10].These working conditions result in certain limitations due to planar deposition [11].3D structures are produced using planar slicing in bioprinting.The final 3D product is constructed by stacking 2D planar slices or layers of the desired 3D structure on top of one another.Printing a skin implant in-situ where the printing surface is not flat is not feasible when utilizing 3D printing technology built around planar slicing and designed to build on a flat surface due to issues like the stair casing effect [11].
The application of the current in-vitro-based 3D printing process in the field of bioprinting is limited because, in the case of in-situ skin implant fabrication, the fabricating is done on the wound site and not on a flat controlled surface.The process of slicing is one of the most critical steps in implant-tissue design used in bioprinting in order to create thin layers of cells/biomaterials for 3D constructs [11].3D printing technology is often used in various applications, but in some cases, such as when creating skin implants, the effects of the printing process can be critical [3,12].In order to improve the flexibility and capabilities of this technology in more complex printing scenarios, more complex 3D printing techniques that allow the slicing in three-dimensional free-form surfaces are needed.Bioprinting of skin can be performed in a number of ways, including extrusionbased [13], laser-based [14], and inkjet-based [15].Various applications lend themselves to each of these approaches, and each has its own advantages and disadvantages.The process of inkjet bioprinting involves depositing cells or biomaterials layer by layer onto a substrate with an inkjet printer.The in-situ bioprinting technique for skin was originally demonstrated in 2010 and utilized ink-jetting as a method for spatially arranging cells and extracellular material and was based on a planar printing framework [16,17].Murine wound models (3 × 2.5 cm) were printed using bio-ink containing 10 million fibroblasts for the dermis and 10 million keratinocytes for the epidermis.This approach can achieve higher resolution by using smaller inkjet nozzles as a simple and inexpensive alternative to laser-assisted bioprinting.In laser-assisted bioprinting, cells are manipulated in three dimensions using a laser-induced forward transfer mechanism [18].In one study, skin cells with human mesenchymal stem cells that were laser printed showed a cell survival rate of around 90% and the cells were observed to maintain proliferation after the laser transfer.Laser-based bioprinting is more expensive and complex but is able to achieve printing at higher resolution.The process of extrusionbased bioprinting involves layering materials onto a substrate through a pressurized nozzle.An experimental study in 2018 demonstrated the ability to extrude biomaterials and cells into wounds modelled on mice and porcine [13].A lightweight and portable device and a bioink consisting of fibrinogen, hyaluronic acid, alginate, collagen, and human fibroblasts were delivered into the epidermis and dermis through microfabricated cartridges.An 0.3 mm thick skin implant layer was applied to a wound surface of 2 cm × 4 cm in porcine models on day 20 and showed re-epithelialization.As one of the most commonly used techniques for bioprinting, this approach is relatively simple and inexpensive.Although various approaches to bioprinting differ in terms of the deposition mechanism of the biomaterial, the rest of the printing workflow revolves around layer-by-layer deposition on a planar surface.
Traditionally in printing, sliced layers are deposited in a flat or planar manner, which can result in the weakening or delamination of layers under directional loads, such as tensile stress [16].Moreover, due to conversion of the 3D model section to 2D layers results in a geometric loss and produces the wellknown stair-casing effect [11].Stair-casing can also be described as the step-wise representation of a sloped surface (as illustrated in figure 2).Additionally, the printed fibre layup arrangement is known to affect the mechanical integrity of the object [19,20].The use of adaptive slicing can reduce the stair-casing effect of planar printing by creating non-uniform build layers by adjusting the layer thickness according to the shape of the object being printed [21][22][23].Another strategy to reduce the effects of planar printing is to slice the object with multi-directional tool paths, dividing it into different regions that are printed in different orientations [24,25].Another approach employed in fabricating complex structures in 3D printing is the multi-directional slicing method for conformal printing.An example of a simple and efficient multi-directional slicing algorithm is presented [26].While this approach utilizes planar slicing, each plane is determined based on the geometric relationship between the plane and the 3D model, allowing for the printing of long curvilinear tube-like structures.Alternatively, the use of curved layers as a means of enhancing surface smoothness and reducing stair-stepping has been explored before [27,28].In order to enhance surface quality and reduce 'stairstepping' in the final product, the surface is parametrically approximated.However, these techniques are not suitable for all surfaces [29].Recently, there has been significant interest in the development of techniques that enable printing on non-planar surfaces, particularly within the bioprinting community.One example involves evaluating a robotic path for material deposition by projecting the planar toolpath onto the deposition surface [30].The algorithm was tested by printing a simple linear raster in a single layer on top of a non-planar 3D printed model, achieving an accuracy of 200 µm.Another study presented a non-planar slicing algorithm that blends planar and non-planar layers for reconstructing geometries, improving aesthetics, and electro-mechanical properties of 3D prints is presented [31].The internal structure is built using planar layers, while the external shell utilizes non-planar layers, each having a shell and an infill.Tested on a 5-axis robotic printer, the approach adeptly printed on complex substrates and bone defects, outperforming existing methods by handling both top and bottom non-planar surfaces efficiently.In another example, a cylindrical slicing method for additive manufacturing, creating nonplanar toolpaths wrapped around a cylinder to generate parts suitable for additive turning method is developed.The model undergoes slicing into cylindrical layers, with each layer having an incrementally larger radius.This process yielded threedimensional toolpaths suitable for additive turning method.This approach addresses the lower tensile strength observed in conventional additive manufacturing and often reduces or eliminates the need for support structures.The method's effectiveness is validated using a six-axis robotic manipulator equipped with a fused filament fabrication end effector and an external turning axis [32].Another study presented work on designing nonplanar paths for single-shell layered robotic 3D printing and addresses challenges related to bifurcating shapes [33].The authors introduce heuristics for target selection and surface segmentation, ensuring a uniform distribution of paths and preventing holes near bifurcations.The research also presents methods for interpolating multiple target curves on a single shape and handling asymmetric target curves.Fabricated prototypes successfully showcased the applicability and effectiveness of the proposed techniques.In order to reconstruct the surface of a wound, an alternative to expensive laser scanners is a simple design for a touch probe based on a light and spring system, which is presented [34].This design offers a cost-effective solution.Free from surface slicing can produce a mechanically robust structure by exploiting the varying orientations between layers.It allows both the tensile and shearing components of the axial load to be decomposed, resulting in a stronger structure and a higher resistance to deformation with displacement.Since the layers vary in orientation, stress is distributed across the structure and not concentrated in one direction.For complex hydrogel bioprinting, another study outlines a method for 3D printing where a desired geometry is first imported, and planes in the X-Z and Y-Z axes are generated at increments corresponding to the desired print path width [35].These planes intersect with the surface to create major paths, which are connected into continuous paths within a layer using a nearest neighbor algorithm.The resulting layers of paths are offset and duplicated to create the full thickness of the print.GCODE extrusion values are calculated based on factors such as nozzle size, material viscosity, and print speed.The process allows for prints with either a single path direction or alternating path directions, and material changes can be inserted as needed.
In order to design implants for skin wound healing, it is important to understand the structure and properties of skin tissue.The skin is the largest organ in the human body and serves many important functions.It protects the internal organs, helps regulate body temperature, and serves as an exterior cover from surroundings [36].It is a complex tissue with three layers; each has distinct properties and functions.The outermost layer, the epidermis, serves as a barrier against external substances and prevents water loss [37].It is about 95 micrometres thick and has an elastic modulus of 1.5 MPa [38][39][40].The main extracellular matrix components in the epidermis are keratin and collagen [41].The layer underneath the epidermis, called the dermis, is about 0.8 millimeters thick and has an elastic modulus of 0.02 MPa.The innermost layer, called the hypodermis, comprises blood vessels, nerves, and hair follicles.It is about 0.8 millimeters thick and has an elastic modulus of 0.002 MPa (ten times less than the dermis) [13].
This work presents a slicing design and tool path generation methodology for a skin implant based on free-form surface slicing.Our approach enables the creation of implants with multiple layer sections, each slice with a different surface design and toolpath parameters and is free of the stair-casing effect.With this approach, each of the three sections of the skin implant can be designed to have properties like porosity and mechanical strength that are native to each skin layer.Moreover, the proposed method allows the fabrication of skin implants with an enhanced degree of geometric fit and avoids the effect of planar fabrication, like the stair-casing effect.We also present the mathematical models that are used to represent freeform surfaces and demonstrate the applicability of the models to generate G-code files for non-planar slicing surfaces of skin implants.We also provide visualizations of the simulated toolpaths and show some test results to illustrate the effectiveness of this approach.

Planar slicing method
The planar slicing process for bioprinting starts with a triangulated mesh representation (STL model) of the implant geometry.STL file is a collection of many triangulated facets 'ζ' representing the exterior of the body, defined by coordinates of vertices 'v' and normal vector 'n' (see figure 3) [21].Planar toolpaths for bioprinters are created by slicing STL models into horizontal cross-sections.A 2D polygon or the exterior boundary of an implant is created by intersecting the model of the part with a plane.After being printed with a certain layer thickness, stacked 2D slices will approximate the 3D object.Calculating the intersection of the STL model of the implant with the slicing plane creates the boundary of each 2D sliced polygon (see figure 3).This is done by computing the intersection of the slicing plane with every triangular facet in the STL model, which is a simple geometry problem.The slicing plane and a facet plane have a line of intersection bounded by two points if they intersect.The boundary of the 2D sliced polygon is formed by these line fragments.A suitable toolpath trajectory is then calculated based on the infill pattern, which determines how the cross-section's interior is filled.Typically, each layer of the linear fill is rotated 90 • every other time, creating a 0 • /90 • infill pattern.A step-by-step illustration of the planar slicing procedure is presented in figure 3.

Surface slicing method
In comparison to planar printing, where an object is sliced with a horizontal plane, surface slicing utilizes the free-form representation of a surface to create the layers of the object to be printed.First, the model representation of a free-form surface is described, followed by the procedure developed for slicing using.

Surface representation
Surfaces can be represented in computational geometry in a variety of ways.Parametric functions and implicit equations are two of the most common methods of representing curves and surfaces in geometric modelling.Surface slicing involves representing each layer as a parametric surface.In parametric form a x-y point is represented by independent explicit functions.To represent complex high-degree surface curves are numerically unstable and inefficient to process, as they must satisfy many constraints (the number of control points is directly related to degree).Several piecewise polynomial curves can be joined together at breakpoints called 'knots' .Segmental divisions of the parametric domain are marked by knots or breakpoints and are connected under continuity constraints.To represent a curve segment C i (u), any of the standard polynomial forms can be used.Bspline basis functions are utilized as weights, similar to Bezier basis functions.However, there are two notable differences in their application: firstly, the domain is divided by knots, and secondly, the basis function remains constant within each interval.
It is possible to represent parametric surfaces in various ways, and one of the commonly used methods is the tensor product form.In this approach, surfaces are defined as bidirectional curves using bivariate basis functions of u and v.These basis functions are derived from the product of univariate basis functions [42].A tensor product surface patch is created by moving a curve through space while enabling it to undergo deformations.A curve C(u) can be defined as a vector value function based on the parameter u, mapping a straight-line segment into threedimensional space.Similarly, a surface patch is based on two parameters u and v, and is formed by the mapping of a u-v plane into Euclidean three-dimensional space.
A curve with pth degree B-spline bases functions and control points P i can be represented as, ( A surface, in general, can be defined as, and a tensor product of a surface takes the form, where Furthermore, a slicing surface is a Non-Uniform Rational B-Spline (NURBS) surface patch with degree p in the u direction and degree q in the v direction here, the bidirectional net of control points is defined by {P i }, {N i,p(u) } and {N j,q(v) } are the NURBS basis functions.NURBS surface is reduced to a Bezier's surface patch if the control points for u and v are the same as the order of the B-spline basis function.
The strength of NURBS formulations is the ability to represent complex surfaces and conics such as ellipses, hyperbolas, and circles accurately.Furthermore, NURBS formulation offers local approximation.Control points can only affect a local portion of the surface if they are moved.To achieve local shape control, control point movement and weight modification are critical.Since the method has been adopted into many international standards, such as IGES, STEP, etc, it has become the most widely used geometric representation method in CAD/CAM.NURBS-based surface models can be accessed software such as Rhino 3D, which offers a Python scripting interface and access to its common API.The NURBS surface-based slicing process was implemented using the Grasshopper plugin for Rhino 7 and Python-based RhinoScriptSyntax API, which provides access to powerful NURBS functionality.

Surface slicing procedure
Once the desired surface for slicing is modeled, the rest of the procedure is similar to the planar slicing procedure.The selection of the slicing surface governs the output surface characteristics of the object.In in-situ printing of implants, a free-form surface fitted to the scanned point cloud of the wound/defect site will result in implant with a surface profile that is similar to wound geometry.An implant sliced with a surface matching the exterior of the implant will yield a high degree of surface smoothness on the outer surface.Next, a set of vertically offset surfaces spaced at layer height is generated.Intersection of each surface in the set is computed with the geometry of implant to yield the boundary of slices that exist on each surface and are bounded inside the implant model (see figure 4).Intersection of each boundary curve with respective surface generated the slices on which the toolpath is computed.For each slice, the perimeter toolpath is computed by offsetting the boundary curve on the surface by a distance equal to half of the linewidth (printing parameter).Next, infill raster is generated for each slice by extracting the first two iso-parametric curve in in the u and v direction from the underlying surface.Seed points for the infill curve are generated by diving the two seed curves in smaller segments equal to linewidth and the resulting point are extracted.The length of these segment controls the amount of infill and the final porosity of the implant.At each of the seed points ISO curves on the surface are extracted and sorted in an array.The collection of perimeter and infill curves represent the toolpath movement of the deposition nozzle.Lastly, the toolpath curves need to be converted to G-code format which are sequential point-to-point movement commands along the path curves.The software workflow of surface slicing is illustrated step-by-step in figure 5(a).

Toolpath generation and flow calculations
Each G-code command contains instructions for the position of the nozzle and also the amount of filament to be extruded along the path.A typical G-code command of 'G0 X1 Y1 Z1 E1' would mean a movement to coordinates (1, 1, 1) while extruding 1 unit of filament.The E value is the length of filament with a diameter d f needed to fill the volume defined by the print area A e and path length L e .In Slic3r software, the print area is approximated by a rectangular center with a semi-circle on either side [43].In this study, the cross-section of the printed fiber or the print area A e is represented by an ellipsoidal cross-section along the travelling path length of the nozzle.by an ellipsoidal cross-section or extrusion area A e across the length of the travelling motion.The height of this rectangle is the layer height, and its width is the deposition line width.
A e = π * w e * h l (5) where E is the length of extrusion and L e is the path length to be travelled from the current coordinates to the position defined in the G-command.The final Gcode output is implemented according to formatting and the firmware of the bioprinter.

Materials
To synthesize visible light-based GelMA [44], 10 g of gelatin (type A, gel strength 300) from porcine skin (G2500, Sigma-Aldrich) is dissolved in 100 ml phosphate-buffered solution (PBS) while stirring at 200 rot min −1 , and maintaining the temperature between 37 • C-45 • C (to avoid thermal gelation) for 90 mins.For functionalization of gelatin, 6 g of methacrylic anhydride (94% purity, 2000 ppm topanol A as inhibitor, Sigma-Aldrich) is slowly added in dark conditions while vigorously stirring at 1500 rot min −1 for 3 h.After the reaction, the solution is centrifuged to remove unreacted methacrylic anhydride, followed by dilution of the supernatant solution with an equal volume preheated of ultrapurified water.The resulting solution is transferred to a dialysis membrane tube (12 kDa) for dialysis against ultra-purified water for 7 d at 40 o C. After, the pH of the GelMA solution is adjusted to around 7.4 using 1 NaHCO3 (1 M), followed by freeze drying for 7 d.
Visible light-based GelMA bioink is amalgamated by dissolving 1 g of freeze-dried GelMA in 5 ml of PBS while stirring and heating at 40 o C.After GelMA has fully dissolved, 0.2 g n-vinylcaprolactum (98% stabilized, Sigma-Aldrich), 400 µl of triethanolamine (TEOA), and 20 µl of eosin-y free acid in dark conditions [2].Bioink is crosslinked under cyan light (500 nm) delivering power at 25 mW cm −2 for 30 s.

Experimental setup
The experimental verification of surface-based printing was conducted using a setup comprising of a Dobot Magician robotic manipulator running on Marlin, an open-source Arduino-based firmware.In the printing mode, the system exhibited a remarkable resolution of up to 0.1 mm and enabled printing within a maximum volume of 150 mm × 150 mm × 150 mm.This product is marketed with a maximum rated payload of 500 g, arm length of 320 mm, and a maximum speed when moving in a straight line of 800 mm s −1 .This arm has an integrated motor controller that can realize numerous motion functions, such as linear and arc interpolations.The motion of the manipulator is controlled by GCODE programming sent from the computer via the serial interface.Each line of the GCODE script indicates the target point and amount of material to be extruded.Since the command lines are sent to the printer sequentially, the printer has to wait for the first command to execute before reading the next command.Dobot Magician in the 3D printing mode allows for the use of RepRap Marlin 3D printing framework and allows for communication protocol that is native to most of the commercial 3D printing devices.For localization of the hand model, visual system incorporated two cameras: a USB camera (Microsoft LifeCam Studio) that streams at a rate of 30 fps with a pixel resolution of 1920 × 1080, and a secondary 16 MP (ELF USB) camera.Both cameras were two-dimensionally calibrated to the printing surface using the perspective calibration model.Prior to the calibration, the image underwent thresholding and a particle filtering step.
The print head was specifically customized to accommodate two distinct material types: polymers and hydrogels.Polymers, for e.g.PLA and PCL, were extruded through a heated nozzle measuring 0.4 mm in diameter.Hydrogels, such as Gelatin methacryloyl (GelMA), were dispensed through a motor-driven syringe (10 ml) dispenser, connected to a deposition needle (ranging from 22 G to 26 G) via a black feeding tube.By modifying gelatin with methacrylate anhydride, a photo-cross-linkable GelMA biopolymer was created, capable of crosslinking under visible light.This process employed eosin Y as the photo-initiator, in conjunction with TEOA and vinyl caprolactam (VC).The composition of hydrogel bioink consisted of 20 µl of eosin Y, 400 µl of TEOA, 0.2 g VC, 1 G GelMA in 10 ml PBS.The LED lamp emitted CYAN light at 515 nm at an irradiance of 25 mw cm −2 .The functional in-situ bioprinting setup is presented in figure 5(b).
For demonstration purposes, a hand and a face models were printed separately with wounds of different geometries and thicknesses using a planar desktop 3D printer (Prusa Mk3).The wound geometry is generated by subtraction of the healthy hand model with wound model.In practical applications where the healthy model is not available, other techniques for computing the implant geometries are required [45].An important input to the surface slicing procedure is the slicing surface which can be computed from the scanned surface profile of the wound or can flexibly be selected according to the design requirements.In the first case, where the surface is defined from the point cloud, a simple method such as that described in [46] can be used to approximate the wound surface from the point cloud generated from the 3D profile scanner.While it is a good approach to use the wound surface for the initial layers to maximize contact, other types of surface can be used to slice the implant as well.This is demonstrated in figure 2(b) three different surface profiles are used to slice the three sections of the skin implant.It is also suggested that the top layers be sliced with a surface that represents the exterior of the healthy model to ensure an aesthetically smoother match with the wound boundary.To validate the printability and applicability of the surface slicing method the implant on the hand model is printed with PLA material with a total of 3 layers and the face model is printed with PLA and GelMA hydrogel.

Registration and localization of the target printing platform
Localization of the printing area/platform within the robotic workspace is a crucial step to ensure a successful print when printing on foreign objects.To achieve this, cameras were mounted to provide a clear, unobstructed view of the model and any associated tags placed on the phantom model and the printing platform.These cameras were calibrated, capturing calibrated grid points to estimate intrinsic and extrinsic parameters.During this calibration process, threshold operations were conducted, followed by the application of a particle filter.This approach was instrumental in accurately determining the pixel coordinates of a circular grid pattern.Subsequently, the target's registration was accomplished through a feature extraction process, utilizing a grayscale pyramid template matching algorithm.Utilizing these cameras, an initial point cloud dataset of visual tags on the workspace was captured.From this dataset, one point was selected as the workspace origin, which was then set as the robotic workspace origin.
In practical applications, a 3D scanner would be employed to capture a high-resolution scan of the phantom model.This scan, serving as the reference dataset, is crucial for the effective application of the Iterative closest point (ICP) algorithm.The phantom head/hand model was positioned within the robotic workspace, aligning with this reference dataset.The robotic arm played a pivotal role in capturing a secondary point cloud dataset.This was achieved by carefully positioning the printing nozzle on the designated tags or selected landmarks and recording these points.The ICP algorithm was then applied, aligning the point cloud data captured by the robot (consisting of tags/selected markers) with the high-resolution 3D scan or the corresponding CAD model.Adjustments to the algorithm's parameters were made iteratively to ensure optimal alignment with minimal residual error.
Upon accurately localizing the model, the coordinates of the CAD model or the 3D scan were transformed into the robotic arm's coordinate system.This transformation is critical, particularly when designing implants on the wound site of a phantom head/hand model.The implant's toolpath is generated within the robotic workspace's coordinate system, ensuring that when printed, it aligns perfectly with the localized platform.This procedure lays the foundation for the precise alignment of the printing process within the workspace.

Multilayer slicing of skin implant
The surface slicing methodology developed was applied to the application of in-situ bioprinting of a skin wound defect model.For demonstration, a wound was created on a 3D hand model to generate the implant geometry.Different cases of slicing surfaces were simulated and presented in the following subsections.

Bottom-up and top-down approach to surface slicing
In the bottom-up approach, the surface of the wound is first fitted and evaluated from the scanned point cloud.Next this surface is used to vertically slice the implant geometry as presented in figure 6.In this approach the first slice exactly matches the wound site and avoids the formation of stair-case effect which is crucial in the application of skin implants.Moreover, an exact geometric match would maximize the contact area of the implant and the wound site, reduce implant misfit and possible displacement from the desired location.The formation of stair-cases in the contact surface produces void areas with reduced biological activity and transfer of nutrient in the implant.However, bottom-up approach would result in an exterior surface which is not controlled as the bottom surface can be geometrically distinct from the top surface.Bottom-up slicing is simulated in figure 6 and the top bottom view of the implant is also presented to visualize the resulting surface characteristics.
In the top-down approach, the exterior/top surface of the implant is used as the slicing surface of the implant model.Similarly, the exterior surface of the implant is used to slice the implant vertically downward.This approach preserves the exterior surface as the deposition nozzle is moving along the isoparametric curve lying on the surface.Figure 6 illustrates an implant with geometrically distinct top and bottom surface sliced with the top-down approach.The simulated G-code showing the final deposition pattern is also shared and shows the perseverance of the top surface after printing.Infill direction of each layer is rotated 0/90 • to yield a criss-cross pattern.

Multi-layered slicing for skin implants
To replicate a section of skin in bioprinting design for full-thickness wound healing applications, the implant should ideally be designed with three different regions mimicking the properties of the epidermis, dermis, and hypodermis.Depending on anatomic location, each region has different thickness and mechanical properties as discussed previously in section 2.4.Properties like porosity and material stiffness are known to affect cellular migration and differentiation [7,47].Moreover, the surface of the implant in contact with the wound site serves as the first barrier that contains the exudation of fluid, proteins, and blood cells.At the implant wound interface, the provisional matrix is formed which then guides the regeneration of the tissue constructs [48].Geometric characteristics like topography, degree of fitness, and smoothness of the surface are known to influence and be used to modify cellular responses like adhesion and proliferation at an early stage in healing [49].
By using a slicing design procedure, an implant with the tuneable micro-structural arrangement of deposition lines can be attained to guide cellular migration.Distance between the infill raster lines of the implant is controlled to attain specific porosities for each layer of the skin.Careful material selection yields the correct mechanical and structural properties native to each layer of the skin.Using the wound surface to slice the implant model (bottom-up approach), enhances the geometric fit of the interacting surface and avoids the area of voids caused due to stair casing effect.
The proposed method for free-form surface slicing is used to demonstrate the design of a skin implant with three different regions dedicated to the epidermis, dermis, and hypodermis.Figure 7(a) shows an example of the multi-layered design of a skin implant for wounds located on a hand model.The implant has a rectangular cross-section with measurements 15 mm × 10 mm, and a maximum thickness of 3 mm with three layered sections and a cover layer (see figure 7(b)).The bottom/interfacing layer is a free-from surface created to mimic the complex geometry encountered in the wound scenario.The wound model was created by subtraction of the wound with the hand model/ Hand model was printed with a high-resolution resin printer and scanned to generate the point cloud.This is done to replicate a practical workflow of the in-situ bioprinting of skin wounds.A surface fitted to the point cloud is used to slice the hypodermal (bottom or interacting) layer of the implant.Different surface profiles are used to slice the epidermis and dermis region.The top layer is sliced with the outer/top surface of the implant to enhance surface smoothness and fitting of the implant with respect to the wound site (see figure 7(c)).A stiffer top layer will act like a cover to protect the softer layers of the implant beneath it.
Moreover, since each layer, especially the top layer is very thin typically less than 0.5 mm (top layer), this would allow for only a few printing layers per section, for the top layer it may even be one depending on the bioprinter.In this scenario, planar slicing and printing become inefficient as the interlayer adhesion and geometric correctness become compromised.For the single-layer section, surface slicing is the only suitable strategy that replicates a complete section of skin in single-layer definitions.Another advantage of using surface slicing to create multi-layered skin implants is the interaction zone created in between epidermal, dermal, and hypodermal sections.The epidermal-todermal and dermal-to-hypodermal section interfaces can be designed to tune and facilitate cellular migration because these regions offer natural endpoints of biomaterial depositions lines with cells embedded coaxially.These interfaces are visible in 2D crosssectional view of the hand model with multi-layered slices corresponding to each skin layer presented in figure 7(a).

In-situ bioprinting of skin implant on a hand and face model
To facilitate the printing of biomaterial, a 4-degreeof-freedom robotic arm (Dobot) was customized.Ensuring precise in-situ positioning of the hand model in relation to the bioprinter was a critical task.A marker-based tracking and platform localization strategy was developed using imaging sensors and described in methodology section.This enabled the measurement of the hand position in the workbench coordinate system, which was then utilized to transform and update the G-code coordinates in real-time during printing.A marker-based tracking and platform localization strategy based on imaging sensors for in-situ placement of implant G-code was employed.This technique facilitated the accurate measurement of the hand position within the workbench coordinate system.These measurements were critical, as they were used to dynamically transform and update the G-code coordinates, thereby ensuring a seamless integration between the model and the bioprinter.
The bioprinter was verified by performing printing quality and resolution assessment for hydrogel and polymer printing.In summary the printing performance specs are as follows.When printing with hydrogel (F-127), the linearity (max error/length) of the printed lines ranged between ±0.1.The recorded line width of printed strands ranged between 0.25-0.42mm.For polymer printing assessment conducted on the robotic bioprinter resulted in line width around ∼100 µm ± 3 µm and layer resolution was verified to be 192 µm.Layer resolution was also assessed in case of non-constant depth cross-section scenario.The printing assessment results are illustrated in figure 8.
The surface slicing procedure we developed was carefully assessed through its application in simulating the in-situ bioprinting of a skin implant model.This evaluation aimed not only to showcase the technique's versatility but also its capability to adeptly handle free-form surfaces.A complex non-planar deposition platform was devised by simulating a wound, measuring 0.6 mm in depth, on both a hand and a face model.The creation of the wound implant involved computing the intersection of the healthy skin surface and the simulated defect.This implant was subjected to slicing procedures incorporating diverse surface designs, aiming to test and validate the methodology's flexibility and adaptability.A fitting surface design for slicing the implant was chosen, which was subsequently used for toolpath computation and G-code generation, as detailed in figure 5(a).
For the hand model, the implant was sliced to encompass a single surface, divided into three distinct layers, each measuring 0.2 mm in height.Figure 9(a-i) showcase the simulated G-code execution on the hand model, while figures 9(a-ii) and (a-iii) depict the successfully in-situ printed implant on the hand model.Similarly, for the face model, a total of three layers, each having distinct geometrical characteristics as seen in figures 9(b-i) and (b-ii) were defined.The bottom two layers were printed using PLA, and the top layer was deposited using a hydrogel formulation.This bioink was composed of acellular GelMA, using eosin Y as a photoinitiator.The toolpath generation considered various parameters such as a line width of 0.4 mm, a deposition nozzle diameter of 0.4 mm, and a feeding tube diameter of 1.75 mm.
The top layers of the implant were accurately aligned with the exterior surfaces of both the hand  and face models.A noteworthy observation was the absence of a staircasing effect in the in-situ printed implants.This successful outcome signifies not only the efficiency of the free-form surface slicing but also suggests its potential applicability in future in-situ fabrication tasks.

Challenges and limitations
In addressing the challenges faced in non-planar deposition, we acknowledge a few limitations and propose strategies for improvement.The compatibility of materials poses a concern, as bioinks might struggle to adhere to curved or inclined surfaces; exploring different bioink formulations and additives could prove beneficial here.Achieving high resolution and a smooth surface finish on non-planar geometries is another challenge, but can be mitigated by optimizing printing parameters and utilizing post-processing techniques.Additionally, the need to balance print speed with structural stability is recognized, and real-time monitoring and feedback systems might be a solution.Moreover, ensuring uniform cooling or curing is crucial and adjustable systems tailored to the geometry of the printed structure can be advantageous.
Software limitations poses another challenge but can be avoided through opensource collaborations or customized solutions.Concerns regarding calibration and error propagation can be addressed with advanced sensor systems and machine learning for real-time adjustments.The constraints of the printhead can limit printable structures, but versatile printheads can be an effective countermeasure.Positioning and localization are critical, and incorporating advanced sensors and computer vision can improve accuracy.Additionally, complex collision avoidance methods in path planning can be addressed by employing sophisticated algorithms.Lastly, improving the accessibility of printing surfaces can be achieved by designing robotic arms with an extended range of motion.Strategically addressing these limitations can pave the way for advancements in non-planar deposition in bioprinting.
In addition to the limitations previously acknowledged, we have identified specific constraints related to our hardware and algorithm that impact the performance of our non-planar deposition process.These limitations are crucial for understanding the scope and potential applications of our methodology.The geometry of the print head, particularly in our hydrogel extrusion system, plays a pivotal role.We use a long conical shaped nozzle (5 mm radius, 20 mm length), which allows for a maximum printing depth of 15 mm.The clearance angle is approximately 70 • with a 20 • added clearance.For the polymer printing head, the maximum depth at which the nozzle can effectively print is limited to 5 mm, and it can handle surfaces inclined up to 30 degrees relative to the horizontal plane.The printing speed was finetuned to 300 mm min −1 , with a traveling speed of 1000 mm min −1 .The smallest layer height tested on the bioprinter is 0.1 mm, catering to the need for fine resolution in certain applications.A major limitation of the hardware is its limited degrees of freedom.When printing on inclined surfaces, the print head remains aligned to the horizontal workspace.To fully harness the capabilities of surface slicing, a robotic printer with a higher degree of freedom is recommended.This would allow the printing nozzle to align with the normal direction of the surface, ensuring smoother finishes and preventing the smudging of printed lines.Another challenge is finding better localization strategies for positioning the platform onto the robotic workspace.The current approach accumulates error when manually positioning and collecting the point cloud.Furthermore, more points are needed to achieve a better estimate of the pose transformation of the platform coordinate.This limitation highlights the need for more precise and automated methods in setting up and calibrating the printing process, to enhance the overall accuracy and reliability of our non-planar deposition system.

Conclusion
Recently bioprinting techniques have been successfully employed to fabricate engineered tissue implants for wound healing applications due to their ability to create complex geometrical structures with the ability to provide regeneration support at the cellular level.Recent progress in the in-situ approach to skin bioprinting, where the tissue construct is fabricated at the wound site, is evident that it is a viable approach to future skin wound healing applications.In the in-situ bioprinting process slicing is an important step which creates the layers of tissue to be printed.Moving from planar slicing to surface slicingbased printing is a step forward in advancing the design-driven approach to designing of bio-printed implants.This study describes an approach to the design of an implant through advanced surface slicing.Planar printing effects like stair-casing can be avoided in the surface interacting with the wound side when an approximation of the native surface of the wound site is used as a slicing surface for the tissue implant geometry.Moreover, a multilayer slicing design and toolpath generation of a skin implant incorporating the epidermis, dermis and hypodermis is proposed.The developed methodology was implemented on a customized robotic printer delivering biomaterial.The overall quality of the final printed product is also shared and is evidence of the superior finish of the exterior surface, and the applicability of the methodology presented.Surface slicing makes it possible to design bio-print skin implants having a very thin and non-planar cross-section.A proper slicing design of microstructural features specific to each layer and interaction zones within these dermis, epidermis and hypodermis can facilitate regeneration at the cellular level.

Data availability statement
The data cannot be made publicly available upon publication because they are not available in a format that is sufficiently accessible or reusable by other researchers.The data that support the findings of this study are available upon reasonable request from the authors.

Figure 1 .
Figure 1.Illustration of the in-situ biopriming technique including the materials and material driving mechanism.Here, the printing platform is the target site on the biological host.

Figure 2 .
Figure 2. (A) Illustration of the staircase effect in the planar printing process, free-form surface slicing avoids staircases and produces smooth and geometrically accurate surface profile.(B) Realization of slicing layers in an in-situ bio-printed implant.Simulating Planar Slices in the top Section and varied surface profiles in the bottom.Surface slicing facilitates three-dimensional cell migration from the bottom layer to the top layer of the implant.

Figure 3 .
Figure 3.A step-by-step illustration of the planar slicing process, STL representation, overlay of model and slicing planes, creation of layer boundary, slice representation, toolpath generation and visualization of final deposition.

Figure 4 .
Figure 4.A step-by-step illustration of the surface slicing process, STL representation, overlay of model and slicing surfaces, creation of layer boundary, slice representation, toolpath generation and visualization of final deposition.

Figure 5 .
Figure 5. (A) Surface slicing and toolpath generation workflow is decomposed into three parts, slicer, toolpath generation and G-Code generation, (B) Functional setup of the in-situ bioprinter: (i) polymer in-situ printing of an implant on a femur model, (ii) in-situ printing of photo-cross linkable hydrogel under cyan light, (iii) overall setup of the bioprinter.

Figure 6 .
Figure 6.Visualization of the top-down and bottom-up approach to surface slicing.

Figure 7 .
Figure 7. (A) Visualization of implant, layers and slice design placed in the hand model with different views, (B) The illustration of the multi-layered design of skin implant where each section represents a layer of the skin, (C) Visualization of slices in each layer (epidermis dermis and hypodermis) of the implant sliced with a different surface.

Figure 9 .
Figure 9. Demonstration of in-situ bioprinting using surface slicing and toolpath generation procedure on a hand model, (A) (i) simulated model, (ii) and (iii) final printed model.(B) Demonstration of multi-material in-situ printed implant (i) simulated model, (ii) PLA in the base layer and (iii) GelMA on the top layer.