# Geometrical Degrees of Freedom for Cellular Structures Generation: A New Classification Paradigm
## 2 Design and Geometrical Consideration
### CS Generation
#### 2.5.2 CS Generation via Constructive Solid Geometry  
Constructive solid geometry (CSG) uses a sequential approach to represent a complex solid. CSG performs boolean operations on a set of primitives (cones, prisms, spheres) and stores the operations in a tree, as seen in Figure 17. A common method to represent a lattice structure using CSG is by creating CSs via representing the lines as cylinders and the nodes as spheres [4] and then joining them. Many problems arise from this method. First, the \"join\" operation can take a long time; this is because the only primitives that can be joined at once are the ones that are in contact. The second problem is the lack of smooth transition at the junction of the primitives. Eventually, when the structure is printed, the rough transition may result in stress concentrations. One simple way that has been found to overcome this challenge is to represent each node as a sphere where all the cylinder tips lie inside, as illustrated in Figure 18. Consequently, a boolean operation can be done to merge all cylinders and spheres into an RVE or a collection of RVEs into a more complex CS. Another way is to calculate the intersection between the cylinders and trim them such that they are flush with each other and then fill any gaps, as illustrated in Figure 19[105; 106].  
In an effort to tackle the issue of nodes connection, [PERSON] and [PERSON] [42] have suggested using an additional unit cell. Overall, their methodology goes as follows: they perform topology optimization, then they use a mapping function, they then populate the space with Functional Gradient Lattice (FGL). The interesting part of their work is how they connect the different unit cells; they create a different unit cell to take care of the connection between the regular unit cells. That connection is made using B-spline principles, which comes in handy when the initial unit cells have different diameters.  
Figure 16: Generation of a trimmed structure slice—analogous to a Boolean intersection [104].  
Figure 17: Example of a CSG tree: The “U” symbol stands for union and the “-” symbol stands for substraction.  
Figure 19: Cellular structure generation via CSG—resolving beam intersection using lattice structure lightweight triangulation algorithm [105].  
Figure 18: Cellular structure generation via CSG where spheres represent nodes and cylinders represent struts [4].  
The work of [PERSON] et al. [91] presents a method similar to [PERSON] et al. [104], where the authors resorted to subtracting a set of randomly spaced spheres from the design space to obtain the CS, as seen in Figure 20. In this methodology, the user can control the size of the spheres, and thus the overall porosity, as well as the overlap between spheres to control the degree of pore necking and inter-connectivity. In this particular case, the RVE is the void itself. [PERSON] and [PERSON] [107] have discussed a similar technique. There are two disadvantages to this approach. Firstly, there is a high computational cost of the boolean difference because the spheres are not necessarily overlapping, the number of subtractions that need to be done can be as high as the total number of spheres in the set. Secondly, the other drawback is the potential failure of such an operation; depending on the software used, subtracting two intersecting solids may not be possible. The main advantage of this is that it uses existing functions available in most CAD software; therefore, it is easy to implement for users with low experience.  
Presently, most CAD software uses a combination of BREP and CSG [108] to capture the complexity of the CS design space and to visualize such structures. The BREP format describes geometry as a combination of vertices, edges, and faces [108], while in CSG, it is done through union, intersection, and difference of primitive solids (e.g., squares, spheres) [108].