CN111260135A - Method and system for solving cutting path of closed printing - Google Patents

Method and system for solving cutting path of closed printing Download PDF

Info

Publication number
CN111260135A
CN111260135A CN202010053797.7A CN202010053797A CN111260135A CN 111260135 A CN111260135 A CN 111260135A CN 202010053797 A CN202010053797 A CN 202010053797A CN 111260135 A CN111260135 A CN 111260135A
Authority
CN
China
Prior art keywords
target
path
vertex
undirected graph
imposition
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.)
Pending
Application number
CN202010053797.7A
Other languages
Chinese (zh)
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.)
Shandong Chenxi Intelligent Technology Co ltd
Original Assignee
Shandong Chenxi Intelligent Technology Co ltd
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 Shandong Chenxi Intelligent Technology Co ltd filed Critical Shandong Chenxi Intelligent Technology Co ltd
Priority to CN202010053797.7A priority Critical patent/CN111260135A/en
Publication of CN111260135A publication Critical patent/CN111260135A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/043Optimisation of two dimensional placement, e.g. cutting of clothes or wood
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention provides a method and a system for solving a cutting path of closed printing, wherein the method and the system both comprise the following steps: establishing a target undirected graph by taking the vertex of each imposition picture on the target imposition as the vertex of the graph and the outline of each imposition picture on the target imposition as the edge of the graph; the target imposition is an imposition of a current combined printing cutting path to be solved; calculating the degrees of each vertex in the target undirected graph; counting the total number of odd-degree vertexes in the target undirected graph, and judging whether the counted total number is equal to zero or not; when the total number obtained by statistics is judged to be not equal to zero, solving a target path with the minimum sum of costs and enabling each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex; then, adding a corresponding edge in the target undirected graph according to the target path; and after the addition of the edges is completed or when the total number obtained by statistics is judged to be equal to zero, determining and outputting an Euler loop starting from a preset vertex in the current target undirected graph. The invention is used for shortening the cutting path and improving the cutting efficiency.

Description

