CN112677489B - Printing path planning method and system and 3D printer - Google Patents

Printing path planning method and system and 3D printer Download PDF

Info

Publication number
CN112677489B
CN112677489B CN202110096998.XA CN202110096998A CN112677489B CN 112677489 B CN112677489 B CN 112677489B CN 202110096998 A CN202110096998 A CN 202110096998A CN 112677489 B CN112677489 B CN 112677489B
Authority
CN
China
Prior art keywords
angle
printing
printed
rectangles
path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110096998.XA
Other languages
Chinese (zh)
Other versions
CN112677489A (en
Inventor
杨依哲
刘兵山
李鑫
刘晓冬
王功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Technology and Engineering Center for Space Utilization of CAS
Original Assignee
Technology and Engineering Center for Space Utilization of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Technology and Engineering Center for Space Utilization of CAS filed Critical Technology and Engineering Center for Space Utilization of CAS
Priority to CN202110096998.XA priority Critical patent/CN112677489B/en
Publication of CN112677489A publication Critical patent/CN112677489A/en
Application granted granted Critical
Publication of CN112677489B publication Critical patent/CN112677489B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a printing path planning method, a printing path planning system and a 3D printer, which are characterized in that firstly, a shape to be printed is segmented by an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the plurality of segmented rectangles corresponding to each angle are segmented according to a z-shaped scanning mode and based on an optimal distance principle, and finally, the path of the segmented rectangles traversing each segment of each sub-domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be ensured, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, wherein the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further reduced, and the printing efficiency is improved.

Description

Printing path planning method and system and 3D printer
Technical Field
The invention relates to the technical field of 3D printing, in particular to a printing path planning method and system and a 3D printer.
Background
In recent years, Rapid Prototyping (RP), that is, a 3D printing technology, has been widely used in various model production and product tests, and is a material-increasing manufacturing technology, in which a three-dimensional model of an object is two-dimensionally sliced to obtain a plurality of two-dimensional slice images, and then the plurality of two-dimensional slice images are cumulatively printed layer by layer to form a solid model. Specifically, the method comprises the following steps:
the photocuring forming technology gradually develops the current novel technologies such as surface exposure and spray forming and the like from the conventional laser sequential scanning by controlling the light scanning liquid photosensitive resin with a special waveband to generate polymerization curing reaction at a specified position and generating a three-dimensional object through layer-by-layer superposition. The surface exposure technology changes the point-to-line and line-to-surface forming method in the photocuring technology, directly focuses laser on the whole plane to be printed for printing, shortens the forming speed and improves the printing precision;
the surface exposure technology is mainly based on two forms of Digital Light Processing (DLP) and Liquid Crystal Display (LCD). The DLP technology is a reflective projection technology, in which a Digital micro reflector (DMD) is used as a light valve imaging Device, and a projection lens is used to amplify a reflection mirror image of the DMD for projection; the liquid crystal LCD technology generates images with different gray scales and colors by the photoelectric effect of liquid crystal. Compared with the prior art, the DLP technology has higher realization price, but can realize high-definition image projection, the pixel structure is weak, and the key components of the liquid crystal LCD technology, namely a display, have small selection range, are easy to lose and have larger limitation; at present, the surface exposure is mostly matched with the DLP technology for use.
The rapid prototyping system based on the DLP technology mainly includes an optical projection system, a mechanical system and a control operation system, and can adopt an up/down exposure mode, wherein the structure of the down exposure DLP printing system adopting the down exposure mode is shown in fig. 1, and the structure of the up exposure DLP printing system adopting the up exposure mode is shown in fig. 2, specifically: the projection system projects a layered image, namely a two-dimensional layered slice image, calculated by a computer on the surface of photosensitive resin in the liquid tank through a projector, after one layer of projection is solidified and formed, the workbench moves up/down under the control of a mechanical motion system, resin raw materials are supplemented on the new forming surface (a scraper is used for scraping), projection solidification is carried out again according to the layered image, namely the two-dimensional layered slice image, of a new layer transmitted by a main control system, namely a printing system, and the steps are repeated until the part processing is finished.
The optical system of the DLP technology can be adjusted into different forms according to different requirements and mechanical structure forms, the optical system of the DLP technology mainly achieves the function of guiding light emitted by a light source into a DMD chip and then into a projection system after being reflected by the DMD chip, the principle that the optical system of the DLP technology guides the light into the projection system is shown in figure 3, wherein the DMD chip is composed of a plurality of square micro mirrors and a circuit system for controlling deflection of the mirrors, and the circuit controls deflection angles of the mirrors so as to realize 'switching' of the light to image. Depending on the image resolution, a pixel in the image may be imaged by one or several optoelectronic units together, i.e. a two-dimensional slice image.
Although the image definition of the DLP technology, i.e. the two-dimensional layered slice image, is high, and the precision of the DLP-based photocuring molding technology is high in printing small pieces, the DLP technology cannot simultaneously meet the dual requirements of large printing breadth and high precision. The reason is that:
the size of the pixel point of the DMD chip on the projection surface determines the forming precision of the 3D printing system, and the size of the pixel point of the projection surface is mainly determined by the magnification of the optical system and the size of the micro mirror of the DMD chip. Increasing the magnification of the optical system increases the projection error caused by the deflection angle of the micromirror, so that the magnification has a certain required limit value, and only the DMD chip with larger size (higher resolution) can be replaced, and the chip size is limited. In order to realize high-precision printing, it is necessary to print an object by scaling down the object.
In order to increase the size of the printing web, researchers have begun to propose moving filling similar to that used in the Selective Laser Sintering (SLS) technology and Fused Deposition Modeling (FDM) technology to perform moving exposure by a projector to complete the modeling of a large area printing region. The moving mode mostly adopts a workbench surface global straight line z-shaped traversing mode, and the path traverses all the regions by adopting standard grid processing.
In order to improve the traversing speed, printed path planning is generally used in FDM and SLS technologies, and a partition scanning path algorithm, a genetic algorithm of a multi-communication domain and the like are utilized to reduce the problem of idle stroke in filling, so that the forming speed is greatly improved. However, the path planning research on the surface exposure is less in the aspect of the exposure forming of the photocuring surface, and the forming is still performed by adopting a full traversal mode. Meanwhile, the light curing mobile molding cannot move the FDM or SLS scanning mode, certain exposure dwell time is needed for surface exposure, and in order to ensure the exposure uniformity, the projection equipment cannot perform curve walking and only can linearly move, and meanwhile, the influence of the moving speed and the multi-axis control mechanical moving system error on the overall precision is also considered. Specifically, the method comprises the following steps:
at present, the Stereolithography method (SPSL) is usually adopted to perform full-grid traversal in the light-curing sequential Projection problem. For example, the first document: "Emami, M.M., Barazandeh, F., Yaghmaie, F.,2015.An analytical model for scanning-project based stereolithography. journal of Materials Processing Technology 219, 17-27. doi:10.1016/j. jmatprocessing technology.2014.12.001"; document two: "Emami, M.M., Barazandeh, F., Yaghmaie, F.,2014, Scanning-projection based stereo mapping, Method and structure, Sensors and Actuators, APhyseal 218, 116-doi 124, 10.1016/j. sna.2014.08.002", dividing the whole working surface into squares of certain specifications according to projection sizes in two vertical directions of x and y axes, continuously moving the projector in a zigzag manner from the initial position, continuously moving the DMD on the image area, continuously updating the projection image, and simultaneously Scanning and projecting until the whole working area is traversed, as shown in FIG. 4.
Although the whole image, namely the two-dimensional layered slice image, can be completely spliced through traversal by the SPSL method, the phenomenon of time waste is very likely to occur because each image, namely the two-dimensional layered slice image, is not analyzed one by one, namely the two-dimensional layered slice image is very small, the whole working area still needs to be traversed, and the problem of idle stroke similar to the FDM technology also exists. The time wasted by the idle stroke of each two-dimensional layered slice image is accumulated, so that the printing time of the whole part is greatly increased, and the printing efficiency is low.
Disclosure of Invention
The invention aims to solve the technical problem of the prior art and provides a printing path planning method, a printing path planning system and a 3D printer.
The technical scheme of the printing path planning method is as follows:
s1, obtaining a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
s2, striping the shape to be printed according to a preset angle increment by using an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to each angle;
s3, partitioning the plurality of partitioned rectangles corresponding to each angle respectively by adopting a z-shaped scanning mode and based on an optimal distance principle to obtain partitioned rectangles of each sub-domain corresponding to each angle;
s4, obtaining a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the strip rectangles of each subarea of each sub-domain corresponding to each angle, and determining the printing path corresponding to the lowest printing time consumption as an optimal printing path.
The printing path planning method has the following beneficial effects:
firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the plurality of segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further shortened, and the printing efficiency is improved.
The technical scheme of the printing path planning system is as follows:
the system comprises an acquisition module, a striping module, a partitioning module and an optimal printing path determining module;
the acquisition module is used for acquiring a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
the striping module is used for striping the shape to be printed according to a preset angle increment by utilizing an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to each angle;
the partitioning module is used for partitioning a plurality of partitioned rectangles corresponding to each angle respectively according to a z-shaped scanning mode and based on an optimal distance principle to obtain partitioned rectangles of each sub-domain corresponding to each angle;
and the optimal printing path determining module is used for obtaining a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the strip rectangles of each subarea of each sub-domain corresponding to each angle, and determining the printing path corresponding to the lowest printing time consumption as the optimal printing path.
The printing path planning system has the following beneficial effects:
firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the plurality of segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further shortened, and the printing efficiency is improved.
The technical scheme of the 3D printer is as follows:
comprising a controller for performing the steps of a method of print path planning as described in any one of the preceding claims.
The 3D printer has the following beneficial effects:
firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further reduced, and the printing efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a lower exposure DLP printing system;
FIG. 2 is a schematic diagram of a top-exposure DLP printing system;
FIG. 3 is a schematic diagram of a DLP optical system directing light into a projection system;
FIG. 4 is a schematic illustration of printing using a scanning projection stereolithography method;
fig. 5 is a schematic flow chart of a printing path planning method according to an embodiment of the present invention;
FIG. 6 is a schematic illustration of striping according to a first angle;
FIG. 7 is a schematic illustration of striping according to a second angle;
FIG. 8 is a schematic diagram of a first cross point selection;
FIG. 9 is a diagram illustrating a second cross point selection;
FIG. 10 is a schematic diagram of a third intersection selection scenario;
FIG. 11 is a diagram illustrating a fourth cross point selection scenario;
FIG. 12 is a schematic diagram of an optimal print path;
FIG. 13 is a schematic view of a grass cutting path in an axis parallel configuration;
FIG. 14 is a schematic view of a grass cutting path in a contour parallel fashion;
FIG. 15 is a schematic structural diagram of a printing path planning system according to an embodiment of the present invention;
Detailed Description
As shown in fig. 1, a printing path planning method according to an embodiment of the present invention includes the following steps:
s1, obtaining a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
s2, striping the shape to be printed according to a preset angle increment by using an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to each angle;
s3, partitioning the plurality of partitioned rectangles corresponding to each angle respectively by adopting a z-shaped scanning mode and based on an optimal distance principle to obtain partitioned rectangles of each sub-domain corresponding to each angle;
s4, obtaining a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the strip rectangles of each subarea of each sub-domain corresponding to each angle, and determining the printing path corresponding to the lowest printing time consumption as an optimal printing path.
Firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the plurality of segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further shortened, and the printing efficiency is improved.
The specific implementation manner of obtaining the shape to be printed according to any two-dimensional layered slice image of the model to be printed in S1 may be:
1) obtaining a shape to be printed from any two-dimensional layered slice image of the printing model by an image identification method;
2) considering that the intersection point of the plane curve is very complex to solve, and the performance of judging the extreme point or utilizing the continuity is not as good as that of a polygon by utilizing a curve equation, the shape to be printed can be obtained from any two-dimensional layered slice image of the model to be printed by adopting an approxplolyDP function in an OpenCV.
For a same graph, the result of striping in different directions according to different angles is possibly very large, and further the printing time consumption corresponding to each angle is different, so striping is performed according to different angles, and a plurality of striping rectangles corresponding to each angle are obtained, specifically:
as shown in fig. 6 and 7, the distribution of the plurality of bar rectangles obtained by bar-splitting at the first angle is different from the distribution of the plurality of bar rectangles obtained by bar-splitting at the second angle, that is, the result of bar-splitting at different angles is different.
The preset angular increment can be understood as: setting a straight line on the two-dimensional layered slice image along any direction, such as the horizontal direction, the vertical direction and the like, taking the straight line as an x axis, namely, taking the corresponding angle as 0 degree, and striping the shape to be printed by adopting an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to the angle of 0 degree; then, a new straight line is obtained by utilizing the two-dimensional affine transformation of the polygonal homogeneous coordinate to change to the reverse direction, namely, the preset angle increment theta is rotated anticlockwise or clockwise along an included angle of an x axis, the straight line is taken as the x axis, namely, the corresponding angle is theta, the shape to be printed is segmented by adopting an optimized improved x scanning method, a plurality of segmented rectangles corresponding to the angle theta are obtained, and by analogy, a plurality of segmented rectangles corresponding to 2 theta, 3 theta and 4 theta … … are obtained, namely, a plurality of segmented rectangles corresponding to each angle are obtained;
the value of the preset angle increment theta can be manually adjusted, if the preset angle increment theta is 5 degrees, 10 degrees, 20 degrees and the like, when the preset angle increment theta is 10 degrees, a plurality of strip rectangles respectively corresponding to 0 degrees, 20 degrees, 30 degrees, 40 degrees, 50 degrees, 60 degrees, 70 degrees, 80 degrees, 90 degrees, 100 degrees, 110 degrees, 120 degrees, 130 degrees, 140 degrees, 150 degrees, 160 degrees and 170 degrees are obtained.
Preferably, in the above technical solution, S2 includes:
s20, carrying out x-axis scanning on the shape to be printed according to any angle by using an improved x-scanning method, obtaining intersection points of the x-axis and the shape to be printed, carrying out bar-shaped covering on areas among the obtained intersection points, and obtaining a plurality of bar-shaped rectangles corresponding to the angle until obtaining a plurality of bar-shaped rectangles corresponding to each angle.
The optimized improved x-ray scanning method can be understood as further optimization on the existing improved x-ray scanning method to achieve the purpose of surface scanning, and specifically comprises the following steps:
the method for improving the polygon filling problem of the x scanning method originally used for calculating graphics adopts a line scanning form, utilizes the polygon straight line continuity and adopts an increment method to carry out scanning intersection, and specifically comprises the following steps:
setting two linked lists, wherein the first linked list is used as an edge list NET and is used for storing a polygon, namely the minimum y value scanned by each edge in the shape to be printed; the second linked list is used as an active edge list AET, and only the edge currently having an intersection with the scan line is stored, so that:
before each scanning, checking whether a first linked list, namely an edge list NET, has a new intersecting edge, if so, entering an active edge list AET for scanning, and simultaneously deleting the new intersecting edge from the first linked list, namely the edge list NET, after the current x scanning line scanning is finished, checking whether an edge in a second linked list, namely the active edge list AET, contains a maximum y value which can be scanned by the edge in the next scanning, if so, deleting the edge from the second linked list, namely the active edge list AET, and simultaneously adopting an increment idea: when the x scanning line translates upwards and the y value increases, the increase of the x value is the increase of the y/the slope k of the side; and repeating the processes until the two linked lists are empty, and finishing the scanning. The scanning method used in the invention is an optimized improved x-ray scanning method, two intersecting lines are needed to determine whether a rectangle is covered, a certain difference is formed between direct linear filling and the following common conditions of judging and selecting the intersecting points:
1) the first intersection point selection case is that, as shown in fig. 8, the upper scan line has only two intersection points, and the lower scan line also has only two intersection points, which indicates that the region surrounded by the upper scan line, the lower scan line and the shape to be printed does not contain an inner circle, orEven if the inner ring is included, the area of the inner ring is small, at the moment, the X-axis coordinate value of each intersection point and the X-axis coordinate value of the end point of the shape to be printed in the area are compared, and the X is taken as the first intersection pointminI.e. minimum X-axis coordinate value, the second intersection point being taken as XmaxI.e., the maximum x-axis coordinate value;
2) in a second intersection point selection case, as shown in fig. 9, the upper scan line has even number of intersection points, the lower scan line also has even number of intersection points, and the number of the intersection points of the upper scan line is equal to the number of the intersection points of the lower scan line, which means that the upper scan line and the lower scan line both pass through the same number of inner circles, which is equivalent to the plurality of sub-domains in the first case, and the selection method refers to the first intersection point selection case, which is not described herein;
3) a third intersection point selection condition, as shown in fig. 10, when the upper scan line has an even number of intersection points and the lower scan line has an odd number of intersection points, or when the upper scan line has an odd number of intersection points and the lower scan line has an even number of intersection points, it is indicated that one scan line just passes through the boundary of the inner ring, and the single intersection point is considered as two intersection points, the selection method refers to the second intersection point selection condition, but it should be noted that the x-axis coordinate value of two adjacent intersection points is large or small, and if the x-axis coordinate value of the latter intersection point is smaller than the x-axis coordinate value of the former intersection point, the x-axis coordinate value of the former intersection point is assigned as the x-axis coordinate value of the latter intersection point;
4) the upper scanning line has even number of intersection points, the lower scanning line also has even number of intersection points, and the number of the intersection points of the upper scanning line is not equal to that of the intersection points of the lower scanning line, which indicates that one scanning line passes through the inner ring, and the other scanning line does not pass through the inner ring, and at this time, the scanning line is equivalent to that the inner ring does not play a role; as shown in fig. 11, the number of intersections of the upper scanning lines is 4, that is, an even number, and the number of intersections of the lower scanning lines is 2, that is, an even number, and 4 ≠ 2, that is, the upper scanning lines pass through the inner circle, and the lower scanning lines do not pass through the inner circle.
In the above, the inner ring means: the part which is surrounded in the graph to be printed and is not used for printing, the intersection point of the upper scanning line refers to: the intersection point of the upper scanning line and the edge of the graph to be printed refers to: the point where the lower scan line intersects the edge of the pattern to be printed.
The procedure of the pseudo code, i.e., implementing the flow of S2 in code form, is as follows:
Figure GDA0003456807430000101
Figure GDA0003456807430000111
Figure GDA0003456807430000121
the preset algorithm can adopt a neural network and a genetic annealing algorithm, and when the preset algorithm is the genetic annealing algorithm, then: after the division is finished, the recorded partition end points are used as the traversal starting points of the subdomains to perform full traversal, a large-scale traveler problem (the starting point (the end point) is set by the system when the projector walks) can be obtained after the division rectangles are degenerated to the points, the solution space for searching the optimal solution by using the global search is too large, and therefore an approximate algorithm based on genetic annealing and partition scanning is adopted to maximize the efficiency as much as possible.
The purpose of the partition is mainly to reduce idle running, the graph divided by the strips is in a dot matrix shape at last, and the partition is not easy to be directly listed according to an FDM filling method, so that the optimal distance principle is adopted, the graph is firstly scanned once according to an axis parallel mode, and the area is divided, and the specific method is as follows (aiming at a single sub-domain):
from ymaxInitially, scanning is performed according to a z-word principle (horizontal priority), i.e., a z-word scanning manner, and based on an optimal distance principle, where the z-word scanning manner can refer to fig. 4, and if it is no longer possible to walk according to this rule (i.e., enter a dead zone), a nearest point that is not traversed is moved to perform the above process, and points that have completed walking in the previous stage are combined into a partition until all points have been traversed, i.e., a situation of a single sub-domain partition is obtained. Wherein, the optimal distance principle means: when in useWhen one of the sub-domains is scanned, the sub-domain closest to the current sub-domain is selected for continuous scanning.
When determining the traversal order of each partition in a sub-domain, since the number of partitions in the sub-domain may be large, for example, the sub-domain has M partitions, 2M! The order of arrangement, i.e., the 2M! The traversing sequence is low in efficiency, only 2M traversing starting points need to be considered, a partition end point is selected from the partition as the traversing starting point, one partition is selected as the initial traversing partition every time, traversing is started from the partition, and after traversing is finished, the nearest adjacent partition is selected to traverse as the initial traversing partition, and because the relative distance between the partitions is constant, 2M determined traversing sequences exist, and the calculation amount is greatly reduced.
For the problem of sequencing each connected domain and connecting each partition sequence, the invention adopts a heuristic genetic annealing algorithm to solve, combines the characteristics of evolution of genetic algorithm population and temperature improvement of simulated annealing in the evolution to strengthen the limitation, and can ensure that the path optimization is fast converged.
Preferably, in the above technical solution, if the preset algorithm is a genetic annealing algorithm, S4 includes:
s40, determining the form of the chromosome corresponding to each angle in the genetic annealing algorithm, wherein the form of the chromosome corresponding to the qth angle is as follows:
Figure GDA0003456807430000131
selecting a partition end point of the ith partition from the jth subdomain in the qth angle as a traversal starting point N of the subdomainijq,i=1,2,……2mqj,mqjIndicates the number of divisions in the q-th angle, SjqJ is more than or equal to 1 and less than or equal to n, n represents the number of sub-fields corresponding to the q-th angle, and the partition end point is the middle point of the wide side of the strip rectangle;
s41, determining a fitness function corresponding to each angle in the genetic annealing algorithm, wherein Tq=∑Dj(q)/v1+d/v2,TqRepresents the qth angleTime spent in printing corresponding to degree Dj(q) represents a path length corresponding to a jth sub-field of the qth angle, d represents a free-wheeling length connecting all sub-fields corresponding to the qth angle, v1 represents an exposure moving speed, and v2 represents a free-wheeling moving speed;
s42, obtaining a printing path and printing time consumption corresponding to each angle by using a genetic annealing algorithm for configuring the chromosome corresponding to each angle and the fitness function corresponding to each angle, and selecting the printing path corresponding to the lowest printing time consumption.
And obtaining the printing path and the printing time consumption corresponding to each angle by adopting a genetic annealing algorithm for configuring the chromosome corresponding to each angle and the fitness function corresponding to each angle, and selecting the printing path corresponding to the lowest printing time consumption as the optimal printing path, so that the calculated amount is greatly reduced, and the printing precision can be ensured. The specific algorithm design and related elements of the genetic annealing algorithm are as follows:
1) mechanism of line weighting: (ii) an exposure moving speed v1 (iii) an idle stroke moving speed v2 (iii) accuracy problem: the straight line error is in direct proportion to the speed (considering the difference of multi-axis control coefficients), epsilon is beta v1 (beta is a coefficient related to a control system), and the precision requirement is considered when the exposure moving speed v1 is selected;
2) determining the form of the chromosome corresponding to each angle in the genetic annealing algorithm, wherein the form of the chromosome corresponding to the qth angle is as follows:
Figure GDA0003456807430000141
thus, the form of chromosome corresponding to each angle, where N is obtainedi1qPeople are preset and can not be changed;
3) determining a fitness function corresponding to each angle in the genetic annealing algorithm, wherein Tq=∑Dj(q)/v1+ d/v2, thereby obtaining a fitness function corresponding to each angle;
4) determining crossover operators and mutation operators:
sub-domain sequential evolution is mainly achieved by mating: there are two options for this unconventional code mating: (1) conventional mating method: randomly selecting a mating position, wherein genes before the mating positions of two offspring inherit wings before the mating positions of two parents respectively, and selecting non-heavy genes from the genes after the mating positions according to the sequence of the alien genes respectively; (2) a non-transposition method: randomly generating an invariant bit vector with the same dimension as the chromosome, randomly generating 0/1 for each component, wherein 1 represents invariant, 0 represents variant, and selecting non-heavy genes according to the method sequence of (1) in the variant mode;
the partition sequencing evolution is realized by variation (the starting point of sub-domain traversal takes random numbers in the range), and the sub-domain sequence variation is realized by shift traversal (two random position exchange sequences);
5) selecting a population: accepting and rejecting and selecting the population using a simulated annealing acceptance probability, wherein the annealing acceptance probability is Aij(tk)=min{1,exp(-(T(j)-T(i))/tk},Aij(tk) To receive the probability of a j (chromosome) state in an i (chromosome) state.
6) Selecting control parameters: the population size N: both excessive calculation caused by excessive selected population and convergence to local optimum caused by too small population are prevented (the invention takes twice of the number of subdomains); probability of hybridization Pc: the value is moderate, the population is prevented from being damaged too fast, and the optimal solution can be obtained; ③ rate of variation Pn: each sub-domain is subjected to main variation in partition evolution, so that the variation rate of the sub-domains in the partitions takes a higher value; the variation rate of the sub-domain sequencing is a smaller value;
7) termination conditions were as follows: setting the evolution times to be less than a certain value; or, no better solution appears for continuous 3-4 generations;
8) initial population: and 4, random selection is performed to prevent premature ripening.
9) Setting initial temperature and temperature iteration: using a method of numerically calculating the estimate, given X0T is calculated for 0.9 and the number of iteration steps0(ii) a The temperature iteration employs an equal proportional drop.
The process of S40 to S42, i.e., obtaining the printing path and printing time corresponding to each angle using the genetic annealing algorithm, is performed as follows:
the process of S40 to S42, i.e., obtaining the printing path and printing time corresponding to each angle using the genetic annealing algorithm, is performed as follows:
SCANNING()
{
for (n connected domain)
{ from (x)min,ymax) Scanning according to the z-word principle (transverse priority), if the scanning can not move according to the rule (namely, the scanning enters the dead zone), moving a nearest point which is not traversed to carry out the process, combining the points which are completed by the walking in the previous stage into a partition until all the points are traversed, namely, the condition of a single subdomain partition is obtained }
Calculating an initial temperature value t0
Giving population scale maxpop, k ═ 0;
the initial temperature tk ═ t0, and the population is randomly selected;
while (unsatisfied with termination conditions)
{ randomly choosing in the neighborhood of each chromosome i e pop (k) in the population pop (k) to decide whether to accept j by calculating the acceptance probability in simulated annealing at state j e N (i);
iterating to obtain new population newcrop (k +1), and recording the minimum value Tmin
Computing an adaptation function in newport (k + 1);
mating and mutating to obtain mutpop (k + 1);
tk+1=d(tk);k=k+1;pop(k)=mutpop(k);}
thus, the optimal print path, which is the print path corresponding to the lowest print elapsed time, is determined, and the optimal print path is shown by the dotted line and the thick solid line in fig. 12, that is, the dotted line and the thick solid line between the start point and the end point, that is, between the start point and the start point, are the optimal print path.
The printing path planning method is derived from a mowing algorithm, and the basic idea of the mowing algorithm is as follows: for a given area of turf coverage, a short circuit is found to move the mower so that all turf is cut and the mower can leave the area of coverage. The mowing path mainly includes two types, i.e., an axis-parallel type and a contour-parallel type, as shown in fig. 13 and 14. However, unlike the mowing problem, the continuous traversal of the projector is made up of a plurality of subfields, and the influence of the speed on the precision needs to be considered, because the exposure time of each pixel point in the speed direction needs to be ensured to be consistent, the projector can only travel in a straight line mode, and an arc path cannot appear.
The method covers the graph by a segmentation method based on improved x scanning, and optimizes the traversal path of photocuring continuous projection by utilizing the segmentation idea and the genetic annealing algorithm to perform multi-sub-domain traversal of the image, and can select the optimized path through weighting calculation in combination with the precision requirement, thereby greatly shortening the time of the continuous projection of the projector for a large breadth and further shortening the printing time of irradiation curing of the whole part.
In the foregoing embodiments, although the steps are numbered as S1, S2, etc., but only the specific embodiments are given in this application, and those skilled in the art may adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of the present invention, and it is understood that some embodiments may include some or all of the above embodiments.
As shown in fig. 15, a print path planning system 200 according to an embodiment of the present invention includes an obtaining module 210, a dividing module 220, a partitioning module 230, and a module 240 for determining an optimal print path;
the obtaining module 210 is configured to obtain a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
the striping module 220 is configured to stripe the shape to be printed according to a preset angle increment by using an optimized improved x-scan method, so as to obtain a plurality of striping rectangles corresponding to each angle;
the partitioning module 230 is configured to perform partitioning processing on the multiple partitioned rectangles corresponding to each angle respectively in a z-scan manner based on an optimal distance principle, so as to obtain a partitioned rectangle of each sub-domain corresponding to each angle;
the optimal printing path determining module 240 is configured to obtain a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the striped rectangles of each sub-region corresponding to each angle, and determine the printing path corresponding to the lowest printing time consumption as the optimal printing path.
Firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the plurality of segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further shortened, and the printing efficiency is improved.
Preferably, in the above technical solution, the striping module 220 is specifically configured to:
and performing x-axis scanning on the shape to be printed according to any angle by using an improved x-scanning method, acquiring intersection points of the x-axis and the shape to be printed, and performing strip coverage on areas among the acquired intersection points to obtain a plurality of strip rectangles corresponding to the angle until a plurality of strip rectangles corresponding to each angle are obtained.
Preferably, in the above technical solution, when the preset algorithm is a genetic annealing algorithm, the module 240 for determining an optimal printing path is specifically configured to:
determining the form of the chromosome corresponding to each angle in the genetic annealing algorithm, wherein the form of the chromosome corresponding to the qth angle is as follows:
Figure GDA0003456807430000171
selecting a partition end point of the ith partition from the jth subdomain in the qth angle as a traversal starting point N of the subdomainijq,i=1,2,……2mqj,mqjIndicates the number of divisions in the q-th angle, SjqJ is more than or equal to 1 and less than or equal to n, n represents the number of sub-fields corresponding to the q-th angle, and the partition end point is the middle point of the wide side of the strip rectangle;
determining a fitness function corresponding to each angle in the genetic annealing algorithm, wherein Tq=∑Dj(q)/v1+d/v2,TqRepresents the printing time corresponding to the qth angle, Dj(q) represents a path length corresponding to a jth sub-field of the qth angle, d represents a free-wheeling length connecting all sub-fields corresponding to the qth angle, v1 represents an exposure moving speed, and v2 represents a free-wheeling moving speed;
and obtaining a printing path and printing time consumption corresponding to each angle by using a genetic annealing algorithm for configuring the chromosome corresponding to each angle and the fitness function corresponding to each angle, and selecting the printing path corresponding to the lowest printing time consumption.
Preferably, in the above technical solution, the obtaining module 210 is specifically configured to:
and obtaining the shape to be printed from any two-dimensional layered slice image of the model to be printed by adopting an approxPlyDP function in a cross-platform computer vision library OpenCV.
The above steps for realizing the corresponding functions of each parameter and each unit module in the print path planning system 200 according to the present invention can refer to each parameter and step in the above embodiment of a print path planning method, which are not described herein again.
The 3D printer provided by the embodiment of the invention comprises a controller, wherein the controller is used for executing the steps of the printing path planning method.
Firstly, a shape to be printed is segmented through an optimized improved x scanning method to obtain a plurality of segmented rectangles corresponding to each angle, then the segmented rectangles corresponding to each angle are partitioned according to a z-shaped scanning mode and based on an optimal distance principle, finally, the path of the segmented rectangles traversing each sub domain corresponding to each angle is optimized according to a preset algorithm, so that the printing precision can be guaranteed, the idle stroke length of the shape to be printed in a two-dimensional layered slice image can be greatly reduced, the printing path corresponding to the lowest printing time consumption is selected as the optimal printing path, the printing time is further reduced, and the printing efficiency is improved.
As will be appreciated by one skilled in the art, the present invention may be embodied as a system, method or computer program product.
Accordingly, the present disclosure may be embodied in the form of: may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software, and may be referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (7)

