Graph drawing method and device based on path optimization, and storage medium
By dividing the vector graphic data of laser processing equipment into blocks and using the ant colony algorithm to optimize the path, the quality problems caused by sharp turns in laser processing are solved, and the accuracy of graphic drawing and the yield rate of finished products are improved.
Patent Information
- Application Number
- CN202511678181.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-17
AI Technical Summary
Existing laser processing equipment, due to its path optimization being entirely based on geometric distance, results in numerous sharp turns and acute-angle paths, leading to quality problems such as material overheating and contour deformation.
By dividing vector graphics data into multiple blocks, determining the processing sequence based on direction weights and centroid distance, and using the ant colony algorithm to optimize the path with the goal of minimizing energy consumption, a processing path that comprehensively considers cutting direction and heat accumulation is generated.
It effectively suppressed local energy concentration, improved the accuracy of graphic drawing and the yield rate of finished products, and realized the technological transformation from pursuing efficiency to taking into account both quality and thermal management.
Smart Images

Figure CN121143361B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laser processing, and particularly relates to a pattern drawing method based on path optimization, a device and a storage medium. BACKGROUND
[0002] In the related art, a laser processing device can perform laser pattern drawing on a processing material based on a vector diagram input by a user. In order to reduce idle strokes and ensure the efficiency of processing, the laser processing device usually combines an intelligent path optimization algorithm, such as a grid method, a genetic algorithm, etc., to optimize the path based on the shortest geometric distance.
[0003] However, since the path optimization algorithm is optimized based on the geometric distance, a large number of sharp turns and acute angle paths are often generated. In actual processing, the sharp turns cause the laser head to frequently accelerate and decelerate at the turning corners, resulting in energy accumulation in the turning corner area, which causes quality problems such as overburning of the material and deformation of the profile, and affects the quality of laser pattern drawing.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a pattern drawing method based on path optimization, a device and a storage medium, which aims to solve the technical problem that laser pattern drawing is prone to cause overburning of the turning corners.
[0006] To achieve the above purpose, the present application provides a pattern drawing method based on path optimization, which comprises the following steps:
[0007] Obtaining vector pattern data and dividing the vector pattern data into at least two blocks based on a preset height value;
[0008] Obtaining a direction weight and a centroid distance of a pattern element in the block, and determining a processing sequence of the pattern element based on the direction weight and the centroid distance;
[0009] Solving an optimized path of the block based on the processing sequence by an ant colony algorithm with minimum energy consumption as an optimization target;
[0010] Integrating the optimized path to generate a processing path, and controlling a laser processing device to perform a pattern drawing action on a material to be processed based on the processing path.
[0011] In an embodiment, the step of solving the optimized path of the block based on the processing sequence by the ant colony algorithm with the minimum energy consumption as the optimization target comprises:
[0012] extract feature points of the graphic elements in the block to form a feature point set;
[0013] construct a weighted complete graph with the feature points as vertices based on the feature point set, and calculate edge weight values of edges of the weighted complete graph;
[0014] take minimum energy consumption as an optimization objective, and solve a shortest Hamilton path of the weighted complete graph based on the edge weight values through the ant colony algorithm to obtain a locally optimized path;
[0015] generate the optimized path based on the processing sequence and the locally optimized path.
[0016] In an embodiment, the step of generating the optimized path based on the processing sequence and the locally optimized path comprises:
[0017] determine an entry point, an exit point and a cutting direction angle of the graphic element based on the locally optimized path;
[0018] obtain material attribute information of the material to be processed, and calculate an entry line and an exit line of the graphic element based on the entry point, the exit point and / or the cutting direction angle through an entry line calculation model and an exit line calculation model;
[0019] generate the optimized path in combination with the locally optimized path, the entry line and / or the exit line.
[0020] In an embodiment, the step of integrating the optimized path to generate a processing path and controlling a laser processing device to perform a graphic drawing action of the material to be processed based on the processing path further comprises:
[0021] obtain temperature field information of a processing area based on material state information of the material to be processed;
[0022] adjust length information and / or entry angle of the entry line and / or the exit line according to the temperature field information, and update the optimized path;
[0023] control the laser processing device to perform the graphic drawing action based on the updated optimized path.
[0024] In an embodiment, the step of obtaining a direction weight and a centroid distance of a graphic element in the block and determining a processing sequence of the graphic element based on the direction weight and the centroid distance comprises:
[0025] obtain the direction weight;
[0026] calculating a centroid coordinate of the graphic element, and calculating the centroid distance from the centroid coordinate of the graphic element to a reference point which is a geometric center of the block;
[0027] combining the direction weight and the centroid distance, and sorting the graphic element based on a preset rule to generate the processing sequence.
[0028] In an embodiment, before the step of obtaining the vector graphic data and dividing the vector graphic data into at least two blocks based on a preset height value, the method further comprises:
[0029] performing structural analysis on the target graphic data to extract contour line segments, feature point coordinates and / or topological relationships of the target graphic data to form structured data to be verified;
[0030] based on the structured data, identifying line segment abnormal information of the target graphic data through geometric continuity detection and / or correlation check of the graphic;
[0031] if the line segment abnormal information does not exist, taking the target graphic data as the vector graphic data to perform the step of obtaining the vector graphic data and dividing the vector graphic data into at least two blocks based on a preset height value.
[0032] In an embodiment, after the step of identifying the line segment abnormal information of the target graphic data based on the structured data through geometric continuity detection and / or correlation check of the graphic, the method further comprises:
[0033] if the line segment abnormal information exists, classifying and marking the line segment abnormal information to determine an abnormal type and an influence range;
[0034] determining a corresponding abnormal data processing algorithm according to the abnormal type;
[0035] performing fault-tolerant processing on the target graphic data based on the influence range through the abnormal data processing algorithm to generate the vector graphic data;
[0036] performing the step of obtaining the vector graphic data and dividing the vector graphic data into at least two blocks based on a preset height value.
[0037] In an embodiment, the step of integrating the optimized path to generate a processing path and controlling a laser processing device to perform a graphic drawing action of a material to be processed based on the processing path further comprises:
[0038] converting the processing path into control code corresponding to a motion controller of the laser processing device;
[0039] acquire real-time position data of the laser head through an encoder when the laser processing device performs the graphic drawing action;
[0040] calculate a deviation value of the real-time position data and target position data in the processing path;
[0041] based on the deviation value, calculate a control amount by using a preset control algorithm, and transmit the control amount to the motion controller to adjust the motion state of the laser head.
[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a graphic drawing device based on path optimization, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the graphic drawing method based on path optimization as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the graphic drawing method based on path optimization as described above.
[0044] The one or more technical solutions provided by the present application have at least the following technical effects:
[0045] By adopting the path planning strategy with the optimization target of minimum energy consumption, the present application divides the vector graphic data into multiple blocks, and determines a reasonable processing sequence based on the direction weight and the centroid distance of the graphic elements, thereby avoiding the intensive movement of the laser head in a single area in a macroscopic manner. The ant colony algorithm is used to optimize and solve the processing sequence with the target of minimum energy consumption, so that the finally generated processing path not only considers the geometric distance, but also comprehensively balances the key factors such as cutting turning, idle stroke distribution and the like which affect the accumulation of thermal energy, thereby essentially inhibiting the local energy concentration, realizing the technical transformation from simply pursuing the processing efficiency to considering the processing quality and thermal management, and improving the precision and the product qualification rate of graphic drawing. BRIEF DESCRIPTION OF DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced here. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0048] Figure 1Flowchart of a first embodiment of the path-optimization-based graphics rendering method of the present application;
[0049] Figure 2 Flowchart of a second embodiment of the path-optimization-based graphics rendering method of the present application;
[0050] Figure 3 Flowchart of a third embodiment of the path-optimization-based graphics rendering method of the present application;
[0051] Figure 4 Flowchart of a fourth embodiment of the path-optimization-based graphics rendering method of the present application;
[0052] Figure 5 Flowchart of a fifth embodiment of the path-optimization-based graphics rendering method of the present application;
[0053] Figure 6 Structure diagram of a path-optimization-based graphics rendering device of the hardware running environment involved in the embodiments of the present application.
[0054] The implementation, functional features and advantages of the present application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein merely serve to explain the present application and do not limit the present application.
[0056] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0057] The main solution of the embodiments of the present application is: obtaining vector graphics data, dividing the vector graphics data into at least two blocks based on a preset height value, obtaining a direction weight and a centroid distance of a graphic element in the block, determining a processing sequence of the graphic element based on the direction weight and the centroid distance, solving an optimized path of the block based on the processing sequence by using an ant colony algorithm with minimum energy consumption as an optimization objective, integrating the optimized path to generate a processing path, and controlling a laser processing device to perform a graphics rendering action of a material to be processed based on the processing path.
[0058] In the prior art, a laser processing device can perform laser pattern drawing on a processing material based on a user-input vector diagram. To reduce idle travel and ensure processing efficiency, the laser processing device usually combines an intelligent path optimization algorithm, such as a grid method or a genetic algorithm, to optimize the path based on the shortest geometric distance. However, because the path optimization algorithm is optimized based on the geometric distance, a large number of sharp turns and acute angle paths are often generated. In actual processing, the sharp turns cause the laser head to frequently accelerate and decelerate at the turning corners, resulting in energy accumulation in the corner area, which causes quality problems such as material overburning and profile deformation, and affects the quality of laser pattern drawing.
[0059] The present application divides the vector pattern data into multiple blocks by adopting a path planning strategy with the minimum energy consumption as the optimization target, determines a reasonable processing sequence based on the direction weight and the centroid distance of the pattern elements, thereby avoiding the dense movement of the laser head in a single area on a macro level, and optimizes and solves the processing sequence by the ant colony algorithm with the minimum energy consumption as the target, so that the finally generated processing path not only considers the geometric distance, but also comprehensively balances the key factors affecting heat energy accumulation such as cutting turning and idle travel distribution, essentially suppresses local energy concentration, realizes the technical change from simply pursuing processing efficiency to considering processing quality and heat management, and improves the precision and product qualification rate of pattern drawing.
[0060] In order to better understand the above technical solutions, the exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0061] It should be noted that the execution subject of the present embodiment can be a laser processing device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a pattern drawing device based on path optimization, etc., which is not specifically limited in the present embodiment. The present embodiment and the following embodiments will be described below with the laser processing device as an example.
[0062] Based on this, the present embodiment provides a pattern drawing method based on path optimization, which will be described below with reference to Figure 1 , Figure 1 The flowchart of the first embodiment of the pattern drawing method based on path optimization of the present application is shown in FIG. 1.
[0063] In the present embodiment, the pattern drawing method based on path optimization includes steps S10-S40:
[0064] Step S10: Obtain vector graphics data, and divide the vector graphics data into at least two blocks based on a preset height value;
[0065] In this embodiment, the vector graphics data of the to-be-processed graphics is obtained by the control system of the laser numerical control cutting device. The data is derived from a standard vector format file output by a professional graphics design software or is input by a user based on a standard file format and contains complete contour information and geometric parameters of the graphics. According to the overall height of the graphics and the optimal processing area range of the device, a preset height value is set, and the overall vector graphics data is divided into at least two independent blocks along the vertical direction based on the preset height value. Each block contains complete local graphic elements, and the subsequent path optimization can be efficiently performed for a single block.
[0066] Specifically, the control system establishes a connection with the graphics design software through an Ethernet or USB data interface, receives vector graphics data stored in a DXF or SVG format, and the data contains contour line segment coordinates of the graphics, geometric parameters of feature points such as line segment endpoints and corner points, and layer information to which the graphics belongs. After receiving, the control system performs preliminary analysis on the vector graphics data, extracts the overall height parameter of the graphics, that is, the maximum size range of the graphics in the vertical direction. In combination with the effective movement range of the laser head during single processing of the laser cutting device and the data processing capacity, a preset height value is set, which is usually less than or equal to the optimal height range of single processing of the device, so as to ensure that the data amount in a single block can be processed in real time by the device. Then, the vector graphics data is divided along the vertical direction from bottom to top or from top to bottom according to the preset height value, forming at least two blocks. Each block retains the contour line segments, feature points and layer information of the graphics in the corresponding height range, and these block data are stored in the partition cache of the control system respectively, each partition cache corresponding to a block, avoiding interference between different block data, and laying a foundation for the subsequent path optimization step for each block.
[0067] Optionally, the laser processing device sorts all the layers in ascending order of layer creation time by extracting the layer information in the vector graphics data, determines the processing sequence of the layers, measures the overall height of the sorted vector graphics, calculates the number of blocks to be divided according to the preset single-block height value, and divides the vector graphics into blocks of the corresponding number along the vertical direction, each block having a height of the preset single-block height value, to complete the block division of the vector graphics data.
[0068] Step S20: Obtain a direction weight and a centroid distance of a graphic element in a block, and determine a processing sequence of the graphic element based on the direction weight and the centroid distance;
[0069] In the embodiment, for each divided block, the control system first analyzes the distribution characteristics of the graphic elements in the block, determines the direction weight for measuring the processing priority in the horizontal and vertical directions, calculates the centroid coordinates of each graphic element, and obtains the centroid distance of each graphic element with the geometric center of the block as the reference point. The graphic elements in the block are sorted according to the comprehensive analysis results of the direction weight and the centroid distance, the final processing sequence is determined, and the moving path of the laser head in the processing process is ensured to be shorter and the energy consumption is lower.
[0070] Specifically, the control system obtains the direction weight, which can be calculated based on the vector graphic data or obtained by acquiring the preset direction weight corresponding to the vector graphic data. The centroid coordinates of the graphic elements are calculated, and the centroid distance of the centroid coordinates of the graphic elements to the reference point is calculated with the geometric center of the block as the reference point. The graphic elements are sorted based on the preset rule according to the direction weight and the centroid distance, and the processing sequence of the graphic elements is generated.
[0071] As an optional implementation, the control system traverses the graphic elements in the block and counts the distribution density of the graphic elements in the horizontal and vertical directions, i.e. the number of graphic elements contained in a unit length. If the statistical result shows that the distribution density of the graphic elements in the horizontal direction is higher than that in the vertical direction, it means that the laser head can reduce frequent turning and improve processing efficiency when moving in the horizontal direction, so the horizontal direction weight is set to be higher than the vertical direction weight, for example, the horizontal direction weight is set to 0.6 and the vertical direction weight is set to 0.4. If the vertical direction has a higher distribution density, the vertical direction weight is set to be higher. The centroid coordinates of each graphic element are obtained by geometric calculation. For regular graphics such as circles and rectangles, the centroid can be directly calculated according to the geometric parameters of the graphics, for example, the centroid of a rectangle is the intersection point of the diagonals, and the centroid of a circle is the center. For irregular graphics, the graphics are decomposed into multiple small rectangles or triangles through discretization processing, the centroid of each small unit is calculated, and then the centroid coordinates of the overall graphic element are obtained by area weighted average. The geometric center of the block is determined, which is the midpoint coordinates of the block in the horizontal and vertical directions. The straight line distance from the centroid coordinates of each graphic element to the geometric center of the block is calculated, i.e. the centroid distance. The graphic elements are sorted according to the rule of direction weight priority and centroid distance assistance, for example, in the case of higher horizontal direction weight, the adjacent graphic elements in the horizontal direction are preferentially classified as continuous processing objects, and at the same time, the centroid distance is combined in the order from small to large, so that the laser head preferentially processes the graphic elements close to the center of the block, reduces the cross-region movement, and finally forms a complete processing sequence.
[0072] For example, the control system can sort the graphic elements in each block according to the direction weight based on a cost model.
[0073]
[0074] wherein ω = 1 indicates horizontal priority and ω = 0 indicates vertical priority. d represents a certain path-related comprehensive metric value, which can be generally understood as a comprehensive cost, length or other indicators related to horizontal and vertical direction movement, used to measure the pros and cons of the path in path planning and other scenarios. ω represents the direction weight, with a value range of 0 to 1. When ω = 1, the weight of the horizontal direction is the largest, and the path planning gives priority to horizontal movement. When ω = 0, the weight of the vertical direction is the largest, and the path planning gives priority to vertical movement. n represents the number of segments on the path, that is, the number of small sections into which the entire path is divided. i is the absolute value of the movement distance of the i-th segment of the path in the horizontal direction, that is, the x-axis direction, which reflects the span of the small section of the path in the horizontal direction. i is the absolute value of the movement distance of the i-th segment of the path in the vertical direction, that is, the y-axis direction, which reflects the span of the small section of the path in the vertical direction.
[0075] As another optional implementation, if the distribution density of the graphic elements in the block in the horizontal and vertical directions is similar and it is difficult to distinguish the priority, the horizontal direction weight and the vertical direction weight are set to be equal, both being 0.5, and at this time the determination of the processing sequence mainly depends on the centroid distance. The centroid coordinates of each graphic element and the geometric center of the block are calculated to obtain the centroid distance, and the graphic elements are sorted in order from small to large centroid distance. The smaller the centroid distance, the closer the graphic element is to the center of the block. Prior processing of these graphic elements can make the laser head move gradually from the block center to the edge, avoiding repeated back and forth between the block edge and the center, and reducing invalid movement. In the sorting process, if the centroid distances of two graphic elements are similar, the outline size of the graphic element can be further referred to, and the graphic element with smaller outline is preferentially processed, because the cutting time of the smaller graphic element is shorter, and early processing can reduce the interference to the processed area in the subsequent processing process. For example, there is a small circle with a centroid distance of 8 mm and a large rectangle with a centroid distance of 9 mm in the block, and the small circle can be preferentially processed, and then the large rectangle is processed, to finally form a reasonable processing sequence.
[0076] Step S30: solving the optimized path of the block based on the processing sequence by using the ant colony algorithm with the minimum energy consumption as the optimization target;
[0077] In the embodiment, the processing sequence determined for each block is that the control system extracts feature points of all graphic elements in the block to form a feature point set, constructs a weighted complete graph with the feature points as vertices, sets edge weights according to the convex and concave characteristics of the graphic contour, takes the processing sequence as a constraint condition, takes the minimum energy consumption as a target, runs an ant colony algorithm to solve the shortest Hamilton path passing through all feature points, and then combines the dynamically generated introduction and exit lines to integrate the optimized path of the block, so as to ensure that the path has the lowest energy consumption and the cutting quality meets the standard.
[0078] Specifically, the laser processing device extracts feature points of graphic elements in the block to form a feature point set, constructs a weighted complete graph with the feature points as vertices based on the feature point set, calculates edge weights of edges of the weighted complete graph, takes the minimum energy consumption as an optimization target, solves the shortest Hamilton path of the weighted complete graph according to the edge weights through the ant colony algorithm, obtains a local optimized path, and generates an optimized path based on the processing sequence and the local optimized path. Wherein, the control system traverses the contour of each graphic element in the block, extracts feature points, the feature points include key geometric nodes such as line segment endpoints, corner points, and start and end points of circular arcs of the graphic elements, for example, four corner points of a rectangle, four endpoints of a circle, three vertices of a triangle, etc., sequentially numbers these feature points to form a feature point set P = {p1, p2, …, pn}, where n is the number of feature points. Each feature point in the feature point set is taken as a vertex, and an edge is connected between any two vertices to form a complete graph G = (P, E), where E is a set of all edges, and the weight w n of each edge is calculated. ij Wherein, the Hamilton path is a path passing through all vertices and only once.
[0079] Optionally, the calculation method is “edge weight = Euclidean distance between two feature points × coefficient k”, wherein the coefficient k is determined according to the convex and concave characteristics of the contour between the two feature points. For example, if the contour between the two feature points is a convex edge, it means that the moving direction of the laser head changes little during cutting of the contour, and the energy consumption is low, so k = 0.8 is set, and if it is a concave edge, the laser head needs to turn during cutting of the contour, and the energy consumption is high, so k = 1.2 is set. Different coefficients are used to distinguish the energy consumption difference between convex and concave edges, so as to ensure that the weight value can reflect the actual energy consumption. Optionally, the laser processing device can calculate the coefficient k according to the concave and convex characteristics of the edge between the two feature points based on a preset calculation formula and / or a mapping relationship.
[0080] Further, the determined processing sequence is input into the ant colony algorithm as a constraint condition. For example, the processing sequence is "figure A => figure B => figure C", and the algorithm needs to ensure that the path first passes through the feature point of figure A, then passes through the feature point of figure B, and finally passes through the feature point of figure C. Meanwhile, the optimization goal of the algorithm is set as the minimum energy consumption, that is, the Hamilton path with the minimum total weight in the weighted complete graph is solved. In the process of algorithm running, the number of ants and the concentration of pheromone are initialized, the ants select the next feature point according to the concentration of pheromone on the path, and after completing a traversal, the concentration of pheromone is updated according to the total weight of the path. The smaller the weight of the path, the higher the concentration of pheromone, and the greater the probability of subsequent ants selecting the path. After multiple iterations, the algorithm converges, and the path with the minimum total weight, that is, the shortest Hamilton path, is obtained. Finally, the lead-in and lead-out lines are dynamically generated for each figure element, the lead-in line is cut into the first feature point of the figure element from the non-processing area, the lead-out line is cut out from the last feature point of the figure element to the non-processing area, the lead-in and lead-out lines are integrated with the shortest Hamilton path, and the optimized path of the block is formed.
[0081] For example, the control system solves the objective function:
[0082]
[0083] The ant colony algorithm is used to solve the shortest Hamilton path. Wherein, k m is a mechanical loss coefficient, which is used to quantify the mechanical energy loss in the movement of the laser head, such as transmission friction, equipment vibration, etc. The value is consistent with the edge weight coefficient, that is, the mechanical loss of the convex edge path is small, k m takes a smaller value, such as 0.8, and the mechanical loss of the concave edge path is large due to turning, k m takes a larger value, such as 1.2. Ti represents the output torque of the laser head driving motor in the ith path, which is directly related to the convexity and concavity of the path. The laser head moves at a constant speed on the convex edge path, and the torque T i is small, and the concave edge path needs to slow down and turn, and the torque T i increases. Δt i represents the processing time of the ith path, that is, the time consumed by the laser head from moving from the feature point p i to p i+1 , which is positively related to the Euclidean distance ||p i -p j || between the two points. The longer the distance, the larger the Δt i . I is the rotational inertia of the laser head driving system, which is a device inherent parameter reflecting the energy inertia when the system starts or brakes. The larger the inertia, the higher the energy consumption when the path turns. ω i represents the angular velocity of the driving motor in the ith path, which is directly related to the moving speed of the laser head. The speed is stable on the convex edge path, and the angular velocity ω iLarger, concave path needs to slow down, angular velocity ω i Smaller.
[0084] Step S40: integrate the optimized paths, generate the machining path, and control the laser processing equipment to perform the graphic drawing action of the material to be processed based on the machining path.
[0085] In this embodiment, the laser processing equipment integrates all the optimized paths of the blocks by the control system, plans a transition path between adjacent blocks, forms an overall machining path, and converts the overall machining path into control codes recognizable by the motion controller of the laser processing equipment. The motion controller receives the control codes and drives the laser head to move along the path.
[0086] Specifically, the device integrates the optimized paths, and the control system reads the optimized path data of each block, including the start point, end point coordinates of the path, and the moving sequence of the intermediate feature points. For two adjacent blocks, the end point coordinates of the optimized path of the former block and the start point coordinates of the optimized path of the latter block are calculated, and a smooth transition path is planned, which needs to avoid the processed area and be as short as possible to reduce the idle stroke. For example, the end point of the optimized path of the former block is (100, 150), and the start point of the optimized path of the latter block is (100, 200), then the transition path can be set to move vertically from (100, 150) to (100, 200) to avoid detours. The optimized paths of all blocks and the transition paths of adjacent blocks are connected in turn to form an overall machining path that covers the entire graphic to be processed, which includes a complete trajectory from the start point of the lead-in line of the first block to the end point of the lead-out line of the last block.
[0087] Further, the laser processing equipment then performs control code conversion, and the control system converts the coordinate data of the overall machining path and motion parameters such as moving speed and laser power into G codes recognizable by the motion controller of the laser processing equipment. The G codes contain moving instructions of the laser head, such as G01 for straight-line interpolation movement, laser switch instructions, such as M03 for laser turning on, and parameter setting instructions, such as F1000 for moving speed. During the conversion process, it is necessary to ensure that the format of the G code conforms to the protocol requirements of the motion controller, such as using RS-232 protocol or Ethernet protocol to transmit the G code. After the motion controller receives the G code, it drives the servo motor of the laser head to operate according to the instructions, so that the laser head moves along the machining path, and at the same time controls the laser generator to output laser to cut the material to be processed.
[0088] It should be noted that G code (also known as G instruction) is a programming language used by numerical control machine tools and 3D printing equipment to control machining trajectories through G00 fast positioning, G01 straight-line interpolation, etc.
[0089] The path planning strategy with the optimization target of minimum energy consumption is adopted in the embodiments of the present application, the vector graphic data is divided into multiple blocks, and a reasonable processing sequence is determined based on the direction weight and the centroid distance of the graphic element, so that the dense movement of the laser head in a single area is avoided in a macroscopic manner. The ant colony algorithm is used to optimize and solve the processing sequence with the target of minimum energy consumption, so that the finally generated processing path not only considers the geometric distance, but also comprehensively balances the key factors such as cutting turning, idle stroke distribution and the like affecting heat energy accumulation, and the local energy concentration is essentially inhibited, the technical transformation from simply pursuing processing efficiency to considering processing quality and heat management is realized, and the precision and the product qualification rate of graphic drawing are improved.
[0090] Based on the same inventive concept, the present application also provides a second embodiment of the graphic drawing method based on path optimization. Figure 2 , Figure 2 The flowchart of the second embodiment of the graphic drawing method based on path optimization of the present application is shown in FIG. 2.
[0091] In the present embodiment, the optimization path of the block based on the processing sequence is solved by the ant colony algorithm with the optimization target of minimum energy consumption as shown in step S30, and further includes steps S31-S33:
[0092] Step S31: determining the entry point, exit point and cutting direction angle of the graphic element based on the local optimization path;
[0093] Step S32: obtaining the material attribute information of the material to be processed, and calculating the lead-in line and lead-out line of the graphic element according to the entry point, exit point and / or cutting direction angle by introducing the lead-in line calculation model and lead-out line calculation model;
[0094] Step S33: generating the optimization path in combination with the local optimization path, lead-in line and / or lead-out line.
[0095] It should be noted that the lead-in line refers to the transition path between the initial position and the formal processing starting point after the light beam reaches the processing area through the idle stroke during laser cutting or engraving. Its core function is to avoid the situation of irregular cracking of the material edge caused by direct cutting into the material, and to avoid the accumulation of heat. The lead-out line refers to the path of the laser from the end point to the safe position after the processing is completed. Its main function is to prevent the material from hanging slag or burrs on the back surface caused by the sudden stop of the laser. The laser processing equipment also plans the processing path to add lead-in lines and lead-out lines for the processing of different graphic elements in the path, so as to improve the drawing effect of laser drawing.
[0096] In the embodiment, the cut-in point and the cut-out point are the start point and the end point of the graphic element drawing path respectively, and the cutting direction angle is the inclination angle of the laser beam relative to the workpiece surface during the cutting process. The control system can also calculate the lead-in line and the lead-out line by introducing a lead-in line calculation model and a lead-out line calculation model, in combination with the material attribute information of the material to be processed, such as size, hardness, melting point, and the cut-in point, the cut-out point and / or the cutting direction angle.
[0097] As an optional implementation, the lead-in line acquires the attribute information of the material to be processed through the material information acquisition module of the laser processing equipment, which at least includes three core parameters of the material, such as thermal conductivity, melting point and mechanical strength. These parameters are directly used as input conditions of the lead-in line calculation model and the lead-out line calculation model. When the lead-in line calculation model is called, the cut-in point coordinates, the cutting direction angle and the material attribute information are input into the model. The model matches the start point coordinates and the cut-in angle of the lead-in line by the material thermal conductivity, the lead-in line length adaptation rule and the cutting direction angle and the lead-in line extension direction rule. When the lead-out line calculation model is called, the cut-out point coordinates, the travel direction angle of the local optimization path at the cut-out point and the material attribute information are input into the model. The model matches the end point coordinates and the cut-out angle of the lead-out line by the material mechanical strength, the lead-out line length adaptation rule and the cut-out point contour curvature and the lead-out line extension direction rule. The lead-in line parameter set and the lead-out line parameter set are formed.
[0098] Further, the device performs a path integration operation to splice the trajectory of the lead-in line at the start end of the local optimization path and splice the trajectory of the lead-out line at the end of the local optimization path, with the trajectory order of the local optimization path as the core. In the splicing process, the trajectory smoothness detection algorithm is used to verify whether there is a direction mutation in the connection section of the lead-in line and the local optimization path and the local optimization path and the lead-out line. If there is a mutation, the geometric parameters of the connection section are adjusted by the path interpolation algorithm to ensure the continuity of the overall trajectory. After the integration is completed, the complete optimization path is generated.
[0099] For example, the initial extension direction of the lead-in line and the lead-out line is determined according to the material state information, and the extension length of the lead-in line and the lead-out line is adjusted in combination with the temperature field information. If the temperature field information shows that the temperature of the processing area is higher than the preset reference value, the extension length of the lead-in line and the lead-out line is increased. If the temperature field information shows that the temperature of the processing area is lower than or equal to the preset reference value, the initial extension length of the lead-in line and the lead-out line is maintained. The adjusted lead-in line, the lead-out line and the local optimization path of the corresponding block are integrated to form a local optimization path containing the lead-in and lead-out lines. All local optimization paths containing the lead-in and lead-out lines are integrated to generate an overall processing path. The laser processing equipment is controlled to perform a graphic drawing action based on the overall processing path.
[0100] As another optional implementation, in the process of generating a locally optimized path by an ant colony algorithm, a reference parameter pre-design link is synchronously embedded, that is, the cut-in point, the cut-out point and the cutting direction angle are taken as constraint conditions in the optimization target of the ant colony algorithm when a complete graph with weights is constructed and a shortest Hamilton path is solved, rather than being separately determined after the locally optimized path is generated. Among them, the nodes with non-interference extension potential in the feature point set, such as the non-curvature mutation nodes of the graphic element contour, are marked as candidate cut-in points / cut-out points, and a weight factor for the candidate node priority selection is added to the fitness function of the ant colony algorithm, so as to ensure that the start end of the locally optimized path contains the candidate cut-in point and the end contains the candidate cut-out point, and at the same time, the travel direction vector of the path at the candidate cut-in point is calculated in real time during the path solving process, and the cutting direction angle is synchronously output.
[0101] Secondly, after obtaining the attribute information of the material to be processed, the parameter linkage calculation mode is called to call the lead-in line calculation model and the lead-out line calculation model. After receiving the cut-in point, the cutting direction angle and the material attribute information, the lead-in line calculation model not only outputs the basic parameters of the lead-in line, but also generates a linkage relationship table of the lead-in line parameters and the locally optimized path parameters, which indicates that the deviation of the extension direction of the lead-in line from the direction of the locally optimized path at the cut-in point needs to be controlled within a preset range. The lead-out line calculation model also generates a linkage relationship table while outputting the basic parameters of the lead-out line, which indicates that the deviation of the direction of the lead-out line from the direction of the locally optimized path at the cut-out point needs to meet the requirements. Through the linkage relationship table, the parameter logic of the lead-in line, the lead-out line and the locally optimized path is ensured to be consistent, and direction conflicts in subsequent integration are avoided.
[0102] Further, the device performs path integration and verification integrated operation, first splices the trajectory in the order of the lead-in line, the locally optimized path and the lead-out line, and then checks whether the direction and angle parameters of each path segment meet the preset logic according to the linkage relationship table through the parameter consistency verification algorithm. If the verification is passed, it is directly determined as an optimized path. If the verification finds parameter conflicts, such as the deviation of the lead-in line direction from the cutting direction angle exceeding the range, the model feedback adjustment mechanism is triggered, and the conflict parameters are input into the lead-in line calculation model in reverse, and the model automatically corrects the lead-in line parameters according to the parameters of the locally optimized path until the conflict is eliminated.
[0103] Optionally, the laser processing device can also adjust the lead-in line and the lead-out line in real time during the processing based on the material state information of the material to be processed. The temperature field information of the processing area is obtained, the length information and / or the cut-in angle of the lead-in line and / or the lead-out line are adjusted according to the temperature field information, and the optimized path is updated. Based on the updated optimized path, the laser processing device is controlled to perform the graphic drawing action. The lead-in line and the lead-out line are adjusted in real time according to the processing state, and the processing action is performed based on the adjusted path.
[0104] Since the system introduced in Embodiment Two of the present application is the system used for implementing the method of Embodiment One of the present application, the specific structure and variations of the system can be understood by those skilled in the art based on the method introduced in Embodiment One of the present application, and thus will not be described here again. Any system used by the method of Embodiment One of the present application belongs to the scope intended to be protected by the present application.
[0105] Based on the same inventive concept, the present application also provides a third embodiment, which refers to Figure 3 , Figure 3 The flowchart of the third embodiment of the path-optimized graphics rendering method of the present application.
[0106] In the present embodiment, before the vector graphics data is acquired as described in step S10 and is divided into at least two blocks based on the preset height value, steps S11-S13 are further included:
[0107] Step S11: The target graphics data is subjected to structured analysis, and the contour line segment, feature point coordinates and / or topological relationship of the target graphics data are extracted to form structured data to be verified.
[0108] Step S12: Based on the structured data, the line segment abnormal information of the target graphics data is identified through geometric continuity detection and / or correlation check of the graphics.
[0109] Step S13: If there is no line segment abnormal information, the target graphics data is taken as the vector graphics data, and the steps of acquiring the vector graphics data and dividing the vector graphics data into at least two blocks based on the preset height value are executed.
[0110] In the present embodiment, the target graphics data is the original vector graphics data received by the device. To ensure the reliability of laser processing, the device also needs to verify the received original vector graphics data to avoid processing abnormalities caused by errors in the data.
[0111] As an optional implementation, the vector graphics input data is received, and fourfold data verification is performed. The received vector graphics data is subjected to closedness check, the distance between the head and tail points of the line segment is calculated, the connection state of the head and tail of the line segment is judged, the vector graphics data is subjected to self-intersection check using a preset algorithm, it is detected whether the line segment of the graphics exists self-intersection, the vector graphics data is subjected to overlap check based on a preset indexing technology, it is identified whether there is a contour overlap area inside the graphics, the vector graphics data is subjected to intersection check by constructing a line segment intersection matrix, it is judged whether there is intersection conflict between different graphics line segments, and fourfold verification is completed.
[0112] For example, a threshold value dl=0.005 mm is set in the control system, which can be set according to the accuracy, and the distance Δd between the start and end points of the line segment is calculated, and when Δd-dl<0.0 mm, the connection is automatically extended. The Bentley-Ottmann algorithm is used to detect the intersection, and the R-tree index is used to identify the overlapping area, and the line segment intersection matrix is used to identify the conflict area.
[0113] Since the system introduced in Embodiment Three of the present application is the system used to implement the method of Embodiment One of the present application, the specific structure and variations of the system can be understood by those skilled in the art based on the method introduced in Embodiment One of the present application, and therefore will not be described here. Any system used by the method of Embodiment One of the present application belongs to the scope of protection of the present application.
[0114] Based on the same inventive concept, the present application also provides a fourth embodiment, which refers to Figure 4 , Figure 4 The flowchart of the fourth embodiment of the path optimization-based graphics rendering method of the present application.
[0115] In the present embodiment, before the step of obtaining vector graphics data and dividing the vector graphics data into at least two blocks based on a preset height value as described in step S10, steps S11-S17 are further included:
[0116] Step S11: structurally analyzing the target graphics data, extracting the contour line segment, feature point coordinates, and / or topological relationship of the target graphics data, and forming the structured data to be verified;
[0117] Step S12: based on the structured data, detecting the line segment abnormal information of the target graphics data through geometric continuity detection and / or correlation check of the graphics;
[0118] Step S14: if there is line segment abnormal information, classifying and marking the line segment abnormal information to determine the abnormal type and the influence range;
[0119] Step S15: determining the corresponding abnormal data processing algorithm according to the abnormal type;
[0120] Step S16: executing fault-tolerant processing on the target graphics data based on the influence range through the abnormal data processing algorithm, and generating vector graphics data;
[0121] Step S17: executing the steps of obtaining vector graphics data and dividing the vector graphics data into at least two blocks based on a preset height value.
[0122] In the present embodiment, the data verification of the laser processing equipment also includes a fault-tolerant processing mechanism.
[0123] Specifically, the control system first receives an abnormality detection report, classifies line segment abnormality information in the report according to a preset rule, and analyzes an influence range, wherein the influence range of a breakpoint abnormality or a correlation abnormality is limited to a single line segment or a single feature point, the influence range of an overlap abnormality is a contour in which overlapping line segments are located, and the influence range of a topological sequence abnormality is an entire abnormal contour, thereby forming a mapping table of abnormality classification and influence range. The control system further calls a corresponding processing algorithm according to the type of the abnormality, calls a corresponding algorithm based on the influence range to perform repair, and after the repair is completed, calls an abnormality detection algorithm again to check the processed data. If no abnormality is found in the checking, the data is converted into vector graphics data. If there is still an abnormality, the verification is repeated until the data is qualified, or warning information is sent to a management end.
[0124] For example, if a line segment endpoint deviation exceeds a standard, the line segment endpoint deviation is marked as a breakpoint abnormality, the contour ID, line segment ID, and endpoint coordinate deviation value of the deviated line segment are recorded, line segments with overlapping coordinate ranges are marked as overlap abnormalities, the number of overlapping line segments and the contour to which the overlapping line segments belong are recorded, and a contour with a reversed line segment connection sequence is marked as a topological sequence abnormality, the ID of the abnormal contour and the incorrect connection sequence are recorded. A feature point that does not match a line segment is marked as a correlation abnormality, and the coordinates of the abnormal feature point and the line segment ID to which the abnormal feature point belongs are recorded. For a breakpoint abnormality, an endpoint interpolation repair algorithm is selected, reasonable endpoint coordinates are calculated based on the direction vectors of adjacent line segments, and the deviation is corrected. For an overlap abnormality, an overlap line segment deduplication algorithm is selected, the line segment with the longest length and the highest coordinate accuracy is retained, and the remaining overlapping line segments are deleted. For a topological sequence abnormality, a contour reordering algorithm is selected. For a feature point correlation abnormality, a feature point remapping algorithm is selected.
[0125] For example, if a closedness check finds that the head and tail of a line segment are not connected, the unclosed line segment is automatically extended to connect the head and tail of the line segment to repair the closedness of the graphics. If a self-intersection check finds that the graphics have a self-intersection, the self-intersecting line segment is split and the graphics contour is reconstructed to eliminate the self-intersection problem. If an overlap check finds that the graphics have an overlapping contour region, the redundant boundary of the overlapping region is deleted, and the effective contour is retained. If an intersection check finds that line segments have intersection conflicts, the intersection conflict region is isolated, and the position of the conflict line segment is adjusted to avoid the intersection of the line segments, thereby completing the adjustment and repair of the graphics data.
[0126] Since the system introduced in the fourth embodiment of the present application is a system used to implement the method of the first embodiment of the present application, the specific structure and variations of the system can be understood by those skilled in the art based on the method introduced in the first embodiment of the present application, and thus will not be described here. Any system used by the method of the first embodiment of the present application belongs to the scope of protection of the present application.
[0127] Based on the same inventive concept, the present application also provides a fifth embodiment, which is described with reference to Figure 5 ,Figure 5 This is a flowchart illustrating the fifth embodiment of the path optimization-based graphics drawing method of this application.
[0128] In this embodiment, as described in step S40, integrating the local optimized path to generate the overall processing path, and controlling the laser processing equipment to perform graphic drawing actions based on the overall processing path, further includes steps S41 to S44:
[0129] Step S41: Convert the processing path into control code corresponding to the motion controller of the laser processing equipment;
[0130] Step S42: When the laser processing equipment performs the graphic drawing action, the real-time position data of the laser head is collected by the encoder;
[0131] Step S43: Calculate the deviation between the real-time position data and the target position data in the processing path;
[0132] Step S44: Based on the deviation value, calculate the control quantity using a preset control algorithm, and transmit the control quantity to the motion controller to adjust the motion state of the laser head.
[0133] In this embodiment, the laser processing equipment also uses an encoder to provide real-time feedback of position data and employs a PID compensation algorithm to adjust the control quantity, ensuring precise movement of the laser head and completing the graphic drawing action of the material to be processed. The PID compensation algorithm is an algorithm that controls the process based on the proportional (P), integral (I), and differential (D) of the deviation.
[0134] Specifically, during the cutting process, the encoder built into the laser head collects real-time position data (x_act, y_act) and feeds the data back to the control system. The control system calculates the deviation e(t) = ||(x_cmd,y_cmd)-(x_act,y_act)|| between the real-time position data and the target position data (x_cmd,y_cmd) in the processing path. If the deviation e(t) ≤ 5μm, it indicates that the laser head position is accurate and no adjustment is needed. If e(t) > 5μm, the PID compensation algorithm is triggered. The control quantity u(t) = K_pe(t) + K_i∫e(τ)dτ + K_dde(t) / dt is calculated, where K_p is the proportional coefficient, K_i is the integral coefficient, and K_d is the derivative coefficient. This control quantity is transmitted to the motion controller to adjust the speed and direction of the servo motor, correct the position of the laser head, and ensure that the laser head always moves accurately along the processing path until the entire graphic is drawn.
[0135] Since the system described in Embodiment 5 of this application is a system used to implement the method of Embodiment 1 of this application, those skilled in the art can understand the specific structure and variations of the system based on the method described in Embodiment 1 of this application, and therefore will not be described again here. All systems used in the method of Embodiment 1 of this application fall within the scope of protection of this application.
[0136] This application provides a path-optimized graphics drawing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the path-optimized graphics drawing method in Embodiment 1 above.
[0137] The following is for reference. Figure 6 This document illustrates a schematic diagram of a path-optimized graphics rendering device suitable for implementing embodiments of this application. The path-optimized graphics rendering device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The path-optimized graphics drawing device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0138] like Figure 6As shown, the path-optimized graphics rendering device may include a processing unit 1001 (e.g., a core processor, a graphics processor, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the path-optimized graphics rendering device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the path-optimized graphics rendering device to communicate wirelessly or wiredly with other devices to exchange data. Although a path-optimized graphics rendering device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0139] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0140] The path-optimized graphics drawing device provided in this application, employing the path-optimized graphics drawing method described in the above embodiments, can solve the technical problem that laser graphics drawing easily leads to overheating at corners. Compared with the prior art, the beneficial effects of the path-optimized graphics drawing device provided in this application are the same as those of the path-optimized graphics drawing method provided in the above embodiments, and other technical features of this path-optimized graphics drawing device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0141] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0142] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0143] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the path-optimized graphics drawing method in the above embodiments.
[0144] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.
[0145] The aforementioned computer-readable storage medium may be included in a path-optimized graphics rendering device; or it may exist independently and not be assembled into a path-optimized graphics rendering device.
[0146] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by a path-optimized graphics drawing device, the path-optimized graphics drawing device: acquires vector graphics data, divides the vector graphics data into at least two blocks based on a preset height value, acquires directional weights and centroid distances of graphic elements in the blocks, determines the processing sequence of graphic elements based on the directional weights and the centroid distances, solves the optimized path of the blocks based on the processing sequence using an ant colony algorithm with minimum energy consumption as the optimization objective, integrates the optimized paths, generates a processing path, and controls the laser processing device to perform graphic drawing actions on the material to be processed based on the processing path.
[0147] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0149] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0150] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described path-optimized graphics drawing method, which can solve the technical problem that laser graphics drawing easily leads to overheating at corners. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the path-optimized graphics drawing method provided in the above embodiments, and will not be repeated here.
[0151] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for path-based optimization of graphics rendering, the method comprising: The method comprises the following steps: acquiring vector graphics data, and dividing the vector graphics data into at least two blocks based on a preset height value; acquiring a direction weight and a centroid distance of a graphic element in the block, and determining a processing sequence of the graphic element based on the direction weight and the centroid distance; extracting feature points of the graphic element in the block to form a feature point set; constructing a weighted complete graph with the feature points as vertices based on the feature point set, and calculating an edge weight value of an edge of the weighted complete graph; solving a shortest Hamilton path of the weighted complete graph by an ant colony algorithm to obtain a locally optimized path, with minimum energy consumption as an optimization objective, according to the edge weight value; wherein the ant colony algorithm solves the shortest Hamilton path by solving an objective function: k m is a mechanical loss coefficient, T i represents the output torque of the laser head driving motor in the i-th path, Δt i represents the processing time of the i-th path, I is the moment of inertia of the laser head driving system, ω i represents the angular velocity of the driving motor in the i-th path; determining an entry point, an exit point and a cutting direction angle of the graphic element based on the locally optimized path; acquiring material attribute information of a material to be processed, and calculating an entry line and an exit line of the graphic element according to the entry point, the exit point and / or the cutting direction angle by introducing a line calculation model and an exit line calculation model; generating an optimized path in combination with the locally optimized path, the entry line and / or the exit line; integrating the optimized path to generate a processing path, and controlling a laser processing device to perform a graphic drawing action of the material to be processed based on the processing path.
2. The path-based optimization based graphics rendering method of claim 1, wherein, The step of integrating the optimized path to generate a processing path, and controlling a laser processing device to perform a graphic drawing action of the material to be processed based on the processing path further comprises: acquiring temperature field information of a processing area based on material state information of the material to be processed; adjusting length information and / or an entry angle of the entry line and / or the exit line according to the temperature field information, and updating the optimized path; controlling the laser processing device to perform the graphic drawing action based on the updated optimized path.
3. The path-based optimization based graphics rendering method of claim 1, wherein, The step of acquiring a direction weight and a centroid distance of a graphic element in the block, and determining a processing sequence of the graphic element based on the direction weight and the centroid distance comprises: acquiring the direction weight; calculating a centroid coordinate of the graphic element, and calculating the centroid distance from the centroid coordinate of the graphic element to a reference point with the geometric center of the block as the reference point; combining the direction weight and the centroid distance, and generating the processing sequence by sorting the graphic element based on a preset rule.
4. The path-based optimization based graphics rendering method of claim 1, wherein, Before the step of acquiring vector graphics data, and dividing the vector graphics data into at least two blocks based on a preset height value, the method further comprises: performing structural analysis on target graphics data to extract contour line segments, feature point coordinates and / or topological relationships of the target graphics data to form structured data to be verified; based on the structured data, identifying line segment abnormal information of the target graphics data by geometric continuity detection and / or correlation check of the graphics. If the line segment abnormal information does not exist, the target graphic data is taken as the vector graphic data, the step of acquiring the vector graphic data is performed, and the vector graphic data is divided into at least two blocks based on a preset height value.
5. The path-based optimization based graphics rendering method of claim 4, wherein, After the step of identifying the line segment abnormal information of the target graphic data based on the structured data through geometric continuity detection and / or relevance check of the graph, the method further includes: If the line segment abnormal information exists, the line segment abnormal information is classified and marked to determine an abnormal type and an influence range; According to the abnormal type, a corresponding abnormal data processing algorithm is determined; The target graphic data is processed based on the influence range through the abnormal data processing algorithm to generate the vector graphic data; The step of acquiring the vector graphic data and dividing the vector graphic data into at least two blocks based on a preset height value is performed.
6. The path-based optimization based graphics rendering method of claim 1, wherein, The step of integrating the optimized path to generate a machining path and controlling a laser machining device to perform a graphic drawing action on a material to be machined based on the machining path further includes: The machining path is converted into control code corresponding to a motion controller of the laser machining device; When the laser machining device performs the graphic drawing action, real-time position data of a laser head is collected through an encoder; A deviation value of the real-time position data and target position data in the machining path is calculated; Based on the deviation value, a preset control algorithm is used to calculate a control amount, and the control amount is transmitted to the motion controller to adjust a motion state of the laser head.
7. A path-based optimization based graphics rendering device, comprising: The device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the path-optimized graphic drawing method according to any one of claims 1 to 6.
8. A storage medium, characterized by The storage medium is a computer-readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the path-optimized graphic drawing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Ultraviolet laser cutting control method and system
CN118657171A
Intelligent short pulse laser processing cutting path optimization method and system
CN119476347A