Conformal Wireframe Nets for Trimmed Symmetric Unit Cells in Functionally Graded Lattice Materials

: Tessellating a periodic unit cell of lattice material to ﬁll a design space in complex geometries has many challenges arising from their computer-aided design (CAD) modeling intricacy. A solution to this difﬁculty is the use of trimmed micro-truss lattice structures with a conformal net. This paper presents a novel algorithm for constructing conformal lattice net as wireframe of one-dimensional line segments suitable for Bravais cubic symmetric truss-based topologies. The novel algorithm is an excellent candidate when dealing with lattice structures using cubic, body-centered cubic (BCC), face-centered cubic (FCC), and/or diamond unit cell conﬁgurations. The wireframe structure is easily transferred into one-dimensional beam elements for microscale optimizations to obtain a functionally graded lattice material. It is shown that introduction of the lattice net resulted in a signiﬁcant reduction in the mass of the optimized design. at the intersections of one or more struts and a strut is a line or a member that is connected by two nodes. Crystallographic planes are deﬁned when they can be drawn through a unit cell using only the nodes within that unit cell and that the resulting plane is either coplanar with the struts or intersects the nodes exclusively. A crystallographic plane may also be deﬁned by symmetry elements within the unit cell if those planes pass through nodes.


Introduction
A periodic micro-truss structure, also known as truss lattice or lattice material, is generated by tessellating a unit cell in a 2D or a 3D infinite periodicity. The most common example of a truss lattice material is the cubic and BCC unit cell. Truss lattice materials expand materials selection design space through providing meta-materials for advanced engineering applications [1]. The high specific properties of lattice materials make them an attractive hybrid material to save weight and costs [2]. However, due to their complex geometries, manufacturing such microstructures was near impossible a few decades ago. Nevertheless, lattice materials have been gaining popularity due to the advancements in additive manufacturing.
Due to the complexity of the micro-structure of truss lattice materials, where it involves a huge number of elements, the possibility of solving all underlying equations in full detail is computationally expensive and might be impossible. Accordingly, the laws of greatest importance are the principles of symmetry where the lattice is modeled through a unit cell. Such concept in continuum mechanics finds its roots in solid-state physics where a lattice is mainly concerned with replicating the strengths from atomic bonds commonly seen in metals and metallic alloys. Examples of atomic bonds and their strengths can be seen in diamonds where carbon atoms share all their valence electrons with other neighboring carbon atoms forming what is called a diamond lattice. The structure of the diamond lattice is known to have the highest tensile strength among all atomic topologies and could be a good candidate for creating strong micro lattice structures [3,4]. The number of possibilities for lattice topologies is endless. However, only symmetrical lattice structures with clear crystallographic planes are considered in this paper. The most common symmetric lattice topologies which are also analyzed in this paper include unit cells with Cubic and Body-Centered Cubic (BCC), Face-Centered Cubic (FCC), and diamond geometries [5].
There exist many methods for modeling truss lattice structures in computer-aided design (CAD). These range from the utilization of voxels to implicit surface definitions to generate the interior and exterior lattice topologies [6][7][8][9]. When it comes to implementing lattice structures into a design, there exists three main strategies [6]. The first is a swept interior lattice which distorts the lattice to meet the curvature of the design domain. The second is by directly meshing the design domain with elements and then converting those elements into the desired unit cell topology afterwards. The third is a trimmed interior where the periodic lattice pattern is conserved and is then truncated once outside the design domain. Sweeping methods require significant user intervention as well as panning and are very time consuming to produce. The problem is more apparent for complex geometries where transitions between sections does not guarantee a consistent unit cell size. Meshed domains also require a user defined mesh, which can be time consuming. However, if the unit cell size is changed, then the entire mesh will be required to be redone. The unit cell size could also be inconsistent and is subject to warping in the vicinity of curved geometries.
There are many advantages for swept and meshed lattice regions such as ease of application and limited complexity in modeling. The exterior of a domain can also be easily closed off using the correct lattice topology. However, connecting the exterior struts of the trimmed lattice is not as easily defined, especially in three-dimensional lattice configurations. An exterior mesh of structures connecting interior struts together is known as a conforming skin, lattice net, or a conformal lattice net [6].
Many of the proposed methods focus on modeling the interior lattice and omit the lattice connections on the surface. Some CAD applications, such as NX [10][11][12], opt for Delaunay triangulation to connect the lattice at the surface, which is considered among the simplest solutions. The drawback of using Delaunay triangulation for a lattice net is its dissociation from the interior lattice geometry does not always match the interior lattice geometry. The most robust lattice creation tool in the market currently is nTopology [13], which offers a suite of tools to insert a wide array of lattices. Sweeping, Voronoi meshing, and implicit modeling are available to users, however connecting trimmed lattices together at the surface is not supported [13]. Intralattice [14] is another lattice creation tool which presents the user with many options for inserting lattice into a closed volume which also includes trimmed lattice creation using rhino [15]. Unfortunately, at this time of writing, there is no option to connect the cut struts together to create a conformal lattice net using Intralattice. One open-source MATLAB code known as GIBBON, developed by Moerman, allows its users to create and optimize meshes of lattices structures inside complex geometries. However, trimmed lattices are not available [16].
Current research in conformal lattices focus on the meshing approach instead of trimmed lattices. Sosin et al. [17] utilized sphere packing to automatically generate conformal strut connections in any volume and offer two compatible truss topologies. The trade off to Sosin et al.'s methods is that it is not applicable for trimmed lattices. Another research into conforming lattices is by Wu et al. [18], who combined homogenization and topology optimization to develop lattice structures which conform to principal stress directions and the enclosed boundaries. The resulting structure contains a lattice net which conforms to the interior lattice; however, it is not a trimmed lattice. Finally, Liang et al. developed an algorithm to create conformal lattice structures on parametric solid models and which also includes a lattice net generation procedure [19]. The work of Liang et al. also includes solid shell (or skin) creation in place of the lattice net and will generate a NURBS representation of the new object. Liang et al.'s methods will fit the interior lattice to follow the boundary of the closed geometry which will not produce an interior trimmed lattice structure.
There are several advantages for selecting a trimmed lattice over the other two methods including the lack of user intervention when generating the mesh as it can be automated, unit cells are not distorted due to curved geometries and can be oriented in any direction, in addition, the unit cell size is also independent of the geometry because geometry complexity is not a factor in the lattice generation process [6].
Consistently sized unit cells are important to correctly reflect the properties of the lattice topologies. This is even more of a concern for topology optimizations of lattice structures that rely on asymptotic homogenization [20] where the homogenized relative properties rely on perfectly repeated unit cell properties. When distortions in the lattice representation occur, the simulated properties are no longer an accurate representation of the unit cell.
The work of Aremu et al. [6] had successfully developed an algorithm to generate a lattice net for any lattice unit cell. This method uses voxels to generate both the interior and the exterior lattice structures. Very few other algorithms can be found in the literature that focus on trimmed lattice structures and conformal lattice nets [21]. Therefore, a methodology for building a conformal lattice net as a wireframe is explored in this paper.
An advantage of using a wireframe object for representing lattice structures is that it can be easily converted into one-dimensional beam elements for finite element analysis and for structural optimizations. The application of the wireframe for beam-sizing optimizations is demonstrated in a case study at the end of this paper to determine beneficial uses of a conforming net. Sizing optimization is also used to obtain an optimal functionally graded structure. Currently, there has been no algorithm to connect the exterior struts together as a mean of a wireframe object without resorting to voxelization techniques. In this work, an algorithm for generating a lattice net for a trimmed lattice is developed along with an algorithm for generating a lattice net for a trimmed lattice structure.
The major contributions of this paper include the development of a robust method to generate the interior trimmed lattice structure in a triangulated closed volume. The paper also presents the methodology to generate the conforming lattice net for symmetric unit cells of the Bravais family in wireframe format. Finally, the developed methodology is applied to a case study to a demonstrate the application of the lattice net on a loaded lattice structure and to obtain a graded material through design optimization.
This paper is organized in eight sections. After this introduction, Section 2 discusses the mathematical representation of a symmetric unit cell. In Section 3, the methodology for developing an algorithm to create both an interior trimmed lattices structure and conforming lattice net is discussed. Section 4 explains the procedure to build an interior trimmed lattice structure without a lattice net. Section 5 describes the methodology for generating the conforming lattice net for the interior trimmed lattice structure. Numerical examples on common geometries for the lattice net are shown in Section 6. A case study for optimizing the lattice wireframe for functionally graded structure is shown in Section 7. Finally, Section 8 discusses the advantages and disadvantages of the proposed workflow for a wireframe trimmed lattice structure with a conforming net.