Method and system for solving cutting path of closed printing
Technical Field
The invention relates to the field of closed printing, in particular to a method and a system for solving a cutting path of closed printing.
Background
At present, in the printing business, the plate combination printing is gradually developed. The combined printing is called as the makeup printing, and combines a plurality of printing parts with small printing quantity of different customers into a large printing plate, so that the printing cost is shared, the cost is reduced, and the integration of the printing industry and information networking is promoted.
The combined plate printing can achieve the purpose of batch production. However, the combined printing has an important subsequent process that the combined printed pictures need to be cut and separated, and particularly, the combined pictures need to be integrally printed on the processed printing paper board by using a cutting tool bit of a processing machine tool and then are cut along the edge of the printed matter. And the cutting tool bit of machine tool can remove along arbitrary direction, and at present in actual cutting process, the condition that the cutting tool bit cuts same stroke many times often can appear, and cutting tool bit moving path is longer relatively, and the cutting time is longer relatively, and cutting efficiency is lower relatively.
Therefore, the invention provides a method and a system for solving the cutting path of the closed printing, which are used for solving the problems.
Disclosure of Invention
In view of the above disadvantages in the prior art, the present invention provides a method and a system for solving a cutting path in a closed printing process, which are used to shorten the cutting path and improve the cutting efficiency.
In a first aspect, the present invention provides a method for solving a merged printing cutting path, including the steps of:
p1, taking the vertex of each imposition picture on the target imposition as the vertex of the graph, and taking the outline of each imposition picture on the target imposition as the edge of the graph, and creating a target undirected graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
p2, calculating the degrees of each vertex in the target undirected graph;
p3, counting the total number of odd-degree vertexes in the target undirected graph, and judging whether the counted total number is equal to zero, if so, executing the step P6, otherwise, continuing to execute the step P4;
p4, solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex;
p5, adding a corresponding edge in the target undirected graph according to the target path;
and P6, determining and outputting an Euler loop from a preset vertex in the current target undirected graph.
Further, the specific implementation method of step P1 includes the steps of:
constructing an adjacent matrix of an undirected graph and initializing the adjacent matrix into a null;
acquiring makeup data of a target makeup, and acquiring vertex information and contour information of each makeup picture on the target makeup;
adding the vertex of any imposition picture, the connection relation of the vertex and the connection weight of the vertex to the adjacency matrix; the connection weight is the side length;
traversing the next makeup picture, adding vertexes which are not coincident with the vertexes added in the adjacent matrix in the traversed makeup picture to the adjacent matrix, and then updating the connection relation and the connection weight of each vertex in the adjacent matrix; continuing traversing the next makeup picture until all the makeup pictures are traversed, and recording the latest adjacent matrix obtained correspondingly as a target adjacent matrix;
and creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
Further, the implementation method of step P4 includes the steps of:
calculating and finding out the shortest path between every two odd-degree vertexes;
combining the found shortest paths to obtain path combinations with corresponding quantity; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
respectively calculating the path cost of each path combination; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
and selecting the path combination with the minimum path cost as a target path combination, wherein each shortest path in the target path combination forms a target path.
Further, the method for combining the found shortest paths to obtain a corresponding number of path combinations includes the steps of:
traversing an odd vertex of the target undirected graph;
grouping every two traversed odd-degree vertexes to obtain point pairs corresponding to various divisions;
and recording all the point pairs corresponding to each division method to form a point pair combination, and combining the shortest paths corresponding to each point pair in the point pair combination to form a path combination to obtain the path combinations with corresponding quantity.
Further, in step P6, the euler loop from the preset vertex in the latest target undirected graph is determined by using a depth-first search algorithm.
In a second aspect, the present invention provides a system for solving a merged printing cutting path, including:
the undirected graph creating unit is used for creating a target undirected graph by taking the vertex of each imposition picture on the target imposition as the vertex of the graph and the outline of each imposition picture on the target imposition as the edge of the graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
the vertex degree calculating unit is used for calculating the degrees of all vertexes in the target undirected graph;
the odd degree vertex number counting unit is used for counting the total number of odd degree vertexes in the target undirected graph;
a judging unit for judging whether the counted total number of odd-degree vertexes is equal to zero;
the target path calculation unit is used for solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex when the total number of the counted odd-degree vertices is judged to be not equal to zero;
the undirected graph edge supplementing unit is used for adding a corresponding edge in the target undirected graph according to the target path;
the euler loop calculating unit is used for calculating an euler loop starting from a preset vertex in the current target undirected graph when the undirected graph edge supplementing unit completes edge supplementing or the judging unit judges that the total number of odd-degree vertexes is equal to zero;
and the output unit is used for outputting the Euler loop calculated by the Euler loop calculation unit.
Further, the undirected graph creating unit includes:
the adjacency matrix construction module is used for constructing an adjacency matrix of the undirected graph and initializing the adjacency matrix into a null;
the makeup picture information acquisition module is used for acquiring makeup data of the target makeup and acquiring vertex information and contour information of each makeup picture on the target makeup;
the picture traversing unit is used for traversing the makeup pictures on the makeup;
a first data adding unit, configured to add vertices, vertex connection relationships, and vertex connection weights of the first traversed imposition picture to the adjacency matrix;
a second data adding unit, configured to add vertices, which are not coincident with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix, and update the connection relationships and connection weights of the vertices in the adjacent matrix after adding vertices, which are not coincident with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix, until all imposition pictures are traversed, and mark the latest adjacent matrix obtained by correspondence as a target adjacent matrix;
and the undirected graph creating module is used for creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
Further, the target path calculating unit includes:
the shortest path calculation module is used for calculating the shortest path between every two odd-degree vertexes;
the path combination module is used for combining the shortest paths obtained by calculation to obtain path combinations with corresponding quantity; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
the path cost calculation module is used for calculating the path cost of each path combination respectively; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
and the target path acquisition module is used for selecting the path combination with the minimum path cost as the target path combination, and each shortest path contained in the target path combination forms a target path.
Further, the path combining module includes:
the vertex traversing unit is used for traversing the odd-degree vertex of the target undirected graph;
the grouping unit is used for grouping every two traversed odd-degree vertexes to obtain a point pair corresponding to each division method of the traversed odd-degree vertexes;
and the path combination acquisition unit records that all the point pairs corresponding to each division form a point pair combination, and combines the shortest paths corresponding to each point pair in the point pair combination together to form a path combination to obtain the path combinations with corresponding quantity.
Further, the euler loop calculation unit calculates the euler loop starting from a preset vertex in the current target undirected graph by using a depth-first search algorithm.
The beneficial effect of the invention is that,
the method and the system for solving the cutting path of the closed printing can create the target undirected graph corresponding to the target imposition, and can change the target undirected graph into the Euler graph by adding the edge with the minimum sum of cost in the undirected graph when the formed target undirected graph is not the Euler graph, then can solve the Euler loop starting from the preset vertex in the current target undirected graph and output the Euler loop, and output the Euler loop to a processing machine tool, wherein the cutting tool bit of the processing machine tool cuts along the Euler loop by taking the preset vertex as the cutting starting point, returns to the preset vertex after cutting is finished, so that the path of the cutting tool bit for cutting the picture on the target imposition is shortest, and the aims of shortening the cutting time and reducing the tool bit abrasion can be achieved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method of solving a typographic cut path according to an embodiment of the present invention.
FIG. 2 is a schematic block diagram of a typographic cut path solving system, according to one embodiment of the present invention.
FIG. 3 is an exemplary target imposition.
FIG. 4 is a target undirected graph corresponding to the target imposition shown in FIG. 3.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
As shown in fig. 1, the method 100 includes:
step 101, establishing a target undirected graph by taking a vertex of each imposition picture on a target imposition as a vertex of a graph and taking an outline of each imposition picture on the target imposition as an edge of the graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
102, calculating degrees of each vertex in the target undirected graph;
step 103, counting the total number of odd-degree vertexes in the target undirected graph, and judging whether the counted total number is equal to zero, if so, executing step 106, and if not, continuing to execute step 104;
104, solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex;
step 105, adding a corresponding edge in the target undirected graph according to the target path;
and 106, determining and outputting an Euler loop starting from a preset vertex in the current target undirected graph.
Optionally, the specific implementation method of step 101 includes the steps of:
constructing an adjacent matrix of an undirected graph and initializing the adjacent matrix into a null;
acquiring makeup data of a target makeup, and acquiring vertex information and contour information of each makeup picture on the target makeup;
adding the vertex of any imposition picture, the connection relation of the vertex and the connection weight of the vertex to the adjacency matrix; the connection weight is the side length;
traversing the next makeup picture, adding vertexes which are not coincident with the vertexes added in the adjacent matrix in the traversed makeup picture to the adjacent matrix, and then updating the connection relation and the connection weight of each vertex in the adjacent matrix; continuing traversing the next makeup picture until all the makeup pictures are traversed, and recording the latest adjacent matrix obtained correspondingly as a target adjacent matrix;
and creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
Optionally, the implementation method of step 104 includes the steps of:
calculating and finding out the shortest path between every two odd-degree vertexes;
combining the found shortest paths to obtain path combinations with corresponding quantity; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
respectively calculating the path cost of each path combination; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
and selecting the path combination with the minimum path cost as a target path combination, wherein each shortest path in the target path combination forms a target path.
Optionally, the method for combining the found shortest paths to obtain a corresponding number of path combinations includes:
traversing an odd vertex of the target undirected graph;
grouping every two traversed odd-degree vertexes to obtain point pairs corresponding to various divisions;
and recording all the point pairs corresponding to each division method to form a point pair combination, and combining the shortest paths corresponding to each point pair in the point pair combination to form a path combination to obtain the path combinations with corresponding quantity.
Optionally, in step 106, a depth-first search algorithm is used to determine an euler loop from a preset vertex in the latest target undirected graph.
In order to facilitate understanding of the present invention, the method for solving the cutting path of the imposition printing provided by the present invention is further described below by using the principle of the method for solving the cutting path of the imposition printing of the present invention and combining the process of solving the cutting path of the target imposition printing in the embodiment.
Specifically, the method for solving the typographic cutting path includes:
step S1: establishing a target undirected graph by taking the vertex of each imposition picture on the target imposition as the vertex of the graph and the outline of each imposition picture on the target imposition as the edge of the graph; and the target imposition is the imposition of the current combined printing cutting path to be solved.
The picture imposition is realized through an imposition algorithm, after imposition, the information of the position, the rotation direction and the like of each picture on the imposition is determined, and the information comprises the vertex and the outline of each picture on the imposition, which are collectively called imposition data.
The imposition shown in fig. 3 is taken as a target imposition, each picture on the target imposition is an imposition item, and no isolated imposition item exists on the target imposition.
With the imposition shown in fig. 3 as the target imposition, the specific implementation method of step S1 includes:
step S11, construct the adjacency matrix of the undirected graph and initialize to null.
Firstly, an adjacency matrix of the undirected graph is created for representing all vertexes and vertex connection relations of the undirected graph and is initialized to be empty.
And step S12, acquiring the makeup data of the target makeup, and acquiring the vertex information and the contour information of each makeup item on the target makeup.
Imposition data of the target imposition shown in FIG. 3 is acquired, and vertex information and outline information of each imposition item in the drawing are acquired therefrom. Referring to fig. 3, there are 5 imposition items, and the 5 imposition items are in turn: the layout items with the vertex A, B, K, J, the layout items with the vertex B, K, D, C, the layout items with the vertex D, E, I, J, the layout items with the vertex E, F, G, L and the layout items with the vertex G, L, I, H. The connecting lines between the vertices shown in FIG. 3 are the outlines of imposition items, as well as the edges between the vertices. In imposition, adjacent vertices of each imposition item are connected and vertices on diagonals are not connected.
Step S13, adding the top point of any imposition item, the connection relation of the top point and the connection weight of the top point to the adjacency matrix; the connection weight is the side length of the edge between the vertexes;
then traversing the next imposition item, adding vertexes which are not coincident with the vertexes added in the adjacent matrix in the traversed imposition item to the adjacent matrix, and then updating the connection relation and the connection weight of each vertex in the adjacent matrix; and repeating the next imposition item until all imposition items on the target imposition are traversed, and recording the latest adjacency matrix obtained at the moment as the target adjacency matrix.
In this embodiment, it can be seen that the vertex of the imposition item with the vertex A, B, K, J, the connection relationship of the vertices, and the connection weight of the vertices are added to the adjacency matrix: the four vertexes of the makeup item are sequentially arranged from the upper left corner (B vertex) as a 0 point, a 1 point, a 2 point and a 3 point in a clockwise sequence, because adjacent points are connected and points on a diagonal line are not connected, the four points can be added into an adjacent matrix, the connection relations of 0-1, 1-2, 2-3 and 3-0 are added, and the weight is the side length of the corresponding side; adding the vertex of the imposition item with the vertex B, K, D, C later, wherein the vertex B, K of the current imposition item is not added repeatedly due to the fact that the vertex B, K is overlapped with the vertex B, K added to the adjacency matrix, only the vertex D, C of the current imposition item is added to the adjacency matrix, and then the connection relation and the connection weight of each vertex in the adjacency matrix are updated so as to add the newly added connection relation into the adjacency matrix and update the changed connection relation; and continuing adding the next imposition item to the vertex and the connection relation of the vertex and the adjacency matrix by analogy until the last imposition item is added.
And step S14, creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
Fig. 4 is a target undirected graph corresponding to the target imposition shown in fig. 3, and is denoted as a target undirected graph a, and vertices of the target undirected graph a are: A. b, K, J, D, C, E, I, F, G, L, H are provided.
Step S2: and calculating the degrees of each vertex in the target undirected graph.
The degrees of each vertex in the target undirected graph a are: a is 2, B is 3, K is 3, J is 3, D is 3, C is 2, E is 3, I is 3, F is 2, G is 3, L is 3, H is 2.
The parity of each vertex in the target undirected graph A is: a is even degree vertex, B is odd degree vertex, K is odd degree vertex, J is odd degree vertex, D is odd degree vertex, C is even degree vertex, E is odd degree vertex, I is odd degree vertex, F is even degree vertex, G is odd degree vertex, L is odd degree vertex, H is even degree vertex.
Step S3: counting the total number of odd-degree vertexes in the target undirected graph, and determining whether the counted total number is equal to zero, if so, executing step S6, otherwise, continuing to execute step S4.
The odd vertices of the target undirected graph A have: B. d, E, G, I, J, K, L are provided.
The total number of odd vertices of the statistical target undirected graph a is: 8 of the Chinese medicinal herbs.
If the result of the determination is 8 is not equal to zero, the target undirected graph a is not an euler graph and no euler loop exists therein, and the process continues to step S4.
Step S4: and solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be an even-degree vertex.
This step is used to find a target path that can make the target undirected graph a an euler graph. In order to find out the target path so that the target undirected graph a can become the loop with the shortest euler loop path, the specific implementation step of step S4 includes:
and step S41, calculating and finding out the shortest path between every two odd-degree vertexes.
In this embodiment, the Floyd algorithm is used to determine the shortest distance between two odd vertices B, D, E, G, I, J, K, L.
And step S42, combining the found shortest paths to obtain path combinations with corresponding quantity.
For convenience of implementation, the following method steps are adopted in this embodiment to implement this step S42:
step S421, traversing an odd vertex B, D, E, G, I, J, K, L of the target undirected graph;
step S422, each pair of odd vertices traversed in step S421 is grouped, and a point pair corresponding to each division method is obtained.
The total number of 8 odd-degree vertexes in the target undirected graph A is 8, and the 8 odd-degree vertexes are grouped in pairs, so that the total number is
Figure BDA0002372116270000111
And (4) seed sorting.
And acquiring a point pair corresponding to each of the 105 kinds of division methods.
For example, for the following two divisions of the 105 divisions:
dividing B and D into a group, dividing E and G into a group, dividing I and J into a group, and dividing K and L into a group to complete pairwise grouping of the 8 odd-degree vertexes;
and a second division method, dividing B and E into a group, dividing D and G into a group, dividing I and J into a group, and dividing K and L into a group, thereby completing pairwise grouping of the 8 odd-degree vertexes.
There are 4 corresponding point pairs of the obtained division one: b and D, E and G, I and J, K and L.
The obtained point pairs corresponding to the second component method are 4: b and E, D and G, I and J, K and L.
Step S422, it is noted that all the point pairs corresponding to each component method form a point pair combination, and the shortest paths corresponding to each point pair in the point pair combination are combined together to form a path combination, so as to obtain the path combinations with corresponding numbers.
Taking the above-mentioned division one as an example, the division one corresponding to 4 point pairs (i.e. B and D, E and G, I and J, K and L) constitutes a point pair combination, wherein in the point pair combination, the shortest path between the point pairs B and D, the shortest path between the point pairs E and G, the shortest path between the point pairs I and J, and the shortest path between the point pairs K and L are combined together to constitute a path combination.
Correspondingly, path combinations corresponding to other divisions can be obtained in the same way.
Step S43, respectively calculating the path cost of each path combination; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination.
Taking the path combination corresponding to the above-mentioned division one (hereinafter referred to as "path combination I") as an example, the path cost of the path combination I is the connection weight of the side of the shortest path between B and D + the connection weight of the side of the shortest path between E and G + the connection weight of the side of the shortest path between I and J + the connection weight of the side of the shortest path between K and L.
The path costs for other path combinations may be calculated as described above. Step S44 is then performed.
Step S44, selecting a path combination with the minimum path cost as a target path combination, and putting the shortest paths included in the target path combination together to form a target path.
According to the above step S43, the calculated path combination with the smallest path cost is: the shortest path between B and K, the shortest path between E and D, the shortest path between I and J, and the shortest path between G and L. The path combination is a target path combination. Namely, the target path combination includes: the shortest path between B and K, the shortest path between E and D, the shortest path between I and J, and the shortest path between G and L. The shortest path between B and K is the side connecting B and K, the shortest path between E and D is the side connecting E and D, the shortest path between I and J is the side connecting I and J, and the shortest path between G and L is the side connecting G and L.
After the target route is selected, the process proceeds to step S5.
Step S5: and adding a corresponding edge in the target undirected graph according to the selected target path.
Specifically, according to the selected target path, in the target undirected graph a: an edge is made between vertices B and K, an edge is made between vertices E and D, an edge is made between vertices I and J, and an edge is made between vertices G and L. At this time, in the target undirected graph a: two coincident edges are arranged between the vertexes B and K, two coincident edges are arranged between the vertexes E and D, two coincident edges are arranged between the vertexes I and J, and two coincident edges are arranged between the vertexes G and L.
It should be noted that, when there are multiple connected edges in the shortest path in the target path selected in step S4, each edge in the shortest path needs to be added to the target undirected graph a, for example, the currently selected target path includes the shortest path between odd vertices B and J, and the shortest path between odd vertices B and J includes the edge between vertices B and K and the edge between vertices K and J, when adding an edge, all the edges in the shortest path, that is, the edge between vertices B and K and the edge between vertices K and J, need to be added to the target undirected graph a.
Step S6 is then performed.
Step S6: and determining and outputting an Euler loop starting from a preset vertex in the current target undirected graph.
Based on the target undirected graph a obtained in step S5, all vertices are even vertices, and the undirected graph becomes an euler graph.
In step S6, the dijkstra algorithm is used to directly perform the euler tracing to obtain the euler loop from the preset vertex in the target undirected graph a.
It should be noted that the preset vertex may be any vertex in the target undirected graph, such as in this embodiment: the preset vertex is the vertex a in the target undirected graph a, and may be replaced with any other vertex in the target undirected graph a.
In addition, the arabic numerals "1", "3", etc. shown in fig. 3 and 4 respectively indicate the side length/weight of the corresponding side.
Example 2:
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
As shown in fig. 2, the system 200 includes:
an undirected graph creating unit 201, configured to create a target undirected graph with a vertex of each imposition picture on the target imposition as a vertex of the graph and an outline of each imposition picture on the target imposition as an edge of the graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
a vertex degree calculation unit 202, configured to calculate degrees of each vertex in the target undirected graph;
the odd vertex number counting unit 203 is used for counting the total number of odd vertices in the target undirected graph;
a judging unit 204, configured to judge whether the counted total number of odd vertices is equal to zero;
a target path calculating unit 205, configured to, when it is determined that the total number of odd-degree vertices counted is not equal to zero, find a target path that has a smallest sum of costs and changes each odd-degree vertex in the target undirected graph into an even-degree vertex;
an undirected graph edge supplementing unit 206, which adds a corresponding edge in the target undirected graph according to the target path;
an euler loop calculation unit 207, configured to calculate an euler loop starting from a preset vertex in the current target undirected graph when the undirected graph edge supplementing unit 206 completes edge supplementing or when the determination unit 204 determines that the total number of odd vertices is equal to zero;
and an output unit configured to output the euler loop calculated by the euler loop calculation unit 207.
Further, the undirected graph creating unit 201 includes:
an adjacency matrix construction module 2011 which constructs an adjacency matrix of an undirected graph and initializes the adjacency matrix to be empty;
the makeup picture information acquisition module 2012 acquires the makeup data of the target makeup and acquires the vertex information and the contour information of each makeup picture on the target makeup;
the picture traversing unit 2013 is used for traversing the makeup pictures on the makeup;
a first data adding unit 2014, configured to add the vertex of the first traversed imposition picture, the connection relationship between the vertices, and the connection weight between the vertices to the adjacency matrix;
a second data adding unit 2015, configured to add vertices, which do not coincide with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix, and update the connection relationships and connection weights of the vertices in the adjacent matrix after adding vertices, which do not coincide with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix until all imposition pictures are traversed, and record the latest adjacent matrix obtained by correspondence as a target adjacent matrix;
an undirected graph creating module 2016, configured to create an undirected graph according to the target adjacency matrix, where the undirected graph is the target undirected graph.
Optionally, the target path calculating unit 205 includes:
a shortest path calculation module 2051, configured to calculate a shortest path between every two odd-degree vertices;
a path combination module 2052, configured to combine the shortest paths obtained by the calculation to obtain path combinations of a corresponding number; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
a path cost calculation module 2053, configured to calculate the path cost of each path combination respectively; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
the target path obtaining module 2054 is configured to select a path combination with the smallest path cost as a target path combination, where each shortest path included in the target path combination constitutes a target path.
Optionally, the path combining module 2052 includes:
a vertex traversing unit 20521, configured to traverse an odd vertex of the target undirected graph;
the grouping unit 20522 is configured to group every two traversed odd-degree vertices, and obtain a point pair corresponding to each division method of all traversed odd-degree vertices;
the path combination obtaining unit 20523 records that all the point pairs corresponding to each division form a point pair combination, and combines the shortest paths corresponding to each point pair in the point pair combination to form a path combination, so as to obtain a corresponding number of path combinations.
Optionally, the euler loop calculation unit 207 calculates the euler loop starting from a preset vertex in the current target undirected graph by using a depth-first search algorithm.
Therefore, the system 200 corresponds to the method 100, and the technical effects achieved by the present embodiment can be referred to the above description, which is not repeated herein.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the description in the method embodiment.
It should be noted that, in this embodiment, details that are not described in detail, such as how to specifically determine an euler loop from a preset vertex in a target undirected graph by using a dijkstra algorithm, and the like, can be directly implemented according to the prior art, and are not described herein again.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for solving a typographic printing cutting path is characterized by comprising the following steps:
p1, taking the vertex of each imposition picture on the target imposition as the vertex of the graph, and taking the outline of each imposition picture on the target imposition as the edge of the graph, and creating a target undirected graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
p2, calculating the degrees of each vertex in the target undirected graph;
p3, counting the total number of odd-degree vertexes in the target undirected graph, and judging whether the counted total number is equal to zero, if so, executing the step P6, otherwise, continuing to execute the step P4;
p4, solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex;
p5, adding a corresponding edge in the target undirected graph according to the target path;
and P6, determining and outputting an Euler loop from a preset vertex in the current target undirected graph.
2. The method for solving the typographic cut path according to claim 1, wherein the step P1 is implemented by a method comprising the steps of:
constructing an adjacent matrix of an undirected graph and initializing the adjacent matrix into a null;
acquiring makeup data of a target makeup, and acquiring vertex information and contour information of each makeup picture on the target makeup;
adding the vertex of any imposition picture, the connection relation of the vertex and the connection weight of the vertex to the adjacency matrix; the connection weight is the side length;
traversing the next makeup picture, adding vertexes which are not coincident with the vertexes added in the adjacent matrix in the traversed makeup picture to the adjacent matrix, and then updating the connection relation and the connection weight of each vertex in the adjacent matrix; continuing traversing the next makeup picture until all the makeup pictures are traversed, and recording the latest adjacent matrix obtained correspondingly as a target adjacent matrix;
and creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
3. The method for solving the typographic cut path according to claim 1, characterized in that the implementation of step P4 comprises the steps of:
calculating and finding out the shortest path between every two odd-degree vertexes;
combining the found shortest paths to obtain path combinations with corresponding quantity; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
respectively calculating the path cost of each path combination; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
and selecting the path combination with the minimum path cost as a target path combination, wherein each shortest path in the target path combination forms a target path.
4. The method according to claim 3, wherein the combination of the shortest paths found out results in a corresponding number of combinations of paths, and the method comprises the steps of:
traversing an odd vertex of the target undirected graph;
grouping every two traversed odd-degree vertexes to obtain point pairs corresponding to various divisions;
and recording all the point pairs corresponding to each division method to form a point pair combination, and combining the shortest paths corresponding to each point pair in the point pair combination to form a path combination to obtain the path combinations with corresponding quantity.
5. The method of solving the typographic cut path according to claim 1, wherein in step P6, a euler's loop from a preset vertex in the latest target undirected graph is determined using a depth-first search algorithm.
6. A typographic cut path solution system, comprising:
the undirected graph creating unit is used for creating a target undirected graph by taking the vertex of each imposition picture on the target imposition as the vertex of the graph and the outline of each imposition picture on the target imposition as the edge of the graph; the target imposition is an imposition of a current combined printing cutting path to be solved;
the vertex degree calculating unit is used for calculating the degrees of all vertexes in the target undirected graph;
the odd degree vertex number counting unit is used for counting the total number of odd degree vertexes in the target undirected graph;
a judging unit for judging whether the counted total number of odd-degree vertexes is equal to zero;
the target path calculation unit is used for solving a target path which has the minimum sum of costs and enables each odd-degree vertex in the target undirected graph to be changed into an even-degree vertex when the total number of the counted odd-degree vertices is judged to be not equal to zero;
the undirected graph edge supplementing unit is used for adding a corresponding edge in the target undirected graph according to the target path;
the euler loop calculating unit is used for calculating an euler loop starting from a preset vertex in the current target undirected graph when the undirected graph edge supplementing unit completes edge supplementing or the judging unit judges that the total number of odd-degree vertexes is equal to zero;
and the output unit is used for outputting the Euler loop calculated by the Euler loop calculation unit.
7. The system according to claim 6, wherein the undirected graph creation unit comprises:
the adjacency matrix construction module is used for constructing an adjacency matrix of the undirected graph and initializing the adjacency matrix into a null;
the makeup picture information acquisition module is used for acquiring makeup data of the target makeup and acquiring vertex information and contour information of each makeup picture on the target makeup;
the picture traversing unit is used for traversing the makeup pictures on the makeup;
a first data adding unit, configured to add vertices, vertex connection relationships, and vertex connection weights of the first traversed imposition picture to the adjacency matrix;
a second data adding unit, configured to add vertices, which are not coincident with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix, and update the connection relationships and connection weights of the vertices in the adjacent matrix after adding vertices, which are not coincident with the vertices added in the adjacent matrix, in the next traversed imposition picture to the adjacent matrix, until all imposition pictures are traversed, and mark the latest adjacent matrix obtained by correspondence as a target adjacent matrix;
and the undirected graph creating module is used for creating an undirected graph according to the target adjacency matrix, wherein the undirected graph is the target undirected graph.
8. The system according to claim 6, wherein the object path calculating unit comprises:
the shortest path calculation module is used for calculating the shortest path between every two odd-degree vertexes;
the path combination module is used for combining the shortest paths obtained by calculation to obtain path combinations with corresponding quantity; wherein, the vertex of the end of each shortest path is taken as an end vertex, for each path combination, the end vertices contained in the combination are different, and the end vertices contained in the combination are formed by all odd-degree vertices of the target undirected graph;
the path cost calculation module is used for calculating the path cost of each path combination respectively; the path cost is the sum of the connection weights of the edges of each shortest path in the path combination;
and the target path acquisition module is used for selecting the path combination with the minimum path cost as the target path combination, and each shortest path contained in the target path combination forms a target path.
9. The system of claim 8, wherein the path combining module comprises:
the vertex traversing unit is used for traversing the odd-degree vertex of the target undirected graph;
the grouping unit is used for grouping every two traversed odd-degree vertexes to obtain a point pair corresponding to each division method of the traversed odd-degree vertexes;
and the path combination acquisition unit records that all the point pairs corresponding to each division form a point pair combination, and combines the shortest paths corresponding to each point pair in the point pair combination together to form a path combination to obtain the path combinations with corresponding quantity.
10. The system according to claim 6, wherein the euler loop calculation unit calculates the euler loop starting from a preset vertex in the current target undirected graph by using a depth-first search algorithm.
CN202010053797.7A 2020-01-17 2020-01-17 Method and system for solving cutting path of closed printing Pending CN111260135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010053797.7A CN111260135A (en) 2020-01-17 2020-01-17 Method and system for solving cutting path of closed printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010053797.7A CN111260135A (en) 2020-01-17 2020-01-17 Method and system for solving cutting path of closed printing

