# An Accelerated Slicing Algorithm for Frep Models
## 1 Introduction  
Additive manufacturing (AM) technology provides an opportunity to produce parts with sophisticated geometry. Some 3D printers allow for manufacturing of structures with very thin elements. These opportunities inspire engineers to design objects with complex shapes and topology using computer-aided design (CAD) software packages or alternative numerical tools and manufacture such objects with 3D printers. Bioimplants, prostheses, filters, artificial tissues and other modern 3D objects having well-developed microstructures may contain thousands of tiny walls, channels, intersections, and other elements that comprise a complex topology for special applications. Modern CAD systems usually use the boundary representation (BRep) approach to describe the geometry of a modelled 3D object. This representation works well in most cases, but in the case of complex topology, such as grids or channelled bodies, it leads to errors in the geometry. The source of the errors often relates to the use of multiple small elements and the repetitive application of set theory operations to union, intersect, and subtract these elements. The BRep approach is prone to the generation of mismatching surfaces, open bodies and locked surface elements in 3D objects when set operations are applied in multiple iterations. The digital model developed with a CAD system is often exported to an STL file that is further processed with a software slicer to prepare some form of machine code (e.g., G-code) suitable for 3D printers' hardware controllers. The STL format has been the de facto standard for 3D printing since 1987 [1]. It represents the geometry of 3D objects with a set of triangles and their normal vectors that are not connected to each other but are arranged in 3D space in a form that allows 3D bodies to be completely enclosed by the surfaces [2]. When the geometry of a 3D objectis modelled with errors, there are openings in the object surface, intersecting triangles, flipped normal vectors and high-aspect-ratio triangles in the STL files. All these features lead to troublesome model slicing when preparing a 3D object for additive-manufacturing. Healing a triangular representation of the object often requires hours of work that make the STL format an inefficient representation of a 3D object. Another limitation of STL files is their inability to represent multi-material objects within one file. A new file format developed especially for additive manufacturing, the 3 MF format [3], is a good successor to the STL format in terms of digital representation of BRep-based models. The 3 MF format incorporates features necessary for 3D printing technology such as multi-material or multi-colour support, small file size, and digital signatures. Along with these advantages, it inherits the drawbacks associated with the polygonal mesh representation, namely, cracks and holes in the model surface, self-crossing triangles, inverted normal vectors, and others. Despite the downsides, the 3 MF format has gained popularity among 3D printer manufacturers and its use has spread within the additive manufacturing community. At the same time, improvements in the geometric representations 3D objects are in demand. The function representation (FRep) [4] is an alternative to BRep. This modelling technique guarantees the correctness of the resulting geometry for any arbitrary precision, due to the analytical description of 3D models. This technique allows for building of 3D objects with very complex topology, even for cases rarely handled by the BRep approach. The FRep files store no mesh; hence, no difficulty with triangular meshes is encountered. Additional benefits of the FRep technique are the small file size and natural parameterization of the developed models that allows for easy tweaking of single geometrical elements or a large assembly of parts with a simple change to a model parameter. Moreover, there are algorithms for constructing FRep from a BRep model [5].