Symmetrical Unit Cells
There are four types of lattice symmetries: rotation, reflection, glide-reflection, and translation [5]. Here, we use Bravais lattice symmetries to define the unit cell topology, where a Bravais lattice can be defined as an infinite array of discrete points with arrangement that appears exactly the same from all symmetrical points of view. Position of the Bravais lattice points can be defined by a position vector R of the form where n i are a set of integers or Miller indices and a i are the periodicity of the unit cell, while m = 3 is the dimensional space of 3D lattices [5]. On the other hand, a crystallographic plane in a symmetrical lattice can be defined using the Miller indices in crystal Bravais lattices. Miller indices are defined by the planes intercepting along the unit cell axes. As shown in Figure 1, for example, the cubic cell has three crystallographic planes which can be numbered using Miller Indices Bravais system as (100), (010), and (001) [5].
In this paper, lattice unit cells are constructed by means of nodes and struts where a strut is a member that connects two nodes. Using the Bravais lattice terminology, a node in this paper is equivalent to a lattice point and is illustrated as a red point in Figure 2. Nodes occur at the intersections of one or more struts and a strut is a line or a member that is connected by two nodes. Crystallographic planes are defined when they can be drawn through a unit cell using only the nodes within that unit cell and that the resulting plane is either coplanar with the struts or intersects the nodes exclusively. A crystallographic plane may also be defined by symmetry elements within the unit cell if those planes pass through nodes. three crystallographic planes which can be numbered using Miller Indices Bravais system as (100), (010), and (001) [5].
In this paper, lattice unit cells are constructed by means of nodes and struts where a strut is a member that connects two nodes. Using the Bravais lattice terminology, a node in this paper is equivalent to a lattice point and is illustrated as a red point in Figure 2 Nodes occur at the intersections of one or more struts and a strut is a line or a member that is connected by two nodes. Crystallographic planes are defined when they can be drawn through a unit cell using only the nodes within that unit cell and that the resulting plane is either coplanar with the struts or intersects the nodes exclusively. A crystallographic plane may also be defined by symmetry elements within the unit cell if those The presented algorithm in this paper exploits the crystallographic planes by using them to connect cut struts where a cut strut is a section of the lattice inside a domain as illustrated in Figure 5.
While this can easily be expanded to all types of symmetries, the proposed meshing algorithm in this paper is only concerned with unit cells with translational or reflection symmetries. This limits the algorithm to work exclusively with cubic lattices from the Bravais lattice family [5]. However, cubic symmetries can be easily adapted for many other types of lattice symmetries. As shown in Figure 2, Cubic Bravais lattices have three topologies including the simple cubic or the primitive structure, the Body-Centered Cube (BCC), and the Face-Centered Cube (FCC). Symmetrical lattices that are also applicable for the presented lattice net algorithm include diamond and octet-truss topologies as they have Bravais cubic symmetry as well. three crystallographic planes which can be numbered using Miller Indices Bravais syste as (100), (010), and (001) [5].
In this paper, lattice unit cells are constructed by means of nodes and struts wher strut is a member that connects two nodes. Using the Bravais lattice terminology, a no in this paper is equivalent to a lattice point and is illustrated as a red point in Figure  Nodes occur at the intersections of one or more struts and a strut is a line or a memb that is connected by two nodes. Crystallographic planes are defined when they can drawn through a unit cell using only the nodes within that unit cell and that the resulti plane is either coplanar with the struts or intersects the nodes exclusively. A crystal graphic plane may also be defined by symmetry elements within the unit cell if tho planes pass through nodes. The presented algorithm in this paper exploits the crystallographic planes by usi them to connect cut struts where a cut strut is a section of the lattice inside a domain illustrated in Figure 5.
While this can easily be expanded to all types of symmetries, the proposed meshi algorithm in this paper is only concerned with unit cells with translational or reflecti symmetries. This limits the algorithm to work exclusively with cubic lattices from the B vais lattice family [5]. However, cubic symmetries can be easily adapted for many oth types of lattice symmetries. As shown in Figure 2, Cubic Bravais lattices have three top ogies including the simple cubic or the primitive structure, the Body-Centered Cu (BCC), and the Face-Centered Cube (FCC). Symmetrical lattices that are also applica for the presented lattice net algorithm include diamond and octet-truss topologies as th have Bravais cubic symmetry as well. The presented algorithm in this paper exploits the crystallographic planes by using them to connect cut struts where a cut strut is a section of the lattice inside a domain as illustrated in Figure 5.
While this can easily be expanded to all types of symmetries, the proposed meshing algorithm in this paper is only concerned with unit cells with translational or reflection symmetries. This limits the algorithm to work exclusively with cubic lattices from the Bravais lattice family [5]. However, cubic symmetries can be easily adapted for many other types of lattice symmetries. As shown in Figure 2, Cubic Bravais lattices have three topologies including the simple cubic or the primitive structure, the Body-Centered Cube (BCC), and the Face-Centered Cube (FCC). Symmetrical lattices that are also applicable for the presented lattice net algorithm include diamond and octet-truss topologies as they have Bravais cubic symmetry as well.