1. A print path planning method, comprising:
s1, obtaining a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
s2, striping the shape to be printed according to a preset angle increment by using an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to each angle;
s3, partitioning the plurality of partitioned rectangles corresponding to each angle respectively by adopting a z-shaped scanning mode and based on an optimal distance principle to obtain partitioned rectangles of each sub-domain corresponding to each angle;
s4, obtaining a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the strip rectangles of each subarea of each sub-domain corresponding to each angle, and determining the printing path corresponding to the lowest printing time consumption as an optimal printing path;
s2 includes:
and performing x-axis scanning on the shape to be printed according to any angle by using an improved x-scanning method, acquiring intersection points of the x-axis and the shape to be printed, and performing strip coverage on areas among the acquired intersection points to obtain a plurality of strip rectangles corresponding to the angle until a plurality of strip rectangles corresponding to each angle are obtained.
2. The method for print path planning according to claim 1, wherein the predetermined algorithm is a genetic annealing algorithm, and S4 includes:
s40, determining the form of the chromosome corresponding to each angle in the genetic annealing algorithm, wherein the form of the chromosome corresponding to the qth angle is as follows:
Figure FDA0003456807420000011
selecting a partition end point of the ith partition from the jth subdomain in the qth angle as a traversal starting point N of the subdomainijq,i=1,2,……2mqj,mqjIndicates the number of divisions in the q-th angle, SjqDenotes the q-thJ is more than or equal to 1 and less than or equal to n in the jth sub-field in each angle, n represents the number of sub-fields corresponding to the qth angle, and the end point of each sub-area is the middle point of the wide side of the strip rectangle;
s41, determining a fitness function corresponding to each angle in the genetic annealing algorithm, wherein Tq=∑Dj(q)/v1+d/v2,TqRepresents the printing time corresponding to the qth angle, Dj(q) represents a path length corresponding to a jth sub-field of the qth angle, d represents a free-wheeling length connecting all sub-fields corresponding to the qth angle, v1 represents an exposure moving speed, and v2 represents a free-wheeling moving speed;
s42, obtaining a printing path and printing time consumption corresponding to each angle by using a genetic annealing algorithm for configuring the chromosome corresponding to each angle and the fitness function corresponding to each angle, and selecting the printing path corresponding to the lowest printing time consumption.
3. The method for planning a print path according to claim 1, wherein the obtaining a shape to be printed according to any two-dimensional layered slice image of a model to be printed comprises:
and obtaining the shape to be printed from any two-dimensional layered slice image of the model to be printed by adopting an approxPlyDP function in a cross-platform computer vision library OpenCV.
4. A printing path planning system is characterized by comprising an acquisition module, a striping module, a partitioning module and an optimal printing path determining module;
the acquisition module is used for acquiring a shape to be printed according to any two-dimensional layered slice image of the model to be printed;
the striping module is used for striping the shape to be printed according to a preset angle increment by utilizing an optimized improved x scanning method to obtain a plurality of striping rectangles corresponding to each angle;
the partitioning module is used for partitioning a plurality of partitioned rectangles corresponding to each angle respectively according to a z-shaped scanning mode and based on an optimal distance principle to obtain partitioned rectangles of each sub-domain corresponding to each angle;
the optimal printing path determining module is used for obtaining a printing path corresponding to the lowest printing time consumption according to a preset algorithm and the strip rectangles of each subarea of each sub-domain corresponding to each angle, and determining the printing path corresponding to the lowest printing time consumption as the optimal printing path;
the slitting module is specifically configured to:
and performing x-axis scanning on the shape to be printed according to any angle by using an improved x-scanning method, acquiring intersection points of the x-axis and the shape to be printed, and performing strip coverage on areas among the acquired intersection points to obtain a plurality of strip rectangles corresponding to the angle until a plurality of strip rectangles corresponding to each angle are obtained.
5. The printing path planning system according to claim 4, wherein when the preset algorithm is a genetic annealing algorithm, the module for determining the optimal printing path is specifically configured to:
determining the form of the chromosome corresponding to each angle in the genetic annealing algorithm, wherein the form of the chromosome corresponding to the qth angle is as follows:
Figure FDA0003456807420000031
selecting a partition end point of the ith partition from the jth subdomain in the qth angle as a traversal starting point N of the subdomainijq,i=1,2,……2mqj,mqjIndicates the number of divisions in the q-th angle, SjqJ is more than or equal to 1 and less than or equal to n, n represents the number of sub-fields corresponding to the q-th angle, and the partition end point is the middle point of the wide side of the strip rectangle;
determining a fitness function corresponding to each angle in the genetic annealing algorithm, wherein Tq=∑Dj(q)/v1+d/v2,TqRepresents the printing time corresponding to the qth angle, Dj(q) represents a path length corresponding to a jth sub-field of the qth angle, d represents a free-wheeling length connecting all sub-fields corresponding to the qth angle, v1 represents an exposure moving speed, and v2 represents a free-wheeling moving speed;
and obtaining a printing path and printing time consumption corresponding to each angle by using a genetic annealing algorithm for configuring the chromosome corresponding to each angle and the fitness function corresponding to each angle, and selecting the printing path corresponding to the lowest printing time consumption.
6. The print path planning system according to claim 4, wherein the obtaining module is specifically configured to:
and obtaining the shape to be printed from any two-dimensional layered slice image of the model to be printed by adopting an approxPlyDP function in a cross-platform computer vision library OpenCV.
7. A 3D printer comprising a controller for performing the steps of a print path planning method according to any one of claims 1 to 3.
CN202110096998.XA 2021-01-25 2021-01-25 Printing path planning method and system and 3D printer Active CN112677489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110096998.XA CN112677489B (en) 2021-01-25 2021-01-25 Printing path planning method and system and 3D printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110096998.XA CN112677489B (en) 2021-01-25 2021-01-25 Printing path planning method and system and 3D printer

