4.1. Hierarchical algorithm for model slicing
Hierarchical processing refers to a series of parallel evenly spaced in-
cisal planes intersections with a model along the designated direction of layer slicing to acquire profiles of each layer section. The hierarchical al-
gorithm is based on the position information of triangles of an STL model, which is presented in Fig. 6.
Three key processes are required to determine the positioning for slicing the model:
a) A grouping method based on the position information of triangles: The value z is steeled numbered, which is in accordance with the incisal planes. By assumption, the minimum z of an STL model is Z0, the minimum z of a triangular facet is Zmin, and the maximum z is Zmax, then the sequence number n of incisal plane intersecting with the triangular facet is between number i and j which are calculated by the following equation:
Point V2 and intersections of other triangular facets and this incisal
plane are equally calculated.
c) Sequencing of the intersections: As is shown in Fig. 8, there are five calculated intersections for the incisal planes and triangular facets. The two intersections a and b on Δ 1 represent the first and second
vertex of the profile section. The intersection c from Δ 2, which is
equal with the intersection b, is taken as the third point, and so on, to determine the points so that they can be combined to ensure that the entire section profile is obtained.
4.2. Modified scan line algorithm for nozzle path planning
A modified scan line algorithm suitable for the nozzle path planning [49], which can accommodate the characteristics of cement mortar- based 3D printing for building components is proposed. The process
In Eq. (1) above, x represents the smallest integer of those that are not less than x, whereas x represents the biggest integer of those
successively goes through a profile scanning and a fill scanning, which is applicable to different sections including those comprising of irregu- lar-shaped inner profiles. Fig. 9 presents a flow chart for the algorithm.
4.2.1. Scanning of the profile
The inner and outer section profiles can be judged by the inclusion relation of the circumscribed rectangles. As shown in Fig. 10, the coordinate minimum points of the circumscribed rectangles of Profile
' ' '
a and Profile b are respectively E1(xmin, ymin), E1(xmin, ymin), and
' ' , y' ) for the coordinate maximum points. The
Due to the width of the extruded materials, the profile scan lines need to be offset, specifically, the original profile scan lines offset to the graphic entity interior by a distance d (d is half the width of the ex- truded materials, the same below). As shown in Fig. 11, the solid and
Fig. 6. The hierarchical algorithm process. Fig. 7. Schematic of the intersection of an incisal plane and a model triangular facet
90 J. Xu et al. / Automation in Construction 76 (2017) 85–96
Fig. 8. Developed pattern of the triangular facets and a section profile.
dotted lines are respectively the profile scan line and the profile scan line offset with P1(x1, y1)、P0(x0, y0)、P2(x2, y2) given. Then the coor- dinate after offset of a vertex P0(x0, y0) of the polygon profile scan line is
According to Eq. (4), all the vertices of a profile scan line offset can be calculated. Then the vertices are joined up successfully to obtain the off- set profile scan lines of the entire graph.