Slice printing sequence optimization method

文档序号:626098 发布日期:2021-05-11 浏览:7次 中文

阅读说明:本技术 一种切片打印顺序优化方法 (Slice printing sequence optimization method ) 是由 林志伟 刘博� 胡玘瑞 傅建中 于 2020-12-24 设计创作,主要内容包括:本发明提供一种切片打印顺序优化方法,包括以下步骤:输入按照原始顺序排列的初始填充区域集;将初始填充区域集中的填充区域按层分为若干子合集,根据子集合顺序构建对应的空白优化填充区域集合A;按顺序选取一子集合作为当前子集合,判断其中是否存在过渡层;若存在,则将该子集合内所有填充区域按原始顺序存入集合A的对应位置;若不存在,进入下一步;将当前子集合内的填充区域进行分支化处理,并按照分支化顺序逐个存入集合A;返回上一步直至所有子集合全部处理完毕;输出重新规划打印顺序的集合A。本发明实现了模型分层打印与分支打印结合的优化规划方法,该方法可有效减少三维打印中的移动次数和喷头移动距离,降低打印时间。(The invention provides a method for optimizing a slice printing sequence, which comprises the following steps: inputting an initial filling area set arranged according to an original sequence; dividing the filling areas in the initial filling area set into a plurality of sub-set sets according to layers, and constructing a corresponding blank optimization filling area set A according to the sub-set sequence; selecting a subset as a current subset in sequence, and judging whether a transition layer exists or not; if yes, storing all filling areas in the subset into corresponding positions of the set A according to the original sequence; if not, entering the next step; branching the filling areas in the current subset, and storing the filling areas into the set A one by one according to a branching sequence; returning to the previous step until all the subsets are completely processed; the collection a in which the print order is rearranged is output. The invention realizes the optimization planning method combining the model layered printing and the branch printing, and the method can effectively reduce the moving times and the moving distance of the spray head in the three-dimensional printing and reduce the printing time.)

1. A slice printing sequence optimization method is characterized by comprising the following steps:

(1) inputting an initial filling area set arranged according to an original sequence;

(2) dividing the filling areas in the initial filling area set into a plurality of sub-set sets according to layers, and constructing a corresponding blank optimization filling area set A according to the sub-set sequence;

(3) sequentially selecting an unprocessed subset as a current subset, and judging whether a transition layer exists or not;

if yes, storing all filling areas in the subset into corresponding positions of the current optimized filling area set A according to the original sequence, and updating the optimized filling area set A;

if not, entering the next step;

(4) branching the filling areas in the current subset, storing the filling areas into the optimized filling area set A one by one according to the branching sequence, and updating the optimized filling area set A again; returning to the step (3) until all the subsets are processed;

(5) and outputting the optimized filling area set A for re-planning the printing sequence.

2. The slice printing order optimization method according to claim 1, wherein in the step (1), slice data is input to obtain a slice outline, and the outline is operated in the model slice layer by a clipper method to obtain a filling area of the outline.

3. The method for optimizing the order of printing slices of claim 1 wherein in step (2) the thickness of each of the subsets is less than the bulge dimension of the print head.

4. The slice-printing order optimization method of claim 1, wherein in step (3), the subsets are sequentially selected in a bottom-up order.

5. The method for optimizing the order of printing slices according to claim 1, wherein in the step (3), when determining whether the transition layer exists in the current subset, the following determinations are sequentially made from bottom to top: and if the number of the filling areas in a certain layer in the subset is not equal to the number of the filling areas in the adjacent layer below the certain layer, the layer is the transition layer.

6. The slice printing order optimization method according to claim 1, wherein in step (4), the method for branching the filling areas in the current subset and storing the filling areas into the optimized filling area set A one by one according to the branching order is as follows:

and aiming at the current sub-set, selecting an unprocessed filling area as the current filling area from the bottommost layer or the topmost layer, sequentially searching all related filling areas of the current filling area according to whether the adjacent layer filling areas have intersection, obtaining related filling area branches corresponding to the current filling area, sequentially storing the filling areas in the related filling area branches into the optimized filling area set A from bottom to top, and finishing the storage of all related filling area branches according to the same method.

7. The slice printing order optimization method of claim 6, wherein the method for judging whether the adjacent layer filling areas have intersection is as follows: and inputting the outline corresponding to the filling area of the adjacent layer into the clipper library by using the clipper library to carry out intersection operation.

8. The method according to claim 7, wherein when the clipper library is used to perform intersection operation on the outlines, if the filled region is defined by both the inner-layer outline and the outer-layer outline, the clipper library is input to perform the intersection operation on the outer-layer outline of the filled region.

Technical Field

The invention belongs to the technical field of Computer Aided Manufacturing (CAM), and particularly relates to a slice printing sequence optimization method.

Background

With the rapid development of computer technology and material molding technology, the three-dimensional printing technology becomes an advanced manufacturing technology widely applied in the current manufacturing field. The three-dimensional printing technology is used for stacking materials layer by layer to obtain design realization by utilizing the principle of layered manufacturing, and is particularly suitable for manufacturing three-dimensional parts with complex shapes and topologies.

The three-dimensional printing technology mainly comprises two key technical links of manufacturing process planning implemented on a computer and actual manufacturing and solid part forming on equipment, wherein the manufacturing process planning mainly comprises three steps: the first step is as follows: aiming at the three-dimensional model input by the user, the user realizes the layered slicing of the three-dimensional model on a computer; the second step is that: generating an accurate and reliable slice outline according to the slice result; the third step: a three-dimensional print path is planned within the slice profile.

After the model slices are subjected to layer intersection calculation, a large number of scattered line segments can be obtained on each layer of intersection plane. After the scattered line segments are spliced, a plurality of closed outlines are obtained in each layer. The computer control apparatus performs printing according to the closed contour.

When a plurality of closed outlines exist in the layering process, the adopted technical scheme is that all the closed outlines of the layer are printed in sequence, and the next layer is printed after the printing of the layer is finished. However, when the model with the tree structure (the model has a plurality of branches in the longitudinal direction) is processed, the printing nozzle needs to be moved among different outlines continuously, and a large amount of time is occupied. There is room for improvement in prior art methods.

Disclosure of Invention

In order to solve the defect that the number of times of conversion of a tree structure model in different branches is too many in the conventional three-dimensional printing path planning, the invention provides a slice printing sequence optimized printing method based on contour projection. The method is clear in judgment and wide in adaptability, and is an efficient 3D printing path planning method.

A slice printing sequence optimization method comprises the following steps:

(1) inputting an initial filling area set arranged according to an original sequence;

(2) dividing the filling areas in the initial filling area set into a plurality of sub-set sets according to layers, and constructing a corresponding blank optimization filling area set A according to the sub-set sequence;

(3) sequentially selecting an unprocessed subset as a current subset, and judging whether a transition layer exists or not;

if yes, storing all filling areas in the subset into corresponding positions of the current optimized filling area set A according to the original sequence, and updating the optimized filling area set A;

if not, entering the next step;

(4) branching the filling areas in the current subset, storing the filling areas into the optimized filling area set A one by one according to the branching sequence, and updating the optimized filling area set A again; returning to the step (3) until all the subsets are processed;

(5) and outputting the optimized filling area set A for re-planning the printing sequence.

According to the optimized printing method, the model is divided into a plurality of printing branches, and a path planning mode combining layer-by-layer printing and branch-by-branch printing is adopted, so that the times of fast movement of the spray head among different branches in the printing process are greatly reduced, the three-dimensional printing time is saved, the three-dimensional printing path planning method is optimized, and the optimized printing method is particularly suitable for three-dimensional printing of the model with the branch structure.

Preferably, in step (1), slice data is input to obtain a slice contour, and the contour is calculated in the model slice layer by the clipper method to obtain a fill region of the contour.

In the step (1), the slice data is intercepted and intersected with the target model by an XY plane or a plane parallel to the XY plane to obtain an intercepted and intersected line segment at a height of a certain layer. These intersecting segments form a plurality of closed contours in the plane. After completion, the tissue structure is obtained: the target model is divided into a plurality of slice layers, a plurality of closed outlines are arranged on the slice layers with specific layer heights, and the outlines are formed by splicing intersecting line segments.

And (3) carrying out operation on the outline in the sliced layer by using a clipper method to obtain a filling area of the layered outline, and planning the printing sequence of the filling area according to the traditional layer-by-layer printing mode to form an initial filling area set.

Preferably, in step (2), the thickness of each subset is smaller than the projection size of the printing nozzle, so as to avoid the problem of interference with the printed model when the printing nozzle converts the printing area again. The printing nozzle comprises a nozzle main body and a nozzle, one end of the nozzle is embedded into the nozzle main body, and the other end of the nozzle extends out of the nozzle main body; the protruding dimension of the printing nozzle is the dimension of the nozzle extending out of the nozzle body.

The nozzle body and the nozzle can be an integral molding part, or can be an independent structure for fixing the nozzle, the radial dimension of the nozzle is generally larger than that of the nozzle, and in the printing process, if the thickness of the subset is larger than the dimension of the nozzle extending out of the nozzle body, the printed model is easily interfered when the printing area is replaced, so the thickness of the subset needs to be controlled.

Preferably, in the step (3), the subsets are sequentially selected from bottom to top, and the printing is ensured to be sequentially performed from bottom to top.

Preferably, in step (3), when determining whether a transition layer exists in the current subset, the following determinations are performed in sequence from bottom to top: and if the number of the filling areas in a certain layer in the subset is not equal to the number of the filling areas in the adjacent layer below the certain layer, the layer is the transition layer.

When a transition layer appears in a subset, it indicates that the number of filling regions in the transition layer is not equal to the number of filling regions in the next layer, in which case the filling regions in the subset cannot be planned into multiple printing branches, and the planning and printing need to be performed in a layer-by-layer printing manner.

Preferably, in step (4), the method for branching the filling areas in the current subset and storing the filling areas into the optimized filling area set a one by one according to the branching order is as follows:

and aiming at the current sub-set, selecting an unprocessed filling area as the current filling area from the bottommost layer or the topmost layer, sequentially searching all related filling areas of the current filling area according to whether the adjacent layer filling areas have intersection, obtaining related filling area branches corresponding to the current filling area, sequentially storing the filling areas in the related filling area branches into the optimized filling area set A from bottom to top, and finishing the storage of all related filling area branches according to the same method.

When an unprocessed filling region is selected, the filling regions can be selected according to a counterclockwise or clockwise sequence, and the sequence is stored as a final printing sequence in the optimized filling region set a.

Preferably, the method for determining whether an intersection exists in the adjacent layer filling areas includes: and inputting the outline corresponding to the filling area of the adjacent layer into the clipper library by using the clipper library to carry out intersection operation.

More preferably, when the clipper library is used to perform intersection calculation on the contours, if the filled region is defined by both the inner contour and the outer contour, the clipper library is input to perform intersection calculation on the outer contour of the filled region.

The clipper is a graphic processing library, can be used for solving the operations of intersection, union, difference and the like of planar two-dimensional graphics and offset processing, and is widely applied to the field of 3D printing. In the clipper library, the input and output of all algorithms are path objects (two-dimensional multi-segment lines), and in this context, closed contours are path objects. In the clipper library, input outlines can be classified into two categories according to their roles, one being a subject and one being a clip. In the intersection calculation, clip and subject are equivalently interchangeable, the result is a planar area covered by two outlines at the same time, and the non-overlapped part is discarded.

As a specific preferred method, the method of branching the filling areas in the current subset and storing the filling areas into the optimized filling area set a one by one according to the branching order is as follows:

selecting from the bottom layer, i.e. the 1 st layer (i ═ 1), or the top layer, i.e. the kth layer (i ═ k), in the current subset;

4.1, selecting any or sequentially selecting an unprocessed filling region in the ith layer in the current subset as the current filling region, wherein i belongs to [1, k ], and k is the number of slicing layers in the current subset;

4.2, respectively projecting the contour corresponding to the current filling area and the contour corresponding to the filling area in the (i +1) th layer (from the bottommost layer) or the (i-1) th layer (from the bottommost layer) into an XY plane, and finding out the filling area corresponding to the contour projection with intersection with the contour projection corresponding to the current filling area in the (i +1) th layer or the (i-1) th layer by using a clipper library;

4.3, taking the filling area found in the step 4.2 as a current filling area, taking the i +1 th layer or the i-1 th layer as a current layer i (i.e., i +1 or i-1), repeating the steps 4.1 and 4.2 to judge the next current filling area, obtaining a printing branch related to the current filling area when i +1 is greater than k or i-1 is less than 0, and stopping the judgment;

4.4, the filling area marks forming the printing branches obtained in the step 4.3 are stored in the optimized filling area set A from bottom to top, and the optimized filling area set A is updated;

and 4.5, sequentially finding printing branches related to each unmarked filling area in the ith layer according to a judgment method in 4.1-4.4, marking the filling areas in each printing branch, and storing the filling areas in each printing branch into the optimized filling area set A from bottom to top until all the filling areas in the current subset are marked, completing the branching treatment of the filling areas in the current subset, and updating the optimized filling area set A.

In step 4.2 above, the XY plane is understood to be the horizontal plane and parallel to the plane in which the model is sliced.

Compared with the prior art, the invention has the beneficial effects that:

the printing method optimizes path planning on the basis of establishing a relevant model structure for a target model slice, divides a generated filling area into a plurality of subsets according to layers aiming at a model with a branch structure, projects the filling area generated by the slice to an XY plane by using the subsets with equal number of filling areas in each layer in the subsets to obtain the filling areas with intersection in the projections on the XY plane in adjacent slice layers, divides the mutually associated filling areas into one printing branch, and adopts branch-by-branch printing; and adopting the traditional layer-by-layer printing to the subsets with the incompletely equal number of filling areas in each layer in the subsets, thereby providing a path planning mode combining the layer-by-layer printing and the branch-by-branch printing.

The printing method has higher processing efficiency due to small operand, and simultaneously greatly reduces the times of the printing nozzle moving rapidly (G0) among different branches in the three-dimensional printing path planning of the model with the branch structure, thereby reducing the three-dimensional printing time and optimizing the three-dimensional printing path planning method. And the logic is clear and simple, and a more efficient path planning method can be provided for the model printing with the branch structure.

Drawings

FIG. 1 is a schematic flow chart of a method for optimizing a printing sequence of a cut sheet according to the present invention;

FIG. 2a is a schematic view of a model slice in the optimization method of the present invention;

FIG. 2b is a schematic diagram of a projection method in the optimization method of the present invention;

FIG. 3 is a schematic diagram of a printing process of a conventional planning method and the method of the present invention;

fig. 4 is a comparison of fast moving distances (G0) for different planning methods in an embodiment.

Detailed Description

The technical solutions of the present invention are further described in detail below with reference to the drawings and examples, which should not be construed as limiting the present invention.

As shown in fig. 1, a method for optimizing a slice printing sequence includes the following steps:

step 101: input initial fill region set { FillsTotal) arranged in original order (layer-by-layer printing mode)hIn which h e [1, a ]]A isTotal number of layers of model slices.

As shown in fig. 2a and b, intersecting lines are obtained by intersecting XY planes and the target model, so as to obtain intersecting line segments at the height of the layer, and the intersecting line segments form a plurality of closed contours on the plane. After completion, the tissue structure is obtained: the target model is divided into a plurality of slice layers, and a plurality of closed outlines are arranged on the slice layers with specific layer heights. Judging the inclusion relationship between the outlines by using a ray method, calculating the outlines in the slice layer by using a clipper method based on the inclusion relationship of the outlines to obtain a filling area of the layered outlines, and establishing an initial filling area set { FillsTotal) according to the organization structureh}。

Step 102: will { FillsTotal }hThe filling area in the system is divided into a plurality of subsets by layers (FillsSet)tIn which t ∈ [1, b ]]And b is the total number of the subsets; and constructing a corresponding blank optimization filling area set A according to the sequence of the subsets.

In the above step 102, { FillsTotal }hThe filling areas in the sub-sets are collected by taking n layers as a group and form a plurality of sub-sets { FillsSet }tAnd when the thickness of the slice layer is certain, the value of n is related to the geometric dimension of the spray head, if n is not limited when a branch-by-branch printing mode is adopted, the problem that the spray head interferes with a printed model when a printing area is converted can occur, and in order to avoid printing interference, the stacking thickness of single-branch printing, namely the thickness of n slice layers cannot be larger than the projection dimension of the printing spray head.