Publications (1)

Publication Number Publication Date
CN111260135A true CN111260135A (en) 2020-06-09

Family

ID=70947585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010053797.7A Pending CN111260135A (en) 2020-01-17 2020-01-17 Method and system for solving cutting path of closed printing

Country Status (1)

Country Link
CN (1) CN111260135A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468382A (en) * 2021-07-01 2021-10-01 同盾控股有限公司 Multi-party loop detection method, device and related equipment based on knowledge federation
CN114066103A (en) * 2021-12-15 2022-02-18 广东工业大学 Cutting path planning method and system for two-dimensional irregular part layout drawing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115566A1 (en) * 2001-08-23 2003-06-19 Steven Teig Method and apparatus for pre-computing routes
CN110134064A (en) * 2019-05-28 2019-08-16 广东三维家信息科技有限公司 Machining path optimization and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115566A1 (en) * 2001-08-23 2003-06-19 Steven Teig Method and apparatus for pre-computing routes
CN110134064A (en) * 2019-05-28 2019-08-16 广东三维家信息科技有限公司 Machining path optimization and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘会霞等: "共边排样件激光切割路径的规划", 《中国激光》 *
吕亚军: "钣金激光切割工艺优化方法及应用研究", 《中国优秀硕士学位论文全文数据库工程科技I辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468382A (en) * 2021-07-01 2021-10-01 同盾控股有限公司 Multi-party loop detection method, device and related equipment based on knowledge federation
CN113468382B (en) * 2021-07-01 2024-04-02 同盾控股有限公司 Knowledge federation-based multiparty loop detection method, device and related equipment
CN114066103A (en) * 2021-12-15 2022-02-18 广东工业大学 Cutting path planning method and system for two-dimensional irregular part layout drawing

