## 2 Modelling Tree-like Fractal Structures into CAD Parts  
The computational model aims to output CAD parts filled with tree-like fractal structures to manufacture lightweight parts (such as the lattice internal structures). The CAD model must be provided, which at this stage must include the cavities that require fractal fillings. We define the input CAD part with cavities as the shell. Furthermore, the fractal parameters (roots, branches, nodes, etc.), detailed in Section 3, must also be provided. With future development (i.e., testing the fractal structures' mechanical properties and creating a predictable model for how the fractal geometry affects the final part properties), the shell and the fractal structures may be generated automatically (using AI or other intelligent modeling tools) leading to generative design; however, this is beyond the scope of this study. Note that the union between the shell and the fractals must be clean (without the branches of the fractals piercing the CAD model and leaving artifacts on the surface of the part). The final outputs of the algorithm are STL files that are ready for 3D printing. Samples can be manufactured and tested, which in turn will provide valuable information for the mechanical part properties. As stated before, these tests will be used to generate a predictable fractal model and automatically generate the shell and fractal structures. However, at this stage, the shell and fractals must be provided (in order to build and test components with fractal fillings).  
The algorithm flow chart is presented (in a generalized manner) in Figure 1 and detailed as follows (in future sections, each step is explained in detail):  
* Step #0 defines the inputs for the algorithm. The first input is the CAD shell, expressed as a CAD model with internal cavities that require fractal filling. Figure 2 shows an example of a CAD shell formed by two hemispheres. Note that the shell is not necessarily a continuous solid as long as the discontinuous volume is filled with fractal structures, such as in instances where the fractals connect the multiple parts into a single rigid body. The algorithm's second input is a fractal parameter list (roots, branches, angles, etc.) detailed in Section 3.
* Step #1 computes a complete representation of the fractal structure based on the input parameters. This representation is one-dimensional, meaning that the fractal is defined only using points and line segments at this stage.
* Step #2 computes the intersection of each fractal structure (computed in Step#1) with the CAD shell. The goal is to connect the fractals with the shell without any artifacts remaining on the outer surface of the part. The output of this step is a fractal representation where branches that intersect the shell are trimmed. This representation is also one-dimensional.
* Step #3 applies volume to the one-dimensional fractal structures (the trimmed representation from Step#2). In this step, each fractal branch (represented by a line segment) is converted into a cylinder (radius provided in the inputs from Step#0), and all the cylinders form a union (the physical fractal structures). Furthermore, the physical fractal structures are united with the shell, resulting in the final CAD part.
* Step #4 converts the CAD part (fractal structures united with the shell) into an STL file format for manufacturing or FEA.
* Step #5 represents the final outputs of the algorithm. On the one hand, we can manufacture lightweight parts for various applications or testing samples. On the other hand, the CAD data are provided for FEA.