Publications (2)

Publication Number Publication Date
CN112677489A CN112677489A (en) 2021-04-20
CN112677489B true CN112677489B (en) 2022-03-08

Family

ID=75459139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110096998.XA Active CN112677489B (en) 2021-01-25 2021-01-25 Printing path planning method and system and 3D printer

Country Status (1)

Country Link
CN (1) CN112677489B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113776437B (en) * 2021-08-17 2022-06-07 北京科技大学 High-precision medium plate width measuring method based on machine vision
CN114131932B (en) * 2021-11-25 2024-07-02 江苏科技大学 Path planning method based on rasterized 3D printing partition
CN114103126B (en) * 2021-11-26 2022-11-18 南京衍构科技有限公司 3D printing scanning filling path planning method for revolving body with unequal wall thickness
CN115246223B (en) * 2022-06-06 2024-07-19 重庆大学 3D printing path optimization method and system based on grid traversal
CN115294244B (en) * 2022-08-11 2023-10-31 北京理工大学 Honeycomb structure patterning self-adaptive filling method based on machine learning
CN118269495A (en) * 2024-04-26 2024-07-02 广州市森扬电子科技有限公司 Method, equipment and storage medium for improving efficiency of digital printer

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104325638A (en) * 2014-05-14 2015-02-04 浙江大学 Partition-based 3D printing filling path generation method
CN106273446A (en) * 2015-06-03 2017-01-04 深圳维示泰克技术有限公司 A kind of section path generating method printed for 3D and system
CN108556365A (en) * 2018-03-12 2018-09-21 中南大学 A kind of composite filled optimization method and system of rapidform machine
CN109094013A (en) * 2018-08-01 2018-12-28 东南大学 A kind of 3 D-printing change fill method based on contour feature
CN110209363A (en) * 2019-05-30 2019-09-06 大连理工大学 Intelligent 3D printing paths planning method based on genetic algorithm
CN110570509A (en) * 2019-08-27 2019-12-13 华中科技大学 grid-based model partition slicing method
CN111716702A (en) * 2019-05-23 2020-09-29 湖南大学 3D printing path optimization method, storage device and printing equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10061301B2 (en) * 2015-12-21 2018-08-28 Palo Alto Research Center Incorporated Toolpath planning process for conductive materials
US10137635B2 (en) * 2016-05-19 2018-11-27 Palo Alto Research Center Incorporated System and method for printing path planning for manufacturing of functionally graded materials with the aid of a digital computer

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104325638A (en) * 2014-05-14 2015-02-04 浙江大学 Partition-based 3D printing filling path generation method
CN106273446A (en) * 2015-06-03 2017-01-04 深圳维示泰克技术有限公司 A kind of section path generating method printed for 3D and system
CN108556365A (en) * 2018-03-12 2018-09-21 中南大学 A kind of composite filled optimization method and system of rapidform machine
CN109094013A (en) * 2018-08-01 2018-12-28 东南大学 A kind of 3 D-printing change fill method based on contour feature
CN111716702A (en) * 2019-05-23 2020-09-29 湖南大学 3D printing path optimization method, storage device and printing equipment
CN110209363A (en) * 2019-05-30 2019-09-06 大连理工大学 Intelligent 3D printing paths planning method based on genetic algorithm
CN110570509A (en) * 2019-08-27 2019-12-13 华中科技大学 grid-based model partition slicing method