Trimmed Lattice with Conforming Net Algorithm Workflow
An interior trimmed lattice is a periodic structure that retains its periodicity within an arbitrary volume where the boundary of the volume does not influence the interior. A conforming net is a skin on the boundary of the trimmed lattice structure which connects the trimmed sections together in a mathematical or a logical pattern. The methodology for a conforming net (or lattice net) is presented to create a wireframe representation for symmetric unit cells of the Bravais family. The full workflow for generating a trimmed lattice with a conforming lattice net is presented in Figure 3. Each sub-algorithm is discussed in detail in the proceeding sections of this paper. The trimmed wireframe structure is then used for micro-truss optimizations to obtain functionally graded lattice materials.

Trimmed Lattice with Conforming Net Algorithm Workflow
An interior trimmed lattice is a periodic structure that retains its periodicity within an arbitrary volume where the boundary of the volume does not influence the interior. A conforming net is a skin on the boundary of the trimmed lattice structure which connects the trimmed sections together in a mathematical or a logical pattern. The methodology for a conforming net (or lattice net) is presented to create a wireframe representation for symmetric unit cells of the Bravais family. The full workflow for generating a trimmed lattice with a conforming lattice net is presented in Figure 3. Each sub-algorithm is discussed in detail in the proceeding sections of this paper. The trimmed wireframe structure is then used for micro-truss optimizations to obtain functionally graded lattice materials.

Algorithm for an Interior Trimmed Lattice
This section presents an algorithm for generating an interior wireframe structure of a trimmed lattice. The methodology implements the work of Tang et al. [8] but replaces a functional volume (FV) with a closed surface that is composed of triangles such as the CAD geometry presented in StereoLithography (StL) files [22], as shown in Figure 4; the algorithm includes four stages.

