1. Introduction
Additive manufacturing (AM), regularly referred to as three-dimensional (3D) printing, is a set of technologies that manufacture objects from digital 3D models by layering material rather than subtracting it [
1]. As a result, it enables the creation of customized and highly complex component geometries that can be difficult to manufacture using conventional processes. While the possibilities from a design perspective are endless, the production throughput speed of AM systems is slow, limiting their use for mass production [
2]. In this regard, AM is still considered a niche technology for the rapid prototyping and production of small-batch products. Therefore, today’s AM challenges revolve around enhancing productivity to meet industry demands for mass personalization.
Meanwhile, the latest advancements in AM combined with social networks are opening up a new world of possibilities for the manufacturing industry and fostering the development of new collaborative business models, such as social manufacturing (SocialMfg) [
3,
4]. A key factor behind the growth of SocialMfg is the ability of AM technologies to enable on-demand production and rapid innovation for small and medium-sized enterprises (SMEs), and even individual entrepreneurs [
5,
6]. In a nutshell, in SocialMfg, heterogeneous orders from multiple customers are coordinated to be completed by a distributed network of AM machines from several SMEs that interact and collaborate on a peer-to-peer (p2p) basis, as shown in
Figure 1. In this setting, it becomes critical to investigate production planning approaches for a network of AM machines in which several 3D printers are shared to allow on-demand production for flexible and geographically distributed production units.
In AM, production planning includes selecting part orientation, packing or nesting multiple parts together, setting process parameters, slicing, and assigning parts to machines. Each of these tasks requires a high degree of manual intervention, which affects the overall efficiency of the 3D printing process. Indeed, selecting the build orientation of a part remains a manual operation and relies on the knowledge and experience of the process planner. Furthermore, parts with similar production requirements are usually grouped by batch to meet order due dates [
7]. Several parts must be nested in a build plate for each batch and printed simultaneously in a single run to reduce the production time and operating costs [
8,
9]. Manually arranging the placement of a group of parts with complex geometries is, however, time-consuming and can become a difficult task [
10,
11]. As a result, the automation of production planning looks highly promising to stimulate the productivity of AM systems, especially for a network-based organization involving shared 3D printers.
This study investigates the feasibility of an automated multi-part production planning system in the context of SocialMfg. The paper addresses, in particular, three research questions: how to optimally orient a part, how to allocate parts to AM machines, and how to optimally place multiple parts in build plates. A further question is whether this automated production planning system can quickly assign parts, using the few possible build plates, while ensuring part quality. Although these questions have been substantially investigated in the literature, no study has yielded an integrated solution. However, it is necessary to consider part orientation selection, part-to-printer assignment, and nesting, as a whole, to increase AM production rates and lower operating costs.
In this work, we focus on a prominent material extrusion technology called fused filament fabrication (FFF), one of the most widely used AM techniques. Initially adopted for rapid prototyping, FFF is gradually used for industrial applications to deliver rapid tooling and spare parts. This paper aims to enhance the FFF process via an industrial-like production logic by providing a realistic solution to production planning and scheduling problems. First, efficient heuristic algorithms are presented for optimizing part build orientation, part-to-printer assignment, and the nesting of parts. In fact, in the field of combinatorial optimization, heuristic algorithms have proven to be effective. Compared to other methods, they allow for satisfactory results with less computational effort. A web application (web app) is also developed in which the parts’ stereolithography (STL) files are entered, and the packing result is returned. Lastly, the effectiveness and operability of the developed system are investigated using a case study with real-world components and comparative analysis.
The contribution of this work is threefold:
As part of the SocialMfg, this is one of the first works in AM production planning and scheduling that includes part orientation selection, part-to-printer assignment, and two-dimensional nesting;
Orientation-dependent factors that affect the part quality and printing time are considered, and the two-dimensional (2D) packing is solved using a rasterization technique and quadtree representation. Moreover, the proposed 2D nesting algorithm outperforms the top existing methods in terms of packing density and computational time;
A real-world case study to evaluate the proposed method confirms the effectiveness of considering part orientation and nesting in AM machine scheduling.
The balance of this paper is arranged as follows:
Section 2 summarizes the related work and indicates research gaps.
Section 3 describes the scenario considered and details the proposed methodology. The prototype web app and a case study are reported in
Section 4. In
Section 5, the performance of the proposed method is discussed. Finally,
Section 6 provides the conclusion to this investigation.
3. Methods
In SocialMfg, orders from several customers can be allocated to a network of AM machines. Each order can include multiple parts. After receiving the orders, planners compose batches of parts to be assigned to AM machines, according to customer specifications and different planning objectives (e.g., reducing operating cost and processing time). Concerning a particular printer, multiple parts composing a batch need to be optimally placed to use the printer efficiently. However, when placing several parts in a print bed, the space utilization ratio must be maximized to lower the production time and cost, and the quality of the parts must be guaranteed [
10,
27]. In addition, with the FFF process, producing multiple parts in a single run does not necessarily improve productivity if part orientation is not optimal. Part orientation, nesting, and part-to-printer assignment are all significant considerations in this situation. As a result, the methodology presented here begins with a group of heterogeneous parts assigned to one or more FFF 3D printers. First, the optimal build orientation of each part is identified. Afterward, the optimally oriented parts are taken as an input set and are assigned to the FFF 3D printers. Finally, parts are optimally placed in build plates according to two objectives: to maximize the print bed utilization and ensure the quality of the parts.
Figure 2 shows a graphic depiction of this approach.
The following assumptions have been formulated to limit the production planning problems to our research objectives.
The parts to be oriented and nested are assigned to a FFF 3D printer and have identical manufacturing requirements. In other words, the service provider and service demander agreed on the parts’ materials, production deadline, and characteristics.
The optimal build orientation of each part is selected before the nesting process. Nevertheless, the rotation of the parts along the vertical axis is allowed because of its relatively small impact on the quality of printed parts [
22,
30].
It is essential to clarify that AM service providers receive diverse printing tasks from multiple customers. Thus, some parts can be pre-oriented adequately by customers. Accordingly, this paper explores the optimal build orientation determination for a single part instead of orientation optimization for several parts in a build, as in the work of [
10,
27].
The optimization strategy adopted here can be segmented into three consecutive stages. The first stage involves optimizing each part’s build orientation separately to improve the production quality. Then, the second stage aims to assign the parts to FFF 3D printers to minimize the makespan, ensure load balance among the printers, and efficiently use the manufacturing resources. The last stage involves placing the parts on build plates in the most compact way to achieve higher productivity with the FFF 3D printers. The following paragraphs of this section detail the heuristic algorithms proposed to solve these combinatorial optimization problems.
3.1. Heuristic Algorithm-Based Part Orientation Selection
In theory, a part can be built in many possible orientations. By orienting the part in different directions, there is a significant difference in part quality. Therefore, optimizing part orientation is crucial in AM. For many industrial applications, the surface quality of the part is critical. Good surface quality is more appealing and gives greater dimensional accuracy necessary for the correct functioning of assembly parts. In actual experiments, it is found that the key to achieving good quality printed parts with the FFF process is to prevent overhangs. Indeed, the overhanging surfaces of an STL model are difficult to print; they usually require additional support structures and print poorly.
Nevertheless, there are admissible overhangs. These are typically overhanging surfaces with angles between the normal vector and the build direction lower than 135°. Therefore, it is preferable to differentiate the support contact area [
34,
35] (i.e., the overhang that requires support structures) from other tolerable overhanging surfaces. Intuitively, minimizing the support contact area would reduce the need for support structures, thus leading to better surface quality and decreasing the post-processing time. As a result, build orientation optimization is the determination of a desirable orientation that minimizes the support contact area. It involves generating a set of alternative build orientations (ABOs) and determining the best build orientation from the ABOs generated.
Another way to enhance the surface quality of the parts is to maximize the area of the non-stepped surfaces [
36,
37]. It is possible to achieve this by maximizing the bottom surface area (i.e., the area of the part in contact with the build plate). There are at least two reasons to consider optimizing this criterion. First, surfaces horizontal to the build plate do not have a stair-stepping effect, guaranteeing a good surface quality. Second, using a large area as the bottom face can drastically decrease the number of layers and the build time. It is also necessary to consider the perimeter of this bottom face because for STL models with a spherical shape, for example, the bottom face could be a circle without any resulting area. Accordingly, in the present work, three orientation-dependent factors are considered when searching for the optimal build orientation: support contact area, bottom surface area, and bottom surface perimeter. These can be directly computed using geometrical analysis of the STL model [
34,
35,
36]. These factors are weighted and summed to calculate the degree quality for each ABO.
The optimal build orientation determination procedure is formalized with pseudocode, as shown in Algorithm 1. The algorithm requires an STL file as input and produces an STL file optimally oriented as output. The appropriate weights to assign to each orientation-dependent factor must be found because the optimal build orientation depends strongly on the chosen weight values.
Algorithm 1: Pseudocode for the orientation optimization algorithm |
Input: Unoriented STL file Output: Optimally oriented STL file
1: Generate the alternative build orientations of the part (Oi)
2: Compute the orientation-dependent factors (Fj) of the i-th alternative orientation
3: for each value of the j-th factor of the i-th alternative orientation () do 4: Convert each orientation-dependent factor value into a number in [0, 1] as follows:
5: Normalize the converted results using
6: end for 7: Assign the weights to the considered factors
8: Compute a summary value of factors for each alternative orientation
9: Determine the optimal build orientation for the part
10: return the optimally oriented STL file |
3.2. Heuristic Algorithm-Based Part-to-Printer Assignment
As stated in
Section 1, this paper investigates the production planning of a network of dispersed AM machines to meet the low-quantity needs of multiple customers. The network of AM machines can be made up of unrelated parallel machines that can accomplish the same task but have different capacities. The entire available build volume determines the capacity of an AM machine. The problem is allocating parts from multiple customers to a network of AM machines, with varying operating costs and speed characteristics, while minimizing the total production cost and time.
According to the customer orders, there is a set of parts with various sizes, heights, and geometries. The orders are allocated to AM machines on a part-by-part basis, considering the part sizes and heights, and then divided into batches or printing jobs. In fact, due to the limited build volume of AM machines, some parts may not be able to be manufactured on all available machines. For example, a part higher than the maximum height supported by a machine cannot be assigned to that machine.
When given a set of parts, each with a different build time and several available AM machines, the part-to-printer assignment involves allocating all parts to machines with the goal of optimizing the workloads. As the SocialMfg can receive multiple print jobs from several customers and a network of various AM machines, production scheduling decisions must be relatively quick to effectively schedule these jobs for all the distributed 3D printers. Therefore, this study proposes an optimized LPT algorithm [
38] to solve the part-to-printer assignment due to its simplicity and practical effectiveness. Indeed, LPT has good adaptability to a variety of scheduling tasks. This algorithm sorts parts in non-ascending order of their build time and then assigns them to the machine with the earliest end time. In particular, it entails attributing the parts one at a time to the FFF 3D printers to minimize the processing times of the machines. The LPT rule schedules the longest tasks first so that no large task overruns at the end of the schedule, significantly extending the execution time of the last job. The total manufacturing times of all the parts assigned to a machine is its completion time. The printing time is estimated after the parts are oriented in their optimal build direction. The heuristic procedure for part-to-printer assignment is realized through Algorithm 2.
Algorithm 2: Heuristic procedure for the part-to-printer assignment |
Input: Set of AM machines M, set of oriented parts to be printed P
Output: Batch of parts allocated to each machine
1: Estimate the build time of all the parts
2: Sort the parts in decreasing order of build time
3: while P is not empty do
4: Let Pk be the next part in the sorted order
5: if Pk can be scheduled then
6: Assign the part to the machine which has the minimum total processing time
7: Remove the assigned part from the list of parts
8: end if
9: end while
10: return parts allocated to AM machines |
3.3. Heuristic Algorithm-Based Nesting
The FFF technique allows the printing of multiple parts simultaneously when they fit the build plate. Nesting optimizes the process of laying out parts on the print bed of an AM machine. The gain is the reduction in the total processing time to build and arrange the parts. Manually finding the position of multiple STL files on the print bed can take exponential time. However, the nesting or part packing in AM should be relatively fast because, unlike in subtractive manufacturing, the only gain is production time (i.e., no waste or material). Thus, the time spent nesting parts becomes proportional to the build time.
The proposed nesting method considers the rotation of the parts along the vertical axis (i.e., build direction), in 90° increments, to find a better positioning, which can improve the packing solution in terms of compactness.
Figure 3 shows the flowchart of the nesting procedure. First, data are initialized to specify the spacing between each part and the printing space dimensions. Next, a rasterization algorithm transforms the STL models into raster images. The main iteration of the nesting strategy repeats until all parts have been placed. Within the space available in the print bed, parts are sequentially placed as far as feasible to the bottom, then, as far as possible to the left. The available space dimensions must be larger than part dimensions in order to arrange a part within the packing area. It follows that if this requirement is not met, the current packing area is abandoned, and another is tried until all available spaces have been explored. When the placement of the part is feasible, the selected slot is removed from the list of available space, and the part is removed from the part list. The next part is chosen once the previous one has been placed, and the same packing procedure is repeated. When all the parts in the input list are placed, the optimized part layout is generated as an STL file. The rasterization procedure and placement strategy are further discussed in the following subsections.
3.3.1. Raster Method
Here, the rasterization is the task of converting the STL file into a 2D bitmap. The simplest form of a bitmap, a black and white image, is used; all white pixels are represented as 0, meaning void space, and all black pixels are represented as 1, which means the presence of a part. Rasterization aims to divide the irregular shapes of STL files into discrete areas, which thus reduces the geometric information. The basic idea is that a blank scene whose size corresponds to the print bed is created at the beginning. The facets of the STL model are projected onto the scene as 2D triangles. Once a part has been placed in the scene, it is updated. In the first step of the rasterization process, each triangular facet in the STL model is transformed from 3D to 2D space using projection matrices. The second step is to fill all the pixels in the region covered by the triangles. These two steps are illustrated in
Figure 4. Finding out which pixels are covered by the resulting projected profiles, i.e., which pixel should be 0 or 1, is realized using the D-function [
33].
Part projection profiles are represented as region quadtrees [
39] to reduce the complexity and computation time. Moreover, 2D pixel dilation is used to handle the part spacing. This is an operation to enlarge the boundaries of the pixels. The raster method provides a simplistic and relatively inexpensive approach for processing the geometric representation of the STL files. In addition, it makes the test of possible placement trivial because we must simply check that all the pixels are located where the part will be placed.
3.3.2. Improved Bottom-Left-Fill Algorithm
In this paper, the proposed placement heuristic, called improved bottom-left-fill (I-BLF), follows the BLF strategy [
40], with a slight variation, using the lowest gravity center of the part. The algorithm will prefer the orientation where the center of mass of the part is as close as possible to the lower left of the build plate. For several parts, experiments have shown that placing the center of mass as close as possible to the lower-left leaves a maximum amount of space on the top right. The parts are placed using an exhaustive search, as the algorithm tries every possible orientation (relative to the vertical axis) for the parts. The center of mass of the part is calculated using the average of the coordinates of the pixels covered by the raster image. The placement algorithm is described in Algorithm 3. The sequence order of the parts is significant and can affect the solution obtained because the algorithm is greedy. Sorting parts from the largest to the smallest is the best approach; from the authors’ knowledge, it always leads to better results than sorting the smallest to the largest area.
The packing strategy begins with a print bed of fixed dimensions and a set of STL files. The part is placed according to the I-BLF strategy for each STL file. The packing position of the chosen part will be checked to see if it is viable. The algorithm performs two checks: first, it ensures that the part does not penetrate the boundary of the print bed. Last, it is verified that the part does not overlap with previously packed parts. If part
i fits in position
j, the part position is set as
j, and the void space of the layout is updated by deleting position
j. If part
i cannot be packed into all
j-th positions of the current packing area, the next available packing area is considered. The packing operation ends once all the parts on the list have been placed, and an STL file representing the nesting layout is generated.
Algorithm 3: Pseudocode for the improved-BLF packing algorithm |
Input: Set of STL files
Output: STL file (s) of the placement layout
1: Initialize print bed size and part spacing
2: repeat
3: for each part (Pi) of the set do
4: Place the part according to the BLF policy
5: Rotate the part to find the lowest gravity center
6: for the j-th position of the part Pi do
7: if the part can be packed into j-th position then
8: Set position j as the packed position of part Pi
9: Delete part Pi from the part list
10: Update the available space in the layout
11: end if
12: end for
13: end for
14: until the part list is empty
15: return placement layout as STL file |
4. Prototype Implementation and Case Study
In this section, the proposed approach is encapsulated into a web app to illustrate its effectiveness in solving the AM production planning and scheduling problems of multiple parts with a network of FFF 3D printers, and a case study is conducted.
4.1. Prototype Implementation
The web app is based on a browser/server architecture and consists of three main modules: a user interface embedded in a web browser, an autorotation module to find the best build orientation of the parts, and a nesting module to find out the optimal part layout. HTML, JavaScript, CSS, and other programming languages are used to build the web app. In particular, the orientation algorithm introduced in our previous work [
41] is adopted, as its reasoning capabilities align with the technique described in
Section 3.1. The LPT rule presented in Algorithm 2 has been implemented in Python language. Lastly, the 2D nesting algorithm detailed in
Figure 3 has been coded in C++. All the algorithms were tested on a computer with a 3 GHz Intel Core i5-9500 processor and 8 GB RAM.
The web app operation is as follows. First, the operator/user imports a set of STL files. The user interface serves as a visualization environment for manipulating STL models and an interface to the production planning and scheduling services. Second, if necessary, the user can invoke the autorotation function to orient the parts in optimal build orientation. The optimally oriented STL model is returned to the user. Then, the STL files can be assigned to the available FFF 3D printers following the LPT rule. Finally, the user can invoke the nesting algorithm to generate an optimal layout from the STL files. For this last step, the user needs to input the quantity of each part and the print bed size. Each build plate generated by the algorithm is returned to the user as an STL file.
4.2. Case Study
The operability and overall workflow of the web app are illustrated through a case study. A set of 19 non-identical parts (named 1 to 19 in
Figure 5), whose shapes reflect actual part geometries, are introduced.
Table 1 sums up the information of these parts. The aim is to optimize the STL files in terms of print direction before assigning them to FFF 3D printers and to compactly place them in build plates for fabrication. We assume that all the parts have similar manufacturing requirements and priorities.
Regarding the FFF 3D printers, we used a JG Aurora Z-603S-C and a JG Aurora Z-603S (hereafter Machine 1 and Machine 2, respectively) available in our lab; the first machine has a build volume of 300 mm × 200 mm × 200 mm, while the second has a build area of 280 mm × 180 mm and 180 mm in height. However, in most desktop FFF 3D printers, the parts cannot occupy the entire print bed area. In practice, the extruder cannot travel to the edges of the build plate to precisely deposit a layer. Therefore, to ensure an efficient printing process, we have defined a packing area of 280 mm × 180 mm for Machine 1, and 260 mm × 160 mm for Machine 2, instead of the full print-bed size. Furthermore, the spacing between each part is fixed at 1.5 mm to avoid overlapping due to the accuracy error of the 3D printer and to prevent stringing caused by excess filament oozing from the nozzle.
The web app operation for the case study example is shown in
Figure 6. First, the parts are uploaded to the web app user interface. The visualization window allows for the displaying of the selected STL file. Then, the parts are oriented in their optimal build orientation using the autorotation function. The web app provides an estimated build time for each STL file, which is necessary for the part-to-printer assignment step. The dimensions of the parts supplied in
Table 1 show that none of the parts is higher than the maximum height capacity of Machine 1 and Machine 2. As a result, all the parts can be assigned to both machines. The parts are selected individually and assigned to AM machines following the LPT rule in
Section 3.2.
Table 2 lists the results of the part-to-printer assignment.
The packing area of each printer is specified to generate the optimal layout for printing the parts. The batch of parts allocated to Machines 1 and Machine 2 can be produced in a single run, as shown in
Figure 7. In particular, the nesting result of Machine 1 (see
Figure 7a) exhibits the advantage of the I-BLF strategy, which allows small parts to fill up the void area left by the previously placed large parts. In addition, the large parts are present in the two machines; this helps to balance the workload and reduce the total processing time. As all components have the same priority, printing operations must be completed concurrently to minimize production delays and maintain consistent operating costs.
4.3. Performance Analysis
The ratio of the total projection area of all nested parts to the area of the print bed, called printing area covered (PAC) [
30], must be as great as possible.
Since the parts in AM have irregular shapes and freeform surfaces, it is challenging to guarantee a high PAC value. The defined spacing between the parts also reduces the overall PAC value. Therefore, the performance of the nesting algorithm may vary in different situations and is heavily influenced by the geometry of the parts. As the objective of this paper is to investigate the feasibility of an automated production planning system, the benchmark criteria for evaluating the efficiency of the proposed method are the number of build plates generated and the computation time. The nesting results for the case study example are calculated in tens of seconds, as shown in
Table 3, indicating that the proposed method exhibits satisfactory performance. The computation time includes rasterization and part placement.
5. Discussion
5.1. Comparison of the Proposed Nesting Approach to Existing Methods
A comparative study is conducted to illustrate and validate the efficacy of the proposed nesting method with other existing methods reported by the authors of [
30,
31], and the results are listed in
Table 4 and
Table 5, respectively.
When the packing results of the approaches detailed in [
30,
31] and the proposed method are compared, the proposed method outperforms the others in terms of packing efficiency and computing time.
Table 4 shows that better nesting results for the test case in [
30] are obtained using the method proposed in this paper. All the models to be nested are present in the generated nesting layout (see
Figure 8), unlike the layout arrangement obtained using the left-border-down-border (LBDB) heuristic and NFP placement strategy detailed in [
30], where a part was not present. Moreover, as shown in
Table 5, approximately 97.5% of the first print bed is used compared to 81.2% in the scene-driven method [
31], resulting in a 16.3% increase in PAC value. The proposed method packed 25 parts (see
Figure 9), while the approach reported in [
31] only packed 20 parts in the same printing area. These performances are mainly due to the ability of the I-BLF algorithm to fill the void spaces surrounded by parts already placed, which allows for increased compactness.
Comparing this study with two existing methods has demonstrated that the proposed method can provide viable nesting solutions, with maximum print bed utilization ratio and high compactness, considerably quickly. Thus, the process planner can benefit from the time saved, to a certain extent. In the SocialMfg environment, this advantage makes it possible to process many parts quickly. In addition, with such a system, service providers can quickly and easily adjust production plans when additional parts are introduced into the initial batch.
5.2. Multi-Parts Production in SocialMfg Scenario
Recently, SocialMfg has gained significant interest from researchers and manufacturers. It provides a network-based production approach in which distributed service consumers and providers can interact and share resources. In the SocialMfg environment, several print jobs from multiple customers may need to be assigned to a network of FFF 3D printers. In such a scenario, there is a need for software solutions to allocate parts to printers rapidly. The work presented in this paper corresponds in this direction. Indeed, the proposed approach can improve the production rates of FFF 3D printers by packing multiple parts into a single print bed to ensure the efficient use of AM resources.
Some of the assumptions made in this study must be discussed to provide new prospects. In particular, negotiation, order allocation, and resource sharing techniques between multiple service providers have not been studied. However, investigating these mechanisms will respond to major scientific concerns, which will help advance the SocialMfg paradigm. Indeed, in a network of FFF 3D printers, order splitting, and resource sharing might be considered to be a strategic measure to balance production and meet production deadlines. Transferring some workloads from one service provider to another may reduce the maximum processing time. Nevertheless, it should be noted that decomposing a print job into sub-jobs to balance production in AM may not lead to a considerable advantage. Indeed, splitting a job entails dividing the part into numerous bodies, each of which will require an assembly afterward.
6. Conclusions
This paper introduced a multi-part production planning system for a distributed network of FFF 3D printers. Part orientation selection, part-to-printer assignment, and nesting of the parts are carried out successively to minimize the total production time and cost while ensuring part quality. A comparative study verified the performance of the proposed method, and a real-world case study demonstrated its feasibility and added value. The findings of this study indicate that the proposed nesting algorithm, which is based on a rasterization technique and an I-BLF algorithm, exhibits good performance in most cases. Furthermore, with its robustness and relatively low computation time, the proposed method can be employed in a SocialMfg context where multiple parts must be efficiently assigned to distributed AM machines.
Despite its effectiveness, the proposed approach can still be extended in many ways. For instance, this study only considers 2D nesting because of the FFF process, while many AM technologies allow pieces to be stacked vertically. As a result, future investigations could be conducted to provide effective packing solutions for LPBF processes where parts can be stacked on top of each other. Besides, as heuristic algorithms for scheduling can lack generality, future studies could overcome this issue by training a reinforcement learning model or a neural network capable of generating highly efficient AM machine scheduling solutions.