A method for determining the feasibility of a shell model for slanted three-dimensional printing
By using the clipper library and recursive algorithms to calculate the stackable area of the shell model, the problem of difficulty in judging the feasibility of 3D printing of large molds with tilt is solved, and fast and accurate printing feasibility judgment and model posture optimization are achieved, reducing the cost of trial and error.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2023-09-26
- Publication Date
- 2026-04-24
AI Technical Summary
Existing large-scale mold tilting 3D printing technology faces difficulties in judging the printing feasibility when dealing with complex models. This leads to increased trial and error costs due to manual judgment, which limits the application of large-scale mold 3D printing technology.
By using the contour offset and Boolean operation functions of the clipper library, combined with a recursive algorithm, the stackable area of printable material within the layer is calculated to determine whether the shell model can be printed at an angle, thus assisting in setting the model's placement posture and selecting an appropriate slicing angle.
It enables rapid and accurate determination of the feasibility of tilting 3D printing of shell models, reduces the cost of printing trial and error, improves printing efficiency and applicability, and is suitable for various complex models.
Smart Images

Figure CN117370614B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer-aided manufacturing (CAM) technology, specifically relating to a method for determining the feasibility of tilting a shell model for 3D printing. Background Technology
[0002] With the development and breakthroughs in materials technology, computer technology, and other fields, 3D printing technology has rapidly emerged in the manufacturing industry. It utilizes a nozzle to extrude heated filament, and based on the principle of layered manufacturing, it stacks materials layer by layer to achieve the rapid manufacturing of complex three-dimensional parts, finding wide application in industries related to original product design and R&D manufacturing.
[0003] Large-size additive manufacturing technology based on extrusion deposition is one of the hot research areas in 3D printing technology both domestically and internationally. This technology, based on the principle of extrusion deposition, uses a screw extruder to melt particulate raw materials and employs pressure rollers at the nozzle to enhance the density and mechanical properties of the extruded material. Furthermore, this technology utilizes a gantry structure, enabling large printing sizes and high printing speeds. Therefore, it can significantly reduce the production time and cost of large parts such as molds, facilitating large-scale and customized production, and has broad application prospects in aerospace, automotive, defense, and construction fields.
[0004] Large-scale mold 3D printing differs from fused deposition modeling (FDM) in that the formed parts are mostly shell structures to reduce printing costs. Due to the height limitations of existing large-scale 3D printing equipment, printing taller and longer molds often involves printing the mold separately and then assembling it for post-processing. To achieve integrated printing of large molds without increasing the size of existing equipment, avoiding the generation of excessive internal supports to reduce printing costs and improve printing efficiency, products employing tilting printing technology have recently appeared on the market.
[0005] Because large mold printing uses a shell structure, for molds with complex surfaces, after tilting and slicing, the outline is prone to hanging. This causes the upper extruded material to fail to accumulate on the lower deposited material when the nozzle prints according to the actual outline path, resulting in printing failure.
[0006] Among the published patents related to tilted 3D printing technology, there is very little discussion on the feasibility assessment of tilted 3D printing for more complex models. Existing tilted 3D printing technology for large molds can print molds with relatively simple shapes. For more complex models, it is necessary to manually determine the feasibility of tilted 3D printing, select appropriate printing angles and placement postures, which increases the cost of trial and error and limits the application of large mold 3D printing technology. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention provides a method for determining the feasibility of tilting a shell model for 3D printing. This method utilizes the contour offset and Boolean operation functions of the Clipper library to calculate the stackable area of printing material within a layer; a recursive algorithm is then used to find the stackable area of the print contour to be determined. This invention's method can determine whether a shell model can be tilted for printing based on slicing data, assisting printer operators in setting the model's placement posture and selecting an appropriate slicing angle, thus reducing the cost of trial and error in printing.
[0008] A method for determining the feasibility of tilting a shell model for 3D printing includes the following steps:
[0009] (1) Slice the model to be judged at a set tilt angle, and place the resulting tilted slices horizontally in sequence to obtain the outline data of the horizontally placed slices.
[0010] (2) For any slice layer, offset each slice contour inward and outward respectively to obtain the offset contour set of each slice contour, and perform Boolean union operation on each offset contour set in turn to obtain the multi-branch tree structure contour set of the slice layer.
[0011] Traverse all slice layers to obtain the multi-branch tree structure outline set for each slice layer;
[0012] (3) Taking any untraversed slice layer as the current layer, and taking any untraversed slice contour in the current layer as the current contour, determine whether the current contour can completely fall into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-way tree structure contour set of the next slice layer:
[0013] If not, it means that the current layer cannot be printed at an angle;
[0014] If yes, continue to traverse other slice outlines in the current layer. If the judgment result of all slice outlines in the current layer is yes, then the current layer can be printed at an angle.
[0015] (4) Following step (3), continue to traverse the slice layers. If all slice layers can be tilted for printing, then the entire model can be tilted for printing.
[0016] Otherwise, the entire model cannot be printed at an angle.
[0017] In the above judgment method, the slice layers processed in steps (2) to (4) are all horizontal slice layers. The next layer mentioned in step (3) refers to the layer below the current layer, that is, the layer printed before the current layer.
[0018] In step (1) above:
[0019] The model to be judged is the STL model of the shell model to be judged; the tilt angle θ is set as the angle between the tilted slice and the horizontal plane, which can be set manually. The first-level nodes of the multi-branch tree structure are the child nodes of the root node, and also the first-level nodes in the structure. In the multi-branch tree structure contour set, each first-level node contour includes zero or one or more child nodes, and each child node contour may also include zero or one or more child node contours of that child node contour. Each first-level node contour and all its corresponding child node contours (including the child node contours of the child node contours) together define a connected region, that is, each first-level node contour corresponds to a connected region, which is also the stackable region of the layer above its corresponding slice layer (printed later).
[0020] In step (3), if the current contour cannot fall completely into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-branch tree structure contour set of the next slice layer, it means that the current contour cannot be printed. In the judgment of the feasibility of tilted 3D printing, if any slice contour in any slice layer cannot be tilted, it means that neither the slice layer nor the entire model can be tilted. Only when all slice contours in all slice layers can be tilted can the entire model be tilted.
[0021] Preferably, all the resulting tilted slices are parallel to the x-axis. Having all tilted slices parallel to the x-axis makes calculating the rotation matrix simpler, easier to understand, and easier to manipulate.
[0022] Preferably, the method for placing the tilted slices horizontally in sequence is as follows: rotate the contours within each tilted slice layer by -θ around the X-axis, so that the contour of the first slice layer is at the bottom. After tilting the slices, the tilted slice contour data is obtained, which is the coordinates of all points that make up the tilted slice contour. The purpose of placing the slice contours horizontally is to make the points that make up the contour two-dimensional, which is convenient for subsequent operations using the clipper library.
[0023] In step (2) above:
[0024] Preferably, the inward and outward offset distances of the slice profile are equal and do not exceed the width of the extruded filament. Profile offset distance d offset The width of the extruded filament should not exceed W, depending on the properties of the printing material and the angle of the print. filament . d offset This represents the maximum deviation of the central axis of the extruded filaments in the filament stacking plane between adjacent layers. For the slice profile within the lower slice layer (printed first), its inward and outward offset d is... offset The distance creates a closed, ring-shaped region, which can serve as the stackable area for the slice outline within the upper slice layer (later printed). In actual use, d offset Adjustments should be made based on experience and experimental test results.offset The larger the value, the looser the criteria for print feasibility.
[0025] As a preferred approach, the clipper library is used to offset the slice contours and perform Boolean union operations on the offset contour sets. The clipper library is an open-source graphics processing library that provides offset operations and Boolean operations for complex polygons, offering good stability and high efficiency. All contour processing objects in the clipper library are of type Path, which is a type of two-dimensional polyline. Clipper provides Paths (multiple Paths) and PolyTree types as the operation results. PolyTree involves a multi-way tree data structure, where each node PolyNode represents a contour, and the contours represented by its child nodes are all located inside the contour of that node.
[0026] As a further optimization, the specific process for obtaining the multi-branch tree structure outline set of any slice layer is as follows:
[0027] 1) Create new Paths objects Clip and Subject, and a PolyTree object Polytree using the clipper library, and input the outlines of all slices within the slice layer;
[0028] 2) Take any untraversed slice contour as the current contour, and offset the current contour outward and inward respectively to obtain the outer contour set (outerContours) and inner contour set (innerContours) of the current contour.
[0029] 3) Traverse the offset contours in the outer offset contour set and the inner offset contour set, calculate the area of each offset contour region. If the area is positive, add the offset contour directly to the Subject; if the area is negative, reverse the direction of the offset contour and add it to the Subject.
[0030] 4) Using the odd-even filling method, perform a Boolean union operation on Clip and Subject, save the result to Polytree, and update Polytree at the same time;
[0031] 5) Clear the elements in Clip and Subject, traverse the Polytree and add the outlines of all its nodes to Clip;
[0032] 6) Following steps 2) to 5), traverse all slice outlines within the slice layer to obtain the polytree structure outline set of the slice layer.
[0033] In step 1), all the input slice contours are in a clockwise direction.
[0034] In step 3), the relationship between the area of the offset contour region and the direction of the offset contour is as follows:
[0035] When the area of the offset contour region is positive, the offset contour direction is clockwise, and the offset contour is the outer contour.
[0036] When the area of the offset contour region is negative, the offset contour direction is counterclockwise, and the offset contour is the inner contour.
[0037] In step 6), the resulting multi-branch tree structure contour set has odd-numbered layer nodes as the outer contour and even-numbered layer nodes as the inner contour.
[0038] In step (1), after the tilted slice is placed horizontally, the slice outlines within the slice layer are all converted into Path type objects. During the outline offset process, the clipper offsets the slice outline according to the given offset distance. When the offset distance is positive, it offsets outward, and when the offset distance is negative, it offsets inward. During the Boolean union process, since there is no overlap between the offset outlines, an odd-even filling method is used. The input offset outlines can be divided into Clip and Subject types. During the union process, the two are equivalent, and the result is the sum of the two regions. PolyTree is used to save the results to better distinguish the inner and outer outline structures.
[0039] The odd-even fill rule is as follows: Starting from any point on the current polygon contour, a ray is emitted. The interior region of the contour intersecting the ray at the odd-numbered intersection point is the filled region, and the interior region of the contour at the even-numbered intersection point is the unfilled region. The odd-even fill rule is suitable for Boolean union operations where contours do not intersect.
[0040] As a preferred option, in step (3), the specific steps for determining whether the current contour can completely fall into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-branch tree structure contour set of the next slice layer are as follows:
[0041] Take any untraversed first-level node contour from the multi-branch tree structure contour set of the next slice layer as the current first-level node contour, and use a recursive algorithm to determine whether the current contour completely falls within the current first-level node contour and the connected region jointly defined by all its child node contours:
[0042] If so, then iterate through the contours of other slices within the current layer;
[0043] If not, continue traversing other first-level node contours until a first-level node contour is found that makes the current contour fall completely into the connected region jointly defined by the first-level node contour and all its child node contours.
[0044] If the current contour cannot fall completely within the connected region defined by all first-level node contours and all child node contours within them, it means that the current layer cannot be printed at an angle.
[0045] The specific steps for using a recursive algorithm to determine whether the current contour completely falls within the connected region jointly defined by the current first-level node contour and all its child node contours are as follows:
[0046] 1) Initialize the printable flag flag = 1; input the current contour Contour and the current first-level node contour nodeContour;
[0047] 2) Determine if the Contour is completely within the nodeContour region:
[0048] If so, proceed to step 3);
[0049] If not, set flag=0 and proceed directly to step 5);
[0050] 3) Traverse the child node outlines of nodeContour, and determine the positional relationship between Contour and the current child nodeContour:
[0051] If the current childnodeContour is not located inside the region of Contour, but intersects with Contour, then set flag=0 and proceed to step 4);
[0052] Otherwise, continue iterating through other child nodeContours in nodeContour;
[0053] If all childnodeContours have been traversed, proceed to step 5);
[0054] 4) Traverse the child node outlines of the current childnodeContour, using the Contour and the current grandchildnodeContour as input, and perform the operations according to steps 1) to 3):
[0055] If the return value is 1, then set flag = 1 and proceed to step 5);
[0056] 5) Return the flag value. If the flag is 1, it means that the Contour can fall completely into the connected region defined by the outlines of nodeContour and all its child nodes.
[0057] Otherwise, it means that Contour cannot fall completely into the connected region defined by nodeContour and the outlines of all its child nodes.
[0058] As a further preferred option, in steps 2) and 3), the following steps are used to determine whether the current contour falls inside another contour:
[0059] Perform a Boolean subtraction operation on the current contour and another contour. If the result is empty, the current contour is inside the other contour; if the result is not empty, the current contour is not inside the other contour.
[0060] Specifically, the steps to determine whether a contour Contour1 is located inside the region of another contour Contour2 (Contour1 is completely within Contour2) are as follows:
[0061] ① Use the clipper library to create Path objects Contour1 and Contour2, and Paths object sln;
[0062] ② Save Contour1 as Clip and Contour2 as Subject, and use the clipper library's Boolean subtraction operation to obtain sln;
[0063] ③ If sln is empty, then Contour1 is located inside the contour of Contour2, and vice versa.
[0064] In the Boolean subtraction operation performed by the clipper library in the above steps, Clip is the clipping outline, Subject is the clipped outline, and the operation result returns the area in Subject that does not contain Clip.
[0065] As a further optimization, in step 3), the following steps are performed to determine whether the current contour intersects with another contour:
[0066] Perform a Boolean intersection operation on the current contour and another contour. If the result is empty, the current contour and the other contour have no intersection; if the result is not empty, the current contour and the other contour have an intersection.
[0067] Specifically, the steps to determine whether a contour Contour1 intersects with another contour Contour2 are as follows:
[0068] ① Use the clipper library to create Path objects Contour1 and Contour2, and Paths object sln;
[0069] ② Save Contour1 as Clip and Contour2 as Subject, and use the clipper library to perform Boolean intersection operation to obtain sln;
[0070] ③ If sln is empty, then Contour1 and Contour2 have no intersection, and vice versa.
[0071] In the Boolean intersection operation performed by the clipper library in the above steps, Clip and Subject are equivalent, and the result returns the overlapping area between Subject and Clip.
[0072] In the judgment method of the present invention, if it is determined that any slice contour cannot be printed at an angle, it means that the entire model cannot be printed at an angle. In actual operation, the traversal can be directly ended to shorten the entire judgment process.
[0073] The method for determining the feasibility of tilting 3D printing of a shell model according to the present invention includes: tilting the STL model to be judged at a given angle to slice it and obtaining slice contour data; placing all tilted slice layers horizontally; offsetting each contour in each slice layer inward and outward respectively, and performing Boolean union operation on each offset contour set after offsetting each contour to obtain a polytree structure contour set for each contour; and using a recursive algorithm to determine whether the contours in each slice layer can be stacked on the stackable area represented by the polytree of the slice layer below, thereby determining whether the model can be tilted for printing. The method of the present invention is designed for the printing structure of shell molds, and quickly determines the feasibility of tilted printing based on mold slice information. It can assist printer operators in setting the model placement posture, selecting appropriate slicing angles, and reducing printing trial and error costs. The method of the present invention has wide applicability, high efficiency, and strong stability.
[0074] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0075] (1) This invention provides a printing feasibility judgment method for tilted three-dimensional printing of large-size shell molds. It can judge the printing stacking feasibility of any contour. Combined with graphic visualization, it can avoid errors in manual judgment, reduce printing trial and error costs, and help printer users quickly find the appropriate model placement position and slicing angle.
[0076] (2) The judgment method proposed in this invention has simple logic and high efficiency; it can be applied to various styles of models and has strong stability.
[0077] (3) The method for determining the feasibility of tilt printing proposed in this invention has a universal code format. The slice files of general commercial printers can be applied after data type conversion. It has strong applicability and broad application prospects. Attached Figure Description
[0078] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0079] Figure 2 This is a schematic diagram of a tilted slice;
[0080] Figure 3This is a schematic diagram showing the tilted slice (slice outline) rotated to a horizontal position.
[0081] Figure 4 A schematic diagram showing the slice outline falling within the annular region formed by the inner and outer offset outlines of the lower layer;
[0082] Figure 5 A flowchart for obtaining the multi-branch tree structure outline set of any slice layer;
[0083] Figure 6 A schematic diagram of the PolyTree structure outline set;
[0084] Figure 7 Here is the pseudocode for the recursive discrimination algorithm;
[0085] Figure 8 This is the STL model of the mold model in Example 1;
[0086] Figure 9 Visualize the printing feasibility assessment results of Example 1;
[0087] Figure 10 This is a half-section left view of the mold model in Example 1;
[0088] Figure 11 This is an STL model for the mold model in Example 2;
[0089] Figure 12 The visualization results are for the printing feasibility assessment of Example 2. Detailed Implementation
[0090] like Figure 1 As shown, the algorithm for determining the feasibility of tilting a shell model for 3D printing according to the present invention includes the following specific implementation steps:
[0091] Step 1: Slice the STL model of the shell model to be evaluated according to a given tilt angle θ. Place the resulting tilted slices horizontally in sequence to obtain the horizontally placed slice contour data. This slice contour data includes the coordinates of the points that make up the slice contour.
[0092] like Figure 2 As shown, the tilted tangent planes (tilted slices) of the STL model are all parallel to the x-axis, making the calculation of the rotation matrix simpler and easier to understand; θ is the angle between the tangent plane and the horizontal plane, which can be set manually.
[0093] like Figure 3As shown, the method for placing tilted slices horizontally involves rotating the contours of each tilted slice layer by -θ around the x-axis, so that the first slice layer is at the bottom. After tilting the slices, the tilted slice contour data is obtained, which is the coordinates of all points that make up the tilted slice contour. The purpose of placing the slice layers horizontally is to make the points that make up the contour two-dimensional, which is convenient for subsequent operations using the clipper library.
[0094] Step 2: For any horizontal slice layer, offset each slice contour inward and outward respectively to obtain the offset contour set of each contour. Then, perform Boolean union operation on each offset contour set in turn to obtain the multi-branch tree structure contour set of the slice layer.
[0095] Traverse all slice layers to obtain the multi-branch tree structure outline set for each slice layer.
[0096] In this step, the clipper library is used to perform in-layer contour offset and Boolean union operations. The clipper library is an open-source graphics processing library that provides offset operations and Boolean operations for complex polygons, offering good stability and high efficiency. All contour processing objects in the clipper library are of type Path, which is a two-dimensional polyline. Clipper provides Paths (multiple Paths) and PolyTree types as the operation results. PolyTree involves a multi-way tree data structure, where each node PolyNode represents a contour, and the contours represented by its child nodes are all located inside the contour of that node.
[0097] Contour offset distance d offset The width of the extruded filament should not exceed W, depending on the properties of the printing material and the angle of the print. filament . d offset This represents the maximum deviation of the central axis of the extruded filaments in the filament stacking plane between adjacent layers. For the slice profile within the lower slice layer (printed first), its inward and outward offset d is... offset The distance creates a closed, ring-shaped region, which can serve as the stackable area for the slice outline within the upper slice layer (later printed). In actual use, d offset Adjustments should be made based on experience and experimental test results. offset The larger the value, the looser the criteria for print feasibility.
[0098] like Figure 5 As shown, specifically, the input contour direction is clockwise, and the execution steps of contour offset and Boolean union operation within the slice layer are as follows:
[0099] (1) Use the clipper library to create Paths objects Clip and Subject, and PolyTree object Polytree;
[0100] (2) Take any untraversed slice contour within the input slice layer as the current contour, and offset the current contour outward by d. offset Obtain the outer contour set outerContours, and offset it inwards by d. offset Obtain the inner offset contour set innerContours;
[0101] (3) Traverse the offset contours in outerContours and innerContours and calculate the area of each offset contour region. If the area is positive, add it directly to Subject; if the area is negative, reverse the direction of the offset contour and add it to Subject.
[0102] The relationship between the area of the offset contour region and the direction of the offset contour is as follows:
[0103] When the area of the offset contour region is positive, the offset contour direction is clockwise, and the offset contour is the outer contour.
[0104] When the area of the offset contour region is negative, the offset contour direction is counterclockwise, and the offset contour is the inner contour.
[0105] (4) Using the odd-even filling method, perform a Boolean union operation on Clip and Subject, store the result in Polytree, and update Polytree at the same time;
[0106] (5) Clear elements in Clip and Subject;
[0107] (6) Traverse the Polytree and add the outlines of all its nodes to the Clip;
[0108] (7) Follow steps (2) to (6) until all slice contours in the slice layer have been traversed, and finally output the polytree structure contour set of the slice layer.
[0109] like Figure 6 As shown, in the final output Polytree, odd-numbered layer nodes represent the outer contour, and even-numbered layer nodes represent the inner contour.
[0110] In step one, the slice contours are all converted into Path type objects after being rotated to a horizontal position. During the contour offset process, the clipper offsets the contours according to the given offset distance; when the offset distance is positive, it offsets outwards, and when the offset distance is negative, it offsets inwards. During the Boolean union process, since there is no overlap between offset contours, an odd-even fill method is used; the input offset contours can be divided into Clip and Subject types, which are equivalent in the union process, and the result is the sum of the two regions. PolyTree is used to store the results to better distinguish the inner and outer contour structures.
[0111] Step 3: Taking any untraversed slice layer as the current layer, and taking any untraversed slice contour in the current layer as the current contour, determine whether the current contour can completely fall into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-way tree structure contour set of the next slice layer:
[0112] If not, it means that the current layer cannot be printed at an angle, so stop traversing;
[0113] If yes, continue traversing the slice outlines within the current layer. If the judgment result for all slice outlines within the current layer is yes, then the current layer can be printed at an angle.
[0114] The specific steps for determining whether the current contour can completely fall within the connected region jointly defined by a first-level node contour and all its child node contours in the multi-branch tree structure contour set of the next slice layer are as follows:
[0115] Take any untraversed first-level node contour from the odd-numbered layers of the multi-branch tree structure contour set of the next slice layer as the current first-level node contour. Use a recursive algorithm to determine whether the current contour completely falls into the connected region jointly defined by the current first-level node contour and all its child node contours:
[0116] If so, then iterate through the contours of other slices within the current layer;
[0117] If not, continue traversing other first-level node contours until a first-level node contour is found that makes the current contour fall completely into the connected region jointly defined by the first-level node contour and all its child node contours.
[0118] If the current contour cannot fall completely within the connected region jointly defined by the contours of all first-level nodes and the contours of all their child nodes, it means that the current layer cannot be printed at an angle.
[0119] The specific steps of the above recursive algorithm to determine whether the current contour (Contour) completely falls within the connected region jointly defined by the current first-level node contour (nodeContour) and all its child node contours are as follows: Figure 7 As shown, it includes:
[0120] (1) Initialize the printable flag flag = 1; input the current contour Contour and the current first-level node contour nodeContour;
[0121] (2) Determine if Contour is located inside the nodeContour region:
[0122] If so, proceed to step (3);
[0123] If not, set flag to 0 and proceed directly to step (5).
[0124] The sub-step for determining whether a certain contour Contour1 is located inside the region of another contour Contour2 is as follows:
[0125] ① Use the clipper library to create Path objects Contour1 and Contour2, and Paths object sln;
[0126] ② Save Contour1 as Clip and Contour2 as Subject, and use the clipper library's Boolean subtraction operation to obtain sln;
[0127] ③ If sln is empty, then Contour1 is located inside the contour of Contour2, and vice versa.
[0128] In the Boolean subtraction operation performed by the clipper library in the above steps, Clip is the clipping outline, Subject is the clipped outline, and the operation result returns the area in Subject that does not contain Clip.
[0129] (3) Traverse the child node outlines of nodeContour, and determine the positional relationship between Contour and the current child nodeContour:
[0130] If the current childnodeContour is not located inside the region of Contour, but intersects with Contour, then set flag to 0 and execute step (4);
[0131] Otherwise, continue iterating through other child nodeContours in nodeContour;
[0132] If all childnodeContours have been traversed, proceed to step (5);
[0133] The sub-step for determining whether a contour Contour1 intersects with another contour Contour2 is as follows:
[0134] ① Use the clipper library to create Path objects Contour1 and Contour2, and Paths object sln;
[0135] ② Save Contour1 as Clip and Contour2 as Subject, and use the clipper library to perform Boolean intersection operation to obtain sln;
[0136] ③ If sln is empty, then Contour1 and Contour2 have no intersection, and vice versa.
[0137] In the Boolean intersection operation performed by the clipper library in the above steps, Clip and Subject are equivalent, and the result returns the overlapping area between Subject and Clip.
[0138] (4) Traverse the child node outlines of the current childnodeContour, grandchildnodeContour, and take Contour and the current grandchildnodeContour as input, and perform the operations according to steps (1) to (3):
[0139] If the return value is 1, then set flag to 1 and execute step (5) directly;
[0140] (5) Return the flag value. If the flag is 1, it means that the Contour can fall completely into the connected region defined by the outlines of nodeContour and all its child nodes.
[0141] Otherwise, it means that Contour cannot fall completely within the connected region defined by nodeContour and the outlines of all its child nodes.
[0142] Application Example 1:
[0143] 1. Input the mold model, such as Figure 8 As shown, the mold dimensions are 400mm × 550mm × 110mm;
[0144] 2. Set the slice height to 8mm, the slice tilt angle to 45°, the preset extrusion line width to 20mm, and the offset distance d. offset The value is 10mm. It should be noted that the above parameter settings are for illustrating the algorithm's effectiveness and viewing the visualization results, and may not necessarily reflect actual commercial printing process parameters.
[0145] 3. Using the above judgment method to determine, for example... Figure 8 The feasibility of tilting the mold model shown is assessed. Figure 9 The results show the feasibility assessment of tilted 3D printing. Figure 9The thicker outline in the middle indicates that it cannot be stacked on top of the material represented by the outline below. Figure 10 As can be seen, when performing tilted slicing, the contours after the intersection of the cutting plane and the model are segmented, and the contours after the intersection of the cutting plane and the model exhibit an inner inclusion relationship. This results in the absence of sliced contours in the lower layer of these contours, thus preventing the current contour from being stacked on the printing material of the lower contour during printing. In other words, the model cannot be tilted for 3D printing.
[0146] Application Example 2:
[0147] 1. After rotating the model in Application Example 1 by 180° around the z-axis, as shown... Figure 11 Arranged as shown;
[0148] 2. Set the slice height to 8mm, the slice tilt angle to 45°, the preset extrusion line width to 20mm, and the offset distance d. offset The value is 10mm. It should be noted that the above parameter settings are for the purpose of explaining the effectiveness of the algorithm and viewing the visualization results, and may not necessarily conform to the actual commercial printing process parameters.
[0149] 3. Using the above judgment method to determine, for example... Figure 11 The feasibility of tilting the mold model shown is assessed. Figure 12 The results show the feasibility assessment of tilted 3D printing. It can be seen that in the current placement position, all contours can be stacked on the printing material of adjacent lower contours during printing, allowing the model to be printed at a tilt.
Claims
1. A method for determining the feasibility of tilting a shell model for 3D printing, characterized in that, Includes the following steps: (1) Slice the model to be judged at a set tilt angle, and place the tilted slices horizontally in sequence to obtain the contour data of the horizontally placed slices. (2) For any slice layer, offset each slice contour inward and outward respectively to obtain the offset contour set of each slice contour, and perform Boolean union operation on each offset contour set in turn to obtain the multi-branch tree structure contour set of the slice layer. Traverse all slice layers to obtain the multi-branch tree structure outline set for each slice layer; (3) Taking any untraversed slice layer as the current layer, and taking any untraversed slice contour in the current layer as the current contour, determine whether the current contour can completely fall into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-way tree structure contour set of the next slice layer: If not, it means that the current layer cannot be printed at an angle; If yes, continue to traverse other slice outlines in the current layer. If the judgment result of all slice outlines in the current layer is yes, then the current layer can be printed at an angle. (4) Following step (3), continue to traverse the slice layers. If all slice layers can be tilted for printing, then the entire model can be tilted for printing. Otherwise, the entire model cannot be printed at an angle.
2. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 1, characterized in that, In step (2), the clipper library is used to offset the slice contours and perform a Boolean union operation on the offset contour set.
3. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 2, characterized in that, In step (2), the specific process of obtaining the multi-branch tree structure outline set of any slice layer is as follows: 1) Create new Paths objects Clip and Subject, and a PolyTree object Polytree using the clipper library, and input the outlines of all slices within the slice layer; 2) Take any untraversed slice contour as the current contour, and offset the current contour outward and inward respectively to obtain the outer offset contour set and the inner offset contour set of the current contour. 3) Traverse the offset contours in the outer offset contour set and the inner offset contour set, calculate the area of each offset contour region, and add the offset contour directly to the Subject if the area is positive. If the area is negative, the offset contour direction is reversed and added to the Subject; 4) Using the odd-even filling method, perform a Boolean union operation on Clip and Subject, save the result to Polytree, and update Polytree at the same time; 5) Clear the elements in Clip and Subject, traverse the Polytree and add the outlines of all its nodes to Clip; 6) Following steps 2) to 5), traverse all slice outlines within the slice layer to obtain the polytree structure outline set of the slice layer.
4. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 1, characterized in that, In step (3), the specific steps for determining whether the current contour can completely fall into the connected region jointly defined by a first-level node contour and all its child node contours in the multi-branch tree structure contour set of the next slice layer are as follows: Take any untraversed first-level node contour from the multi-branch tree structure contour set of the next slice layer as the current first-level node contour, and use a recursive algorithm to determine whether the current contour completely falls into the connected region jointly defined by the current first-level node contour and all its child node contours: If so, then iterate through the contours of other slices within the current layer; If not, continue traversing other first-level node contours until a first-level node contour is found that makes the current contour fall completely into the connected region jointly defined by the first-level node contour and all its child node contours. If the current contour cannot fall completely within the connected region defined by all first-level node contours and all child node contours within them, it means that the current layer cannot be printed at an angle.
5. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 1, characterized in that, In step (2), the inward and outward offset distances of the slice profile are equal and do not exceed the width of the extruded filament.
6. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 1, characterized in that, In step (1), the resulting tilted slices are all parallel to the x-axis.
7. The method for determining the feasibility of tilting a shell model for 3D printing according to claim 1, characterized in that, In step (4), the slice layers are traversed in a bottom-up order.
Citation Information
Patent Citations
Three-dimensional printing method and device, computer equipment and storage medium
CN113021873A
Biological 3D printing path planning method based on Euler loop
CN113561491A