Step 103: selecting an unprocessed subset { FillsSet in descending ordertAs the current subset.

Step 104: judging the current subset { FillsSettWhether a transition layer exists in the subset or not, if so, executing step 204 to collect the subset { FillsSet }tStoring all filling areas in the current optimized filling area set A in the original sequence, and updating the optimized filling area set A;

if not, the next step is carried out.

In step 104, if the number of the filled regions in a layer in the subset is not equal to the number of the filled regions in the adjacent layer below the layer, the layer is considered to be a transition layer. When the number of filled regions in a certain layer is 1, the layer is also considered to be a transition layer. This is done because subsets that need to retain the original layer-by-layer and branch-by-branch printing modes are identified in advance.

Step 105: will be the current subset { FillsSettBranching the filling areas in the database, storing the filling areas into an optimized filling area set A one by one according to a branching sequence, and updating the optimized filling area set A again; returning to the step (3) until all the subsets { FillsSettFinishing all the treatments;

the specific operation steps of step 105 are as follows:

from the current subset { FillsSettThe lowest layer in the layer 1 (i is 1) is selected;

105-1, selecting the current subset { FillsSettSelecting an unprocessed filling area as a current filling area at any place or in sequence in the ith layer, wherein i belongs to [1, k ]]K is the current subset { FillsSettThe number of slicing layers in the Chinese file is multiplied;

105-2, respectively projecting the contour corresponding to the current filling area and the contour corresponding to the filling area in the i +1 th layer into an XY plane, and finding out a filling area corresponding to a contour projection in the i +1 th layer, which has an intersection with the contour projection corresponding to the current filling area, by using a clipper library;

when the filling area is defined by the inner layer contour and the outer layer contour together, the input clipper library carries out intersection operation, namely projection of the outer layer contour of the filling area on an XY surface.

105-3, taking the filling area found in 105-2 as a current filling area, taking the i +1 th layer as a current layer i (i.e. i is i +1), repeating the steps 105-1 and 105-2 to judge the next current filling area, obtaining a printing branch related to the current filling area until i +1 is greater than k, and stopping the judgment;

105-4, marking the filling area forming the printing branch obtained in 105-3 and storing the filling area into the optimized filling area set A from bottom to top;

105-5, sequentially finding printing branches related to each unmarked filling area in the ith layer according to the judging method in 105-1-105-4, marking the filling areas in each printing branch and storing the filling areas in each printing branch into the optimized filling area set A from bottom to top until the current subset { FillsSettAll filled areas in the subset are marked to complete the current subset { FillsSet }tBranching processing of the inner filling region.

Step 106: step 103-105 is repeated until all subsets { FillsSet-tAll the treatment.

Step 107: and outputting the optimized filling area set A for re-planning the printing sequence.

An exemplary embodiment of the invention is as follows:

1. taking a model with a branched structure as shown in FIG. 3;

2. assuming that the protruding length of the spray head is 10 mm;

3. comparing the two planning methods, as shown in fig. 3, which is a graphical illustration of the two planning methods, the four-foot square table model is sliced and processed, and the printing path planning is performed by respectively adopting the traditional method and the method of the invention.

The traditional method is layer-by-layer printing, and a printing nozzle moves among different filling areas on the same layer; the method of the invention is that the printing nozzles are repeatedly stacked upwards in the same filling area in one printing branch, and the printing in the same filling area is finished and then the printing branches are jumped to the next printing branch. In the model printing process, the two methods of the model material spraying printing process (G1) are completely the same, so that the advantage of the method of the invention can be shown only by comparing the distance of the rapid movement (G0). The distance of the fast movement (G0) and the reduction rate of the fast movement (G0) after the method of the invention are used are counted for different slice thicknesses.

4. As shown in fig. 4, compared with the conventional method, in the printing context of the model with the branch structure, the method provided by the present invention has a larger reduction rate of the fast shift (G0) in different layer height slices, and has a significant effect on the reduction of the fast shift distance (G0), and as the layer number division is finer, the reduction rate of the fast shift (G0) increases, which indicates that the method has a more significant effect in processing a large amount of data.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that various modifications and changes can be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made without departing from the principle of the present invention shall be included in the protection scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种塑胶制品的制造方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!