Algorithm for an Interior Trimmed Lattice
This section presents an algorithm for generating an interior wireframe structure of a trimmed lattice. The methodology implements the work of Tang et al. [8] but replaces a functional volume (FV) with a closed surface that is composed of triangles such as the CAD geometry presented in StereoLithography (StL) files [22], as shown in Figure 4; the algorithm includes four stages.
The first stage for creating the interior trimmed lattice replicates a lattice unit cell to fill a volume. This can be achieved through voxelization in a three-dimensional space [6]. The advantage of using voxels to fill a closed volume is that the boundary voxels can be extracted to be used in the trimming section of the algorithm. By limiting the number of struts to be processed by ignoring those which are fully inside, the volume increases the computational efficiency of the trimming algorithm. After trimming, the fully interior struts are combined with the cut struts to create the final trimmed lattice structure.  The first stage for creating the interior trimmed lattice replicates a lattice unit cell to fill a volume. This can be achieved through voxelization in a three-dimensional space [6]. The advantage of using voxels to fill a closed volume is that the boundary voxels can be extracted to be used in the trimming section of the algorithm. By limiting the number of struts to be processed by ignoring those which are fully inside, the volume increases the computational efficiency of the trimming algorithm. After trimming, the fully interior struts are combined with the cut struts to create the final trimmed lattice structure.
The second stage determines which nodes in the voxelated structure are outside or inside the closed surface. This is to group line segments based on the placement of the nodes in relation to the triangulated surface. The methods to sort the nodes are those formulated by Tuszynski [23] and Sven [24]. Ray-triangle intersection algorithms [25][26][27] determine if the point is interior or exterior of a closed surface. If an even number of ray intersection is found, then the point is outside of the surface, the point is outside the closed surface if an odd number is calculated.
Ray-triangle intersections can be determined by evaluating the intersection point between the ray and the plane given by the normal to the triangles. If the intersection point is expressed in terms of barycentric coordinates for that triangle, then it is possible to classify whether the ray intersects the triangle. In a mathematical sense, a ray with direction d and origin o intersects a triangle with edge vertices , , and if the following criteria shown in Equations (2) and (3) are satisfied:  The second stage determines which nodes in the voxelated structure are outside or inside the closed surface. This is to group line segments based on the placement of the nodes in relation to the triangulated surface. The methods to sort the nodes are those formulated by Tuszynski [23] and Sven [24]. Ray-triangle intersection algorithms [25][26][27] determine if the point is interior or exterior of a closed surface. If an even number of ray intersection is found, then the point is outside of the surface, the point is outside the closed surface if an odd number is calculated.
Ray-triangle intersections can be determined by evaluating the intersection point between the ray and the plane given by the normal to the triangles. If the intersection point is expressed in terms of barycentric coordinates for that triangle, then it is possible to classify whether the ray intersects the triangle. In a mathematical sense, a ray with direction d and origin o intersects a triangle with edge vertices v 0 , v 1 , and v 2 if the following criteria shown in Equations (2) and (3) are satisfied: where t is the parametric distance along the ray and u and v are components of bary-centric coordinate system for a triangle. In practice, Cramer's rule is used to solve for t, u, and v [26]. Details of ray-search algorithms for interior/exterior point classification are shown in [12,13]. The third stage determines which nodes lay on the surface of the triangulated mesh. This stage is used for collecting information for classifying line segments in the fourth stage. Each node is projected onto the plane of each triangle and barycentric coordinates are used to check if the projected nodes lay within the triangles [14,15]. The criteria to determine if a node is within a triangle in three dimensions are where K(q, Λ α , θ) is a function to determine if the node lies on a surface, v 0 is the first vertex of a triangle in R 3 , β is the node being evaluated, n is the unit normal of the triangle, θ is the numerical tolerance, and Λ α is the barycentric coordinates of a point α for the triangle where α is equal to The fourth stage is the trimming algorithm which begins by evaluating each line segment from the voxelized structure and checks if an intersection occurs within it and the triangulated surface. Möller-Trumbore's ray-triangle intersection algorithm is adopted for this operation [16,17]. During the trimming process, the nodes at the surface of the trimmed structure are also extracted to be used for constructing the lattice net.
After calculating all possible intersections between the line and the triangulated surface, the algorithm is used to classify the intersections depending on the locations of the nodes from the second and third stage. The type of class determines if the line should be cut, kept, or rejected and which line segment pieces are to be retained. There are two main cases and eleven subcases for classifying line segments and is illustrated in Figure 5.
stage. Each node is projected onto the plane of each triangle and barycentric coordinates are used to check if the projected nodes lay within the triangles [14,15]. The criteria to determine if a node is within a triangle in three dimensions are where ( , Λ , ) is a function to determine if the node lies on a surface, is the first vertex of a triangle in ℝ , is the node being evaluated, ⃑ is the unit normal of the triangle, is the numerical tolerance, and Λ is the barycentric coordinates of a point for the triangle where is equal to The fourth stage is the trimming algorithm which begins by evaluating each line segment from the voxelized structure and checks if an intersection occurs within it and the triangulated surface. Möller-Trumbore's ray-triangle intersection algorithm is adopted for this operation [16,17]. During the trimming process, the nodes at the surface of the trimmed structure are also extracted to be used for constructing the lattice net.
After calculating all possible intersections between the line and the triangulated surface, the algorithm is used to classify the intersections depending on the locations of the nodes from the second and third stage. The type of class determines if the line should be cut, kept, or rejected and which line segment pieces are to be retained. There are two main cases and eleven subcases for classifying line segments and is illustrated in Figure 5. A hollow sphere is used to illustrate the different possibilities for a line segment intersection with a closed surface. Case 1 in Figure 5 shows six subcases where a node is on the surface of the triangulated surface while Case 2 contains five general subcases. The distinction between Case 1 and 2 is required because a node on the surface cannot be classified as either outside or inside the design space and the general method will fail. Dotted A hollow sphere is used to illustrate the different possibilities for a line segment intersection with a closed surface. Case 1 in Figure 5 shows six subcases where a node is on the surface of the triangulated surface while Case 2 contains five general subcases.
The distinction between Case 1 and 2 is required because a node on the surface cannot be classified as either outside or inside the design space and the general method will fail. Dotted lines are line segments inside the hollow sphere and solid lines are located outside of the closed surface. The goal of the trimming and classification process is to retain the interior (dotted) line segments. The line subcase is used to determine a starting point (or reference node) for a pairing algorithm to determine the correct line segment pieces to be extracted. Intersection points at the surface are saved as surface nodes to build the lattice net.
Appendix A.1 contains Algorithm A1 that exploits line segments classification given positions of the nodes and its intersections with the triangulated surface. Algorithm A1 uses Boolean logical arrays to sort the line segments efficiently. After sorting, the interior line segment pieces can be identified by grouping nodes without replacement based on their distance from a reference node. In addition, Appendix A.2 presents the process of selecting the proper reference node for collecting the interior line segment pieces where a reference node is either an intersection point or an interior point depending on the line segment case. After the final step, the interior line segments are retained as the final trimmed lattices structure. The entire algorithm for generating the interior struts and collecting surface nodes is shown in Appendix A.3.

Algorithm for a Conformal Lattice Net for a Trimmed Symmetric Lattice
For a given closed surface and an interior trimmed lattice, it is possible to connect the cut struts together using the common crystallographic planes of the unit cell. Closing open connections is important, as unconnected struts bear no loads and only unnecessarily increase the weight and manufacturing time of the final design. Connecting the exterior lattice nodes also helps with ensuring that the entire volume is utilized.
Before initializing the lattice net generation algorithm, the center of rotation (for the triangulated surface), surface node coordinates (intersection between the truncated struts and the triangulated surface), and a seeding point are required. The seeding point is the minimum coordinates for a unit cell or voxel centroid. The seeding point is used to orient and correctly space the contours along the triangulated surface. The center of rotation is used for plane-surface contour collection which rotates the triangulated surface so its z-axis is equivalent to the plane normal direction of the unit cells crystallographic planes. In addition, information about the unit cell crystallographic planes is required and includes the inter-planar spacing between common planes and their associated unit normal. Figure 6 displays and categorizes the necessary input required for the lattice net algorithm.
PEER REVIEW 8 closed surface. The goal of the trimming and classification process is to retain the interior (dotted) line segments. The line subcase is used to determine a starting point (or reference node) for a pairing algorithm to determine the correct line segment pieces to be extracted. Intersection points at the surface are saved as surface nodes to build the lattice net. Appendix A.1 contains algorithm 1 that exploits line segments classification given positions of the nodes and its intersections with the triangulated surface. Algorithm 1 uses Boolean logical arrays to sort the line segments efficiently. After sorting, the interior line segment pieces can be identified by grouping nodes without replacement based on their distance from a reference node. In addition, Appendix A.2 presents the process of selecting the proper reference node for collecting the interior line segment pieces where a reference node is either an intersection point or an interior point depending on the line segment case. After the final step, the interior line segments are retained as the final trimmed lattices structure. The entire algorithm for generating the interior struts and collecting surface nodes is shown in Appendix A.3.

Algorithm for a Conformal Lattice Net for a Trimmed Symmetric Lattice
For a given closed surface and an interior trimmed lattice, it is possible to connect the cut struts together using the common crystallographic planes of the unit cell. Closing open connections is important, as unconnected struts bear no loads and only unnecessarily increase the weight and manufacturing time of the final design. Connecting the exterior lattice nodes also helps with ensuring that the entire volume is utilized.
Before initializing the lattice net generation algorithm, the center of rotation (for the triangulated surface), surface node coordinates (intersection between the truncated struts and the triangulated surface), and a seeding point are required. The seeding point is the minimum coordinates for a unit cell or voxel centroid. The seeding point is used to orient and correctly space the contours along the triangulated surface. The center of rotation is used for plane-surface contour collection which rotates the triangulated surface so its zaxis is equivalent to the plane normal direction of the unit cells crystallographic planes. In addition, information about the unit cell crystallographic planes is required and includes the inter-planar spacing between common planes and their associated unit normal. Figure  6 displays and categorizes the necessary input required for the lattice net algorithm. The lattice net generation algorithm contains five stages, as shown in Figure 7: a contour collection stage, additional nodes from contour intersection and "important features" collections stage, then the lattice net generations stage which includes a projection filter, then a feature preservation stage followed by a final clean-up stage. A feature is a sharp  The lattice net generation algorithm contains five stages, as shown in Figure 7: a contour collection stage, additional nodes from contour intersection and "important features" collections stage, then the lattice net generations stage which includes a projection filter, then a feature preservation stage followed by a final clean-up stage. A feature is a sharp angle on the triangulated surface to be retained in the lattice net during the contour collection stage. After generating the lattice net, a postprocessing step is applied to remove any duplicate line segments. The final cleanup step, which collapses beams with less than three connections, is done to simplify the wireframe structure. A pseudocode is developed for the whole process and can be found in Appendix A.7.
R PEER REVIEW 9 three connections, is done to simplify the wireframe structure. A pseudocode is developed for the whole process and can be found in Appendix A.7.

Initial Contour Collection
The first step collects the contours for all possible planes along the triangulated surface. The rotation center is used to rotate the triangulated surface so that the z-axis matches the normal of a particular crystallographic plane as illustrated in Figure 8. A rotation matrix is calculated for each crystallographic plane normal and can be defined as [28,29] where is the rotation matrix to align ⃑ with ⃑, is the identity matrix, [ ] × is a skew-symmetric cross product matrix between ⃑ , and ⃑ and is a subscript for the crystallographic planes.

Initial Contour Collection
The first step collects the contours for all possible planes along the triangulated surface. The rotation center is used to rotate the triangulated surface so that the z-axis matches the normal of a particular crystallographic plane as illustrated in Figure 8. A rotation matrix is calculated for each crystallographic plane normal and can be defined as [28,29] where R i is the rotation matrix to align v i with u z , I is the identity matrix, [τ] × is a skew-symmetric cross product matrix between v i , and u z and i is a subscript for the k crystallographic planes.
where is the rotation matrix to align ⃑ with ⃑, is the identity matrix, [ ] × is a skew-symmetric cross product matrix between ⃑ , and ⃑ and is a subscript for the crystallographic planes.  If both vectors v and u are equivalent, then the rotation matrix R i cannot be calculated and is instead replaced with the identity matrix. Another condition which results in a singular rotation matrix is when v i = − u z ; R i and must be replaced with −I. The vector v i is the crystallographic plane normal while u z is the direction of the z-axis and is (0, 0, 1). Surface contours are collected at different elevations determined by crystallographic plane distances. The plane distances are the inter-planar distance between the same planes in a repeated unit cell structure. The planar elevations are calculated as z in = s iz + d i n, n = 1, 2, 3 . . . m where z in is a sequence of elevations, d i is the inter-planar distance, and s i is the re-oriented seeding point for crystallographic plane i. m is an integer number such that the maximum elevation is higher than the rotated triangulated surfaces highest surface node. s is the original coordinate of the seeding point and c is the center of rotation. Contour edges are computed using the Möller-Trumbore's algorithm for surface intersections [30,31]. As shown in Figure 9, one large equilateral triangle is used for slicing the triangulated surface; the contour edges are collected into organized lists to form a loop and then stored into an individual "bin" for each elevation and plane. For each contour, the nodes defining the path of the contour must be reoriented from the current z-axis to their original axis using R −1 i about c. A pseudocode for this process can be seen in Appendix A.4.

Additional Surface Nodes Calculations
Using the trimming algorithm, additional nodes are added to the input surface definition which are calculated from the intersections between the plane slicing contours. This occurs for lattice topologies such as BCC where an "X" shape of the interior struts must be projected onto the surface of the volume and can be seen in Figure 11a. In addition to the intersections, important sharp features can also be preserved. Important features can also be retained by supplying an edge list of sharp features. For example, the edges of a cube, shown in Figure 11b, are sharp features that can be preserved and retained in the lattice net. In MATLAB, this can be done using the function "featureEdges" [32].
tersections [30,31]. As shown in Figure 9, one large equilateral triangle is used for slicing the triangulated surface; the contour edges are collected into organized lists to form a loop and then stored into an individual "bin" for each elevation and plane. For each contour, the nodes defining the path of the contour must be reoriented from the current z-axis to their original axis using about . A pseudocode for this process can be seen in Appendix A.4.

Additional Surface Nodes Calculations
Using the trimming algorithm, additional nodes are added to the input surface definition which are calculated from the intersections between the plane slicing contours. This occurs for lattice topologies such as BCC where an "X" shape of the interior struts must be projected onto the surface of the volume and can be seen in Figure 11a. In addition to the intersections, important sharp features can also be preserved. Important features can also be retained by supplying an edge list of sharp features. For example, the edges of a cube, shown in Figure 11b, are sharp features that can be preserved and retained in the lattice net. In MATLAB, this can be done using the function "featureEdges" [32].
The additional nodes for both the contour intersection and important features are found by first rotating the contour lines and the important feature edges around the center of rotation so that the crystallographic plane normal points into the z-direction. This rotation strategy is the same as for the contour collection algorithm shown in Equation (7). The second step is to calculate the intersection nodes from the specified planar heights The additional nodes for both the contour intersection and important features are found by first rotating the contour lines and the important feature edges around the center of rotation c so that the crystallographic plane normal points into the z-direction. This rotation strategy is the same as for the contour collection algorithm shown in Equation (7). The second step is to calculate the intersection nodes from the specified planar heights for the given rotation. The heights or elevations are calculated using Equations (8) and (9). Edges in plane with the current plane or elevations are omitted. To find the intersection points, the feature and contour edges are converted into a parameterized line formulated as where t is the independent variable, and p 1 and p 2 are points along the line segment or edge. To solve for t, Equation (10) can be rearranged as where z in is a sequence of target elevations from the planar distances for a particular crystallographic plane i. A valid intersection occurs when 1 ≥ t ≥ 0. Valid intersection points are rotated about c with R −1 i and added to the "bin" (or list) of surface nodes bin with duplicate nodes removed. This bin of nodes is then used to generate the lattice net in the third stage. A pseudocode is written to further explain the method and is referred to as "Appendix A.5. Algorithm A5: Additional Surface Nodes" in Appendix A.5.

Connecting the Lattice Net
The proposed algorithm loops through all the contours and connects the cut struts together based on a collection of surface nodes acquired from the second stage. Note in this research paper that the surface nodes obtained by the intersection points calculated from the trimming algorithm are the same as those calculated from the contour-contour intersection nodes. For this reason, it is possible to construct the net independently from the interior trimmed lattice.
For a collection of contours for a specific crystallographic plane (i), the lattice net generation algorithm collects any surface nodes that lie within the specified contour loop into a list. That list is then converted into new line segments that represent wireframe sections of the lattice net.
When all the contours have been evaluated for the current plane, a projection filter is used to remove line segments that do not satisfy the unit cells strut orientation for that crystallographic plane. The filter also aims to remove zero-length line segments when projected into specific planes. If a line segment is accepted by the filter at certain angles, then it is retained in the lattice net. An illustration of this procedure can be seen in Figure 10a for a BCC lattice. The red segments are the accepted sections from the filter while the black sections are the rejected pieces. The summation of all the accepted contour sections will create the final lattice net. An example of the final lattice net and its construction is shown in Figure 10c.
There are two possible filtering methods developed in this work. The first filter works by comparing the ratio of the projected normalized crystallographic plane normal into the x, y, and z planes with the projected length of the line segments normalized directions into the same x, y, and z planes. However, any projection plane can be used depending on the type of lattice topology or crystallographic family. Projection of a line onto a plane can be calculated as where a is the normalized direction of the line, b is the plane unit normal, and g is the resulting projected line. For both discussed filters in the paper, the projected normal of the crystallographic plane is projected along with the list of line segments. If the line segment can satisfy the projection onto any of the three planes, then it is not rejected. A tolerance is given for the ratios to relax the acceptance criteria; a tighter tolerance would mean that the remaining line segments will need to strictly satisfy the projection lines. A tolerance of zero would work best if the curvature of the surface is zero such as a cube. For curved surface a higher tolerance is needed. Equation (13) is used to determine if a line segment will be accepted by the first filter.
where g i is the projected crystallographic plane normal onto the projection plane, g z is a projected line segment onto the projection plane, and θ is a tolerance level. The second projection filter method compares the components of the projected segments g z to g i and − g i as the filtering criterion. The criteria to determine if the line segment is accepted by the second filter type can be expressed as where j indexes the dimensional entries of the vectors. The second filter type cannot be applied to cubic unit cell crystallographic planes (100), (010), and (001) because all line segments will be rejected. However, this method has shown to work very well with BCC unit cell topologies for planes (110), (101), and (011). The pseudocode for the projection filters is given in Appendix A.6. There are two possible filtering methods developed in this work. The by comparing the ratio of the projected normalized crystallographic plan x, y, and z planes with the projected length of the line segments norm

Additional Connections for the Conformal Lattice Net
After the initial construction of the lattice net, unit cells could be projected onto sharp corners or features. If the unit cell size does not precisely match the dimensions of the sharp geometries, a discontinuity between the struts will occur at the sharp feature. This occurs when the corner of a unit cell is not placed directly at a vertex. Figure 11a shows a cube without any additional connections at the edges, while Figure 11b shows the addition of the important features into the lattice net. The added features allow structural loads to be transferred uniformly throughout the net eliminating discontinuities and improving the mechanical behavior of the lattice structure. has shown to work very well with BCC unit cell topologies for planes (110), (101), and (011). The pseudocode for the projection filters is given in Appendix A.6.

Additional Connections for the Conformal Lattice Net
After the initial construction of the lattice net, unit cells could be projected onto sharp corners or features. If the unit cell size does not precisely match the dimensions of the sharp geometries, a discontinuity between the struts will occur at the sharp feature. This occurs when the corner of a unit cell is not placed directly at a vertex. Figure 11a shows a cube without any additional connections at the edges, while Figure 11b shows the addition of the important features into the lattice net. The added features allow structural loads to be transferred uniformly throughout the net eliminating discontinuities and improving the mechanical behavior of the lattice structure.  To promote better continuity in the lattice structure, sharp features of the geometry are extracted and added to the lattice net. This is done by collecting sharp edges of the input triangulated surface and then organizing those edges into open and closed loops. Loops are defined as edges connected to other edges based on a common node. A closed loop is a sequence of nodes where the first and final nodes are identical while an open loop has different nodes at each end. The nodes at intersections or junctions between the open and closed loops are also identified and are added to the list of lattice nodes. Junction points are found if a node is referenced more than twice from the extracted edges.
The new struts are created by following the open and closed loops and collecting any of the lattice net nodes or junction points that fall within the edges into an ordered list or sequence. If each node in the ordered lists is given unique identification, then the new struts can be created by connecting the nodes together from their positions in a list. A pseudocode is for the process is found in Appendix A.8, labeled as "Appendix A.8. Algorithm A8: Additional Connections Algorithm" to explain the entire process.

Clean Up Step
The last step for the wireframe development includes a clean-up stage. Line segment connections are simplified by ensuring that all nodes are connected to at least three line segments. This does not include nodes that are used to conserve important features or sharp edges. After the net clean-up step, the interior trimmed lattice and lattice net are combined, and any duplicate line segments are removed from the structure. In a structural sense, the clean-up step helps improve connectivity by removing non-load-bearing connections and creates more efficient load paths.

Numerical Examples and Demonstrations
The importance of filtering the struts is shown in Figure 12a,b. The initial surface contours create additional vertical cuts in Figure 12a on the front and top faces. Figure 12b is the result of projection filtering to remove the unneeded contour lines. The effects of scaling by different unit cell sizes are shown in Figure 12e,f. The cylinder in Figure 12e contains small patterns where the unit cell is cut and produces nonuniform geometry radially. Figure 12f shows for smaller unit cell sizes the effects nonuniformity is diminished. Figure 12c,d where the front faces pattern is rotated 30 degrees and has a net pattern slightly smaller than the top and side faces.