Also Published As

Publication number Publication date
CN112677489A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN112677489B (en) Printing path planning method and system and 3D printer
CN112677488B (en) Printing path planning method and system and 3D printer
JP7155199B2 (en) GPU material specification for 3D printing with 3D distance fields
EP3955158A1 (en) Object detection method and apparatus, electronic device, and storage medium
US6600965B1 (en) Method and apparatus for production of high resolution three-dimensional objects by stereolithography
CN109532006B (en) Adaptive layer thickness slicing method and printing system
US20230256682A1 (en) Method and system for rendering data for addressable dispensing
EP3311988A1 (en) A method for joint color and translucency 3d printing and a joint color and translucency 3d printing device
Zhou et al. A novel low-cost stereolithography process based on vector scanning and mask projection for high-accuracy, high-speed, high-throughput and large-area fabrication
EP0354637A2 (en) CAD/CAM stereolithographic data conversion
US11704858B2 (en) Method and system for diffusing color error into additive manufactured objects
US20150006105A1 (en) Prediction of a focal plane with progressive through-focus scans
CN112132970B (en) Natural texture synthesis system and method for 3D printing
CN111319264B (en) Data processing method applied to 3D printing equipment and 3D printing equipment
JP2017056574A (en) Three-dimensional molding apparatus, three-dimensional molding method and control program for three-dimensional molding apparatus
KR102328851B1 (en) Three-dimensional printing using fast stl file conversion
CN114371666A (en) 3D printing three-dimensional path planning method based on DLP technology
CN116720274A (en) Method for forming metal corrosion pit removing processing surface
Ye et al. Chi Zhou
CN117245206A (en) Laser processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant