# An Accelerated Slicing Algorithm for Frep Models
## 4 Results  
### Case Study 1: Slicing of a Filter Model  
The first studied model was a filter for natural gas separation (Figure 7). This model could be used in optimization tasks, where the new geometry of the filter could be obtained by changing its parameters (Figure 7c). The reason for using the loop operation in the filter model was the complicated topology of its channels. Every channel should be placed in a specific area and rotated at different angles to reach the required density of the channels and the porosity of the whole filter. When the diameter of the channels was very tiny, the number of them increased dramatically. This phenomenon led to an increase in the slicing time. The unit cell in this model was one channel. Different shapes of one channel are shown in Figure 8.  
Figure 6: The process of contour extraction in one layer of the FRep model: (**a**) the full loop operation (**b**) the novel compound adaptive and acceleration criteria. (green lines—extracted contours, black lines—quadtree structure, red rectangles—precalculated bounded boxes of each channel of microstructure, blue point—point of interest). The filter model had 13 parameters: the filter height; filter radius; channel radius; N-pointed star channel; maximal angle channel rotation; distance between channels; thickness shell; shift of the channel from the center; maximal number of channels; type filling for the channels; shape of the channel entry hole; and the shape of the channel \(Z\) line. The unit cell function \(u(x,y,z)\) defines one channel of the filter FRep model. It is built from the profile function \(\omega(x,y)\). The set of used profiles is shown in Figure 9. The simplest circle shape (Figure 9a) is defined by  
\[\omega(x,y)=R^{2}-x^{2}-y^{2} \tag{4}\]  
Figure 8: Different shapes of channels. Figure 7: The filter model with channels: (**a**) the 3D object of the filter model; (**b**) cross-section of the 3D model with zoom; (**c**) Cross-sections of the filter model with parameterization examples; (**d**) the 3D object of the filter model with an X-Y cross-section. The result \(u(x,y,z)\) has the following form  
\[u(x,y,z)=\omega(x^{\prime},y^{\prime}), \tag{5}\]  
where the space mapping \(x^{\prime},y^{\prime}\) is defined by one of the following equations. For a sinusoidal mapping, it is  
\[x^{\prime}=x,y^{\prime}=y+\sin(\theta)*\alpha. \tag{6}\]  
For a twisting mapping, it is  
\[x^{\prime}=x*\cos(\theta)+y*\sin(\theta),y^{\prime}=-x*\sin(\theta)+y*\cos( \theta). \tag{7}\]  
For a zigzag mapping, it is  
\[x^{\prime}=x,y^{\prime}=y+\frac{2*\arcsin(\sin(\theta))}{\pi}*\alpha. \tag{8}\]  
In all the above-mentioned equations  
Figure 6:0  
where \(z_{1}\) and \(z_{2}\) are the bottom and top z coordinates of a channel, respectively; \(\theta_{1}\) and \(\theta_{2}\) are the rotation angles at the end points; \(\alpha\) is the amplitude of the space mapping. The operator of unit cell replication \(\gamma\) is  
Figure 6:1  
where \(x_{i}\) and \(y_{i}\) are the centers of the channels in the loop operation and \(\bigvee\) denotes the set-theoretic union. The application of the new slicing algorithm to the filter model with 2200 unit cells allows the reduction in the number of processed cells by 30% due to the novel compound adaptive criterion (Table 1). The contouring time was sped up 100-fold due to using the novel compound adaptive criterion with the novel acceleration criterion (Table 2). The tests were conducted 20 times for each filter model with different parameters (Table 3) with an XY-resolution of 0.05 mm. The average values were calculated. The results of contouring the one layer of the filter model with a different number of channels and different shapes of the channel's entry holes are presented in Tables 1 and 2 and Figure 6:2 It should be noted that the shape of the channels (sinusoidal, twisting, zigzag) almost did not affect the slicing time. The Table 2 with the experimental results shows that the use of spatial indexes significantly reduces the slicing time.