Rotation of different sized unit cells is demonstrated in
(e) (f) Six crystallographic planes are observed in cubic Bravais lattices. FCC topology co ns six plane types and is a superposition of the Cubic planes and the BCC planes. F me lattice configurations such as diamond (Figure 13a) and the octet truss (Figure 13d side profiles of these topologies are equivalent to the BCC and FCC unit cell, respe ely. Figure 13b shows the front view of the diamond lattice is equivalent to that of t C lattice and its skin is meshed using crystallographic planes (110), (101), and (011) ure 13c. Six crystallographic planes are observed in cubic Bravais lattices. FCC topology contains six plane types and is a superposition of the Cubic planes and the BCC planes. For some lattice configurations such as diamond (Figure 13a) and the octet truss (Figure 13d), the side profiles of these topologies are equivalent to the BCC and FCC unit cell, respectively. Figure 13b shows the front view of the diamond lattice is equivalent to that of the BCC lattice and its skin is meshed using crystallographic planes (110)  Figure 13f displays a lattice net around the Stanford bunny model using only three crystallographic planes and no filter to connect an interior octet-truss lattice shown in Figure 13d. The resulting net is very similar to Figure 13e which had used all family planes from {111} and the projection filter. This shows the possibility to omit the filter and select a few planes of symmetry to connect all the cut struts together of a trimmed lattice.

Lattice Net Case Study Example for Engineering Applications
The purpose the lattice trimming algorithm is to generate a wireframe structure that can be embedded into any complex geometry. This wire frame geometry is then directly converted into a collection of beam elements in a finite element mesh for sizing optimizations. This section will demonstrate the performance of an optimized lattice structure meshed with different lattice topologies when a lattice net is or is not applied to the outside geometry. A simple Messerschmitt-Bolkow-Blohm (MBB) Beam [33] is used to compare the different lattice topologies and their performances when subjected to sizing optimizations.

Problem Formulation
The optimization problem is formulated such that design variables are the cross section radii of the beam elements and are named r i,1 and r i,2 seen in Equation (15). Tapered beams are used in the finite element mesh with the common joints as a unified design variable for all connected tapered beams. The advantage of using tapered beam elements is that the unified joints will reduce the number of design variables during the optimization. The optimization problem will be referred to as a lattice beam optimization and is described by Equation (15).
where r i is the cross-sectional radii of the ends of the tapered beams, KI is the global stiffness matrix as a function of the design variables, F is a constant force vector for static analysis, σ max is the maximum allowable stress (880 MPa), ρ i is the density of the material, L i is the length of the ith beam, and e is the number of tapered beam elements. The objective m lattice measures the mass. The minimum radii distance for the optimization is 0.001 mm and the maximum radius is 0.5 mm. Titanium was chosen as the material of choice and the young's modulus is rated at 11,400 MPa, Poisson ratio is 0.31, density is 4.506 g/cm 3 , and has a yield strength of 880 MPa. As a note to the reader, buckling is traditionally considered in beam sizing optimizations but is omitted due to limitations in the structural solver [34]. The effectiveness of the lattice net in this research will therefore demonstrate the benefits for stress constraint mass minimization. The MBB beam is meshed with different lattice topologies and includes Cubic, BCC, FCC, and the octet truss. The MBB beam is a double supported beam with a vertical force applied at the center. Figure 14 shows the MBB mesh where the yellow elements represent the lattice domain to be replaced with a trimmed lattice structure and the brown elements represent the solid domain to attach forces and boundary conditions. ith a lattice net, any beam elements whose nodes are twice conne are removed. The optimizations for the case study will be done in g the "BIGOPT" optimization algorithm [34].
BB Initial Problem, Yellow = Design Space, Brown = Non-design Space. mensions of the MBB beam are 20 mm in the x direction, 10 mm in t 20 mm in the z direction. The boundary conditions are applied su beam where the applied force is placed is free to move in the x-dire applied on the side of the beam without applied loads are free to m . The applied force is 500 N in the x-direction and will cause a max 0.0215 mm in the x-direction with a maximum von Mises stress o Pa. odels for the MBB beam meshed with lattices can be seen in Figu aphic planes, unit cell sizes, and plane distances for the lattice net co study are presented in Table 1. The projected planes for the filter w d z planes. The beams are then attached to the solid elements by tie contacts (contact surface), where the lattice beam nodes are the slave set and the solid elements as the master set. For test cases with a lattice net, any beam elements whose nodes are twice connected to the master set are removed. The optimizations for the case study will be done in Altair Optistruct using the "BIGOPT" optimization algorithm [34].
The dimensions of the MBB beam are 20 mm in the x direction, 10 mm in the y direction, and 120 mm in the z direction. The boundary conditions are applied such that the side of the beam where the applied force is placed is free to move in the x-direction. The constraints applied on the side of the beam without applied loads are free to move in the z-direction. The applied force is 500 N in the x-direction and will cause a maximum deflection of 0.0215 mm in the x-direction with a maximum von Mises stress of approximately 21 MPa.
The models for the MBB beam meshed with lattices can be seen in Figure 15. The crystallographic planes, unit cell sizes, and plane distances for the lattice net construction in this case study are presented in Table 1. The projected planes for the filter were set to the x, y, and z planes.

Results
The results in Table 2 show that when a lattice net is added to the outside of a trimmed lattice structure, the optimizations with the net had a significantly lower final mass. This indicates that an added exterior lattice net is beneficial when creating lattice embedded geometries for trimmed lattices. A lower mass will therefore reduce printing time and save on material costs. The topology with the lowest mass was the FCC topology. This could be a result of it having more favorable strut directions and connections and a larger unit cell size than the other topologies for this specific load case. The maximum stress in the FCC final design was also much lower than the constraint maximum, meaning that the final mass could potentially be much lower. Figure 15 displays the final optimized designs; the beam size distribution was fairly homogenous among the test cases and the majority of the beam's radii fell between 0.24 and 0.26 mm. The specific stiffness for the net-based optimization cases where much higher than those without the net. The octet truss, however, had decreased its specific stiffness as the results of adding the lattice net. However, specific strength had improved significantly for all cases from the addition of the lattice net.
The optimization problem posed assumes that the maximum stress in the beams does not exceed the yield strength of the material. Realistically, the maximum stress in the beams is not the highest stress seen by the complex structure but at the nodes connecting the struts together where stress concentrations are located. Current Euler beam theory cannot capture this phenomenon and incorporate it into the optimization process. This in turn resulted in lighter final designs than required for the desired loads. To avoid potential stress concentrations with Euler beams, a stricter stress constraint would need to be imposed or by applying a new beam formulation specifically for lattice struts. Some research has been attempted to create a new element type to more accurately model lattice struts and could take into consideration of the stress concentrations at the nodes [35,36]. As the methods for representing lattice struts improve, so can the application of beam optimizations on wireframe lattice structures.

Advantages and Disadvantages of the Current Lattice Net Algorithm
The main advantage of the lattice net algorithm is its ability to connect the struts of a symmetric unit cell of any size while maintaining the overall geometry of the triangulated surface. The ability to preserve important features is another advantage which helps promote continuity and shape. The lattice net construction is also very fast, even for a high number of surface nodes and plane intersections. Another crucial advantage is that connectivity is guaranteed among all cut struts, even if the lattice net does not follow the unit cell pattern very well. The final wireframe is also memory-efficient due to being comprised of a list of nodal coordinates and can be easily converted into a finite element mesh for optimization applications. Another key factor about the lattice net algorithm is that its creation is independent of the interior trimmed lattice. This is because all of the contour intersections between different crystallographic planes produce the same intersection points from the lattice trimming section. The final advantage is that a BCC combined with a CUBIC lattice net can be used for many lattice topologies that share cubic symmetries such as the diamond lattice.
Disadvantages include the lack of support for non-symmetric lattices. Truncated octahedron lattice structures cannot be used for the lattice net to accurately capture the projected pattern of the lattice on a surface. However, a BCC and cubic lattice net can connect all the cut struts of this topology because it contains Bravais crystallographic planes. A final disadvantage is that it is not robust and depends on the tolerance level of the projection filter. For complex surfaces, the projection filter may fail to filter out or over filter connected struts. At sharp curvatures, the connected struts for the net may be rejected more easily by the filter. There is also an issue of impossible strut connections at highly curved cross sections. The issue of projection onto curved surfaces for lattice nets has been noted by Aremu et al. [6] in their own implementation of conforming lattice skins. Irregular strut connections arise from complex geometries such as saddle points which give the algorithm the most problems. However, for flat surfaces, such as a cube or rectangle, the algorithm works very well as seen Figure 11.
In conclusion, the lattice net algorithm, while not perfect, is quite flexible as only two or three crystallographic planes are needed to connect all the cut struts together for most symmetric topologies as seen in Figure 13f.

Conclusions
A method for creating a trimmed wireframe lattice was developed. This method provides a list of surface nodes from the trimming operation to be used for constructing the lattice net. In addition, a novel method for constructing a conformal lattice net as a wireframe is presented. The generated lattice net is created by using the crystallographic planes from symmetric unit cell topologies. The lattice net algorithm functions by using contours from plane slicing at calculated intervals to connect surface nodes together which are then paired up and converted into struts. A projection filter is applied to remove unneeded connections and produce an approximate projection of the unit cell onto a closed triangulated surface. The proposed algorithm can produce a net for any complex geometry, and construction of the net is independent of the interior trimmed structure.
An engineering comparison for microscale optimization of functionally graded materials with and without lattice nets was also done. For topologies such as cubic, BCC, and FCC, the addition of a lattice net was beneficial during the micro-scale optimizations. The FCC topology performed best with the net as it required the least mass for the optimization load case. The performance improvement of the added net shows that the overall mass of the lattice structure was lower and yielded higher specific strength and stiffness.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.