Similar Documents

Publication Publication Date Title
Di Battista et al. Spirality and optimal orthogonal drawings
CN111260135A (en) Method and system for solving cutting path of closed printing
CN107440810A (en) Tooth type determining program, tooth type position judgment device and its method
Brualdi et al. Aztec diamonds and digraphs, and Hankel determinants of Schröder numbers
Cardinal et al. A note on flips in diagonal rectangulations
Forcey et al. Geometric combinatorial algebras: cyclohedron and simplex
Chang et al. A fast algorithm for the restoration of images based on chain codes description and its applications
CN110276348B (en) Image positioning method, device, server and storage medium
CN105894586B (en) A kind of unilateral page extraction of three-dimensional books model
CN105224748B (en) A kind of section preprocess method of non-uniform beam finite element model
Adeniran et al. Pattern avoidance in parking functions
CN112464351A (en) Track line processing method, device, processing equipment and medium
CN113538497A (en) Tubular structure rapid tracking method based on curvature regularization perception grouping
Brandenburg T-shape visibility representations of 1-planar graphs
Bygi et al. 3D visibility graph
van Rensburg et al. BFACF-style algorithms for polygons in the body-centered and face-centered cubic lattices
Li et al. Finding the shortest path between two points in a simple polygon by applying a rubberband algorithm
Even et al. Grid layouts of block diagrams—bounding the number of bends in each connection
Venkat et al. A Succinct, Dynamic Data Structure for Proximity Queries on Point Sets.
Ramesh et al. Convex Hull-Parallel and Distributed Algorithms
RU2364940C1 (en) Way of hachures arrangement on contour sheet, computer way of recognition of parts of horizontals which are passing through areas with small biases on contour sheet, and computer way of recognition of minimum outlines made by horizontals and frame of contour sheet
Dutt et al. On finding a shortest isothetic path and its monotonicity inside a digital object
Rodrıguez et al. Fast neighborhood operations for images and volume data sets
Gómez et al. Nice perspective projections
JP3109585B2 (en) Method and apparatus for generating three-dimensional object data, and recording medium storing program for generating three-dimensional object data

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200609

RJ01 Rejection of invention patent application after publication