Methods for generating processing paths for rectangular graphics, electronic devices, and software products

By determining the target tool and processing path based on the processing information of rectangular graphics, the problem of complex and time-consuming processing of rectangular graphics in the existing technology is solved, automated processing is realized, and labor costs and processing thresholds are reduced.

CN118396198BActive Publication Date: 2024-08-23GUANGZHOU WANGSHI SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410869001.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-08-23
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

The existing rectangular graphics processing methods are complex, time-consuming, have high processing thresholds and high labor costs, making it difficult to achieve automated processing.

Method used

Automatic processing of rectangular graphics is realized by determining the target tool, including the main body tool and the corner cleaning tool, based on the processing information of the rectangular graphics, and determining the processing path based on the processing area and tool parameters.

Benefits of technology

It simplifies the processing process, reduces the processing threshold and labor costs for operators, improves processing efficiency, and realizes automated processing of rectangular graphics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396198B
    Figure CN118396198B
Patent Text Reader

Abstract

The present application provides a method for generating a processing path for a rectangular figure, an electronic device, and a program product, and relates to the field of numerical control machining technology. The method for generating a processing path for a rectangular figure includes: determining a target tool for processing according to the processing information of the rectangular figure, the processing information includes the coordinates, size, and rotation angle of the center point of the rectangular figure, the target tool includes a main tool for processing the main area of ​​the rectangular figure and a corner cleaning tool for trimming and clearing corners; determining the processing area of ​​the main tool and the corner cleaning tool according to the processing information and the parameters of the target tool; determining the processing path of the main tool and the corner cleaning tool based on the processing area and the tool diameter of the target tool. The embodiment of the present application can automatically select the corresponding tool for the rectangular figure and generate the processing path corresponding to the tool, thereby facilitating the automatic processing of the rectangular figure, and the processing method is simple and time-saving, which reduces the processing threshold and labor cost of the operator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of numerical control machining, and in particular to a method for generating a machining path for rectangular graphics, an electronic device, and a program product. Background Art

[0002] For furniture processing, due to the various styles of furniture-related hardware and the various types and structures of furniture, it is often necessary to process rectangular graphics with different chamfers on furniture according to the type, structure and installation requirements of the furniture hardware. The conventional processing method is that the operator first controls the tool to process a rough graphic similar to the rectangular graphic, and then controls the tool to make detailed adjustments to the processed graphic to obtain a rectangular graphic that meets the requirements. This processing method is complex and time-consuming, and requires the operator to have a high level of processing skills, which increases the processing threshold and labor costs of the operator. Summary of the invention

[0003] The embodiments of the present application provide a method for generating a processing path for a rectangular figure, an electronic device, and a program product, which can solve the problems that the existing processing methods for rectangular figures are complex, time-consuming, have high processing thresholds, high labor costs, and high rock drilling costs. To achieve this purpose, the embodiments of the present application provide the following solutions.

[0004] According to one aspect of an embodiment of the present application, a method for generating a processing path of a rectangular figure is provided, comprising: determining a target tool for processing according to processing information of the rectangular figure, the processing information comprising the coordinates, size and rotation angle of the center point of the rectangular figure, the target tool comprising a main body tool for processing a main body area of ​​the rectangular figure and a corner cleaning tool for trimming and clearing corners;

[0005] Determining the processing areas of the main tool and the corner cleaning tool according to the processing information and the parameters of the target tool;

[0006] The processing paths of the main tool and the corner cleaning tool are determined based on the processing area and the tool radius of the target tool.

[0007] In a possible implementation, determining a target tool for machining according to machining information of the rectangular graphic includes:

[0008] Determine the chamfer radius of the rectangular figure according to the processing information, and determine the corner cleaning tool based on the processing radius of the tool and the chamfer radius;

[0009] The main knife is determined according to the number of trimming circles corresponding to each large knife. The number of trimming circles is the number of trimming circles of the corner cleaning knife when the corner cleaning knife and the large knife are combined for processing. The diameter of the large knife is greater than the diameter of the corner cleaning knife.

[0010] In a possible implementation, determining the processing areas of the main tool and the corner cleaning tool according to the processing information and the parameters of the tool includes:

[0011] Determine a rectangular processing area of ​​the rectangular graphic according to the processing information;

[0012] The main body processing area of ​​the main body knife is determined based on the rectangular processing area and the predetermined trimming allowance, and the area between the main body processing area and the rectangular processing area is determined as the corner cleaning processing area of ​​the corner cleaning knife.

[0013] In a possible implementation, determining the main body processing area of ​​the main body tool based on the rectangular processing area and the predetermined trimming allowance, and determining the area between the main body processing area and the rectangular processing area as the corner cleaning processing area of ​​the corner cleaning tool includes:

[0014] If it is determined that at least one side of the rectangular processing area is processed into a right angle, the rectangular processing area is expanded based on the side where the right angle is located;

[0015] The main body processing area and the corner clearing processing area are determined according to the expanded rectangular processing area.

[0016] In a possible implementation, determining the processing path of the main tool based on the processing area and the tool path of the target tool includes:

[0017] The cutting amount of the main body knife is determined according to the knife diameter of the main body knife, and the processing path of the main body knife is determined based on the cutting amount and the remaining processing area, and the remaining processing area is determined based on the processing method of the main body knife.

[0018] In a possible implementation, the processing method includes U-shaped processing, and determining the processing path of the main knife based on the cutting amount and the remaining processing area includes:

[0019] Based on the first processing path in the shape of a U-shape generated by the cutting amount retraction, determining a remaining processing area corresponding to the first processing path, wherein the remaining processing area is an area in the processing area of ​​the main blade that is not covered by the first processing path;

[0020] Determining a second processing path corresponding to the remaining processing area based on the size of the remaining processing area relative to the cutting amount;

[0021] The processing path of the main tool is determined according to the first processing path and the second processing path.

[0022] In a possible implementation, determining the processing path of the corner cleaning tool based on the processing area and the tool radius of the target tool includes:

[0023] Determining the maximum cutting size of the corner cleaning knife according to the distance between the edge of the processing area of ​​the corner cleaning knife and the processing area of ​​the main body knife;

[0024] The number of cutting circles of the corner cleaning knife is determined according to the maximum cutting size and the cutting amount of the corner cleaning knife, and the processing path of the corner cleaning knife is determined based on the number of cutting circles. The cutting amount of the corner cleaning knife is determined by the blade diameter of the corner cleaning knife.

[0025] In a possible implementation, determining the processing path of the corner cleaning knife based on the number of cutting circles includes:

[0026] The vertex coordinates of four vertices in the processing area of ​​the corner cleaning knife are obtained, and the processing path of the corner cleaning knife is determined based on the vertex coordinates and the number of cutting circles.

[0027] According to one aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method for generating a processing path for a rectangular graphic as described above.

[0028] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described above are implemented.

[0029] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0030] The processing path generation method for rectangular figures provided in the present application determines the target tool for processing according to the processing information of the rectangular figure; determines the processing area of ​​the main tool and the corner-clearing tool according to the processing information and the parameters of the target tool; determines the processing path of the main tool and the corner-clearing tool based on the processing area and the tool diameter of the target tool. The embodiment of the present application selects the main tool and the corner-clearing tool for processing according to the processing information of the rectangular figure, determines the processing area of ​​the main tool and the corner-clearing tool according to the processing information and the parameters of the tool, and determines the processing path according to the processing area and the tool diameter. Therefore, the embodiment of the present application can automatically select the corresponding tool for the rectangular figure and generate the processing path corresponding to the tool, thereby facilitating the automatic processing of the rectangular figure. The processing method is simple and time-saving, which reduces the processing threshold and labor cost of the operator. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in describing the embodiments of the present application.

[0032] Figure 1 A flowchart of a method for generating a processing path for a rectangular graphic provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of a rectangular processing area of ​​a rectangular figure provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of the division of processing areas provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of a U-shaped processing area in a method for generating a processing path for a rectangular graphic provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of calculation of each point on the corner clearing path in the method for generating a processing path for a rectangular graphic provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of a processing path of a main processing area provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of a corner cleaning processing area provided in an embodiment of the present application;

[0039] Figure 8 A flow chart of path deviation calculation provided in an embodiment of the present application;

[0040] Fig. 9 A flowchart of the processing path generation provided in the embodiment of the present application;

[0041] Fig.10 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0043] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates that it is implemented as "A", or is implemented as "A", or is implemented as "A and B".

[0044] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0045] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0046] The processing path generation method, electronic device and program product of rectangular graphics provided in the present application are intended to solve at least one technical problem existing in the prior art.

[0047] The present application provides a method for generating a processing path for a rectangular graphic. Figure 1-Figure 9 As shown, the object of executing the method for generating a processing path for a rectangular figure can be a CNC machine tool, a mobile phone, a computer, and other devices that can obtain a rectangular figure to be processed and generate a processing path for the rectangular figure.

[0048] Optionally, the method for generating a processing path of the rectangular graphic includes:

[0049] S101: Determine a target tool for machining according to machining information of the rectangular figure.

[0050] Optionally, the processing information includes the coordinates, size and rotation angle of the center point of the rectangular figure, and the target tool includes a main tool for processing the main area of ​​the rectangular figure and a corner tool for trimming and corner cleaning. The rotation angle is the angle of rotation of the rectangular figure about the center point.

[0051] Optionally, the target tool for processing is determined according to the processing information of the rectangular figure, including: determining the chamfer radius of the rectangular figure according to the processing information, and determining the corner cleaning tool based on the processing radius and chamfer radius of the tool; determining the main tool according to the number of trimming circles corresponding to each large tool, and the number of trimming circles is the number of trimming circles of the corner cleaning tool when the corner cleaning tool and the large tool are combined for processing.

[0052] Optionally, the chamfer radius data may be stored in the processing information, or the chamfer radius corresponding to different processing dimensions (such as length and width) may be pre-stored, and the processing dimensions (such as length and width) of the rectangular figure may be obtained according to the processing information, and the chamfer radius corresponding to the processing dimensions may be determined as the chamfer radius of the rectangular figure. The chamfer radius setting instruction input by the operator may also be obtained, and the chamfer radius may be determined according to the instruction.

[0053] Optionally, the machining radius of each tool can be obtained according to tool magazine parameters. The tool magazine parameters can be pre-stored in the device, or can be input by the operator simultaneously with the rectangular figure when the rectangular figure is input.

[0054] Optionally, the tool can be divided into a large cutter and a small cutter, wherein the diameter of the large cutter is larger than the diameter of the small cutter, and when selecting the main cutter and the corner cleaning cutter, the corner cleaning cutter is selected from the small cutter, and the main cutter is selected from the large cutter.

[0055] In one embodiment, the large knife is responsible for processing the main area, and the small knife is used for trimming and clearing the corners. The tool for clearing the corners is used to process the corresponding chamfers. The processable tools are traversed from the tool library, and the tool with a tool processing radius less than or equal to the chamfer radius of the rectangular figure is selected. The tool with the largest processing radius among the selected tools is determined as the clearing tool. Due to the existence of chamfers, when the difference between the large knife diameter and the clearing tool diameter is too large, the number of trimming circles of the clearing tool will be increased. And because the tool diameter of the clearing tool is small, a lower processing speed will be used during processing, so the larger the diameter of the large knife, the faster the processing efficiency. Since the difference between the diameter of the clearing tool and the diameter of the large knife tool is generally large and the processing speed of the large knife tool is also fast, when selecting the main knife, it is only necessary to ensure that the number of clearing circles is the least. The diameter of the clearing tool used has been determined in the previous step. By calculating the number of trimming circles required when it is combined with different large knives for processing, the object with the largest tool diameter is selected from the large knife with the smallest number of clearing circles as the main knife. Among them, the number of trimming circles when each small knife is combined with different large knives for processing can be pre-stored. After the corner cleaning knife is determined, the pre-stored data corresponding to the corner cleaning knife is obtained, and the main knife is determined based on the pre-stored data.

[0056] S102: Determine the processing areas of the main tool and the corner cleaning tool according to the processing information and the parameters of the target tool.

[0057] Optionally, the processing areas of the main tool and the corner cleaning tool are determined according to the processing information and the parameters of the tool, including: determining the rectangular processing area of ​​the rectangular figure according to the processing information; determining the main processing area of ​​the main tool based on the rectangular processing area and the predetermined trimming allowance, and determining the area between the main processing area and the rectangular processing area as the corner cleaning processing area of ​​the corner cleaning tool.

[0058] Optionally, the center point coordinates, chamfer radius, rotation angle, length, and width of the rectangular figure are obtained according to the processing information, and the coordinates of each end point of the chamfer in the rectangular processing area are obtained based on the center point coordinates, chamfer radius, rotation angle, length, and width.

[0059] In one embodiment, a rectangular processing area such as Figure 2 As shown, Figure 2 The coordinates marked on the edge of the rectangular processing area are the coordinates of the connection position between the chamfer and each side. The calculation formula of the coordinates is as follows:

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068]

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075]

[0076] Among them, (X, Y) is the coordinate of the center point of the rectangular figure, θ is the rotation angle; L is the length of the rectangular figure; W is the width of the rectangular figure; R0 is the chamfer radius of the rectangular figure.

[0077] Optionally, in actual processing and production, since the main blade is replaced less frequently but used for a longer time, burrs are likely to remain after processing if used for a long time. Therefore, the main blade will not be used directly to process the contour edge of the rectangular figure, and a certain trimming margin will be reserved for processing by the small blade. The main processing area is determined by combining the rectangular processing area and the trimming margin. The value of the trimming margin can be set by the operator according to the actual processing requirements.

[0078] Optionally, after determining the rectangular processing area, the processing path of the main tool can be calculated based on the rectangular processing area, and after determining the processing path, the processing path is deviated inward by a preset distance, and the processing area corresponding to the processing path after the deviated inward by a certain distance is determined as the main processing area, and the preset distance is equal to the trimming allowance.

[0079] In one embodiment, the process of machining path inward deviation is as follows Figure 8 As shown, after obtaining the machining path of the main tool according to the rectangular machining area, check whether the offset parameters (machining path, offset distance, offset direction) are valid (whether the offset direction is correct or the machining path and offset distance meet the preset conditions). If not, prompt to re-enter. If correct, obtain each coordinate point (i.e., vertex) in the machining path, remove duplicate vertices (check whether three consecutive coordinate points in the machining path are located on the same line of the machining path, and if so, remove the coordinate point in the middle of the three coordinate points), and obtain a machining path with a closed path (if the beginning and end of the path are the same vertex, it is a closed path). Take out a section of the machining path in turn for path offset (offset based on the offset distance and offset direction), and check whether the offset section of the path intersects with the previous section of the path. If intersecting, the intersection point is used as the new vertex. If not intersecting, insert a circular arc between the section of the path and the previous section of the path as a transition. Repeat the above steps until each section of the machining path has been offset and the offset machining path is obtained.

[0080] In one embodiment, Figure 3 As shown, after the main processing area is determined, the portion of the rectangular processing area located outside the main processing area is used as the corner clearing processing area.

[0081] Optionally, since the tool diameter of the main tool is large, in order to facilitate the main tool processing, after the main tool processing area is determined based on the processing distance after the inner deviation, it is detected whether the chamfer radius of the main tool processing area is smaller than the tool radius of the main tool. If so, the chamfer radius is modified to the chamfer radius of the main tool.

[0082] Optionally, there are cases where right angles need to be machined in some rectangular machining areas. Therefore, based on the rectangular machining area and a predetermined trimming allowance, the main machining area of the main tool is determined, and the area between the main machining area and the rectangular machining area is determined as the corner cleaning machining area of the corner cleaning tool, including: if it is determined that at least one side of the rectangular machining area is machined into a right angle, the rectangular machining area is expanded outward based on the side where the right angle is located; the main machining area and the corner cleaning machining area are determined according to the expanded rectangular machining area.

[0083] Optionally, the expansion distance is the machining radius of the main tool, and the main machining area is used to cover the side of the rectangular machining area in the expansion direction.

[0084] In one embodiment, a right angle needs to be machined on the side of the rectangular machining area close to the edge of the plate. Therefore, the rectangular machining area is expanded outward based on the position of the right angle. Specifically, the expansion size is the size of the machining radius of the main tool. And the machining area of the corner cleaning tool is adjusted from a "square with a hole in the middle" machining to a "U-shaped" machining. The "U-shaped" machining area is as Figure 4 shown. The notch is milled by the main tool, reducing the machining burden of the corner cleaning tool.

[0085] S103: Determine the machining paths of the main tool and the corner cleaning tool based on the machining area and the tool diameter of the target tool.

[0086] Optionally, determining the machining path of the main tool based on the machining area and the tool diameter of the target tool includes: determining the cutting amount of the main tool according to the tool diameter of the main tool, and determining the machining path of the main tool based on the cutting amount and the remaining machining area, where the remaining machining area is determined based on the machining method of the main tool.

[0087] Optionally, the machining object is wood. To ensure that there is no residue between two cuts and the interior can be completely hollowed out, and considering the resilience of wood, the distance of each inward contraction is less than the tool diameter. Therefore, the cutting amount = tool diameter * preset ratio, where the preset ratio is greater than zero and less than 1, and the size of the preset ratio can be set according to the target resilience.

[0088] Optionally, the main tool is controlled to machine in a "square with a hole in the middle" machining method. Determining the machining path of the main tool based on the cutting amount and the remaining machining area includes: generating a first machining path in a "square with a hole in the middle" shape by inward contraction based on the cutting amount, determining the remaining machining area corresponding to the first machining path, where the remaining machining area is the area in the machining area of the main tool not covered by the first machining path; determining the second machining path corresponding to the remaining machining area based on the size of the remaining machining area relative to the cutting amount; and determining the machining path of the main tool according to the first machining path and the second machining path.

[0089] Optionally, if the width of the remaining processing area is less than or equal to the cutting amount of the main knife, it is determined that the processing of the remaining processing area can be completed in a one-cut manner. If it is determined that the width is greater than the cutting amount of the main knife but less than twice the cutting amount, it is determined to continue to retract to generate a processing path, and detect whether there is still a part that is not covered by the processing path. If not, a second processing path is obtained. If so, the processing of this part is completed in a one-cut manner. When performing a one-cut, the last cut is processed along the side with the larger size (length and width) in the area corresponding to the cutter.

[0090] In one embodiment, a U-shaped processing path is produced by retracting according to the actual cutting amount of the main knife. Then the first processing path is generated in clockwise and counterclockwise order according to the processing definition. Then, when the remaining processing area is gradually retracted to a size that is less than twice the cutting amount of the corresponding tool, it is determined whether the remaining processing area should be completed in one cut or continue to retract one circle to complete the last part of the processing. When the remaining processing area is less than the cutting amount of the main knife, it is completed in one cut. When the remaining processing area is greater than the cutting amount of the main body and is less than or equal to twice the cutting amount, it is retracted again to complete the processing. If the last area is completed in one cut, the direction of the last cut is along the side with the larger size in the remaining processing area, and the final result is as follows. Figure 6 The machining path shown.

[0091] Optionally, the processing area of ​​the corner cleaning knife is as follows Figure 7 As shown in the figure, the area between the two rectangular coils is the processing area of ​​the corner cleaning knife, and the processing area of ​​the main knife is located inside the processing area of ​​the corner cleaning knife. The processing path of the corner cleaning knife is determined based on the processing area and the tool diameter of the target tool, including: determining the maximum cutting size of the corner cleaning knife according to the distance between the edge of the processing area of ​​the corner cleaning knife and the edge of the processing area of ​​the main knife; determining the number of cutting circles of the corner cleaning knife according to the maximum cutting size and the cutting amount of the corner cleaning knife, and determining the processing path of the corner cleaning knife based on the number of cutting circles, and the cutting amount of the corner cleaning knife is determined by the tool diameter of the corner cleaning knife. Among them, the calculation method of the cutting amount of the corner cleaning knife can be the same as the calculation method of the cutting amount of the main knife.

[0092] Optionally, the maximum cutting size can be obtained according to the distance between the chamfer of the rectangular processing area and the processing area of ​​the main body cutter. Specifically, according to the geometric relationship, the distance between the half angle of the chamfer and the internal main body cutter processing area is the maximum cutting size in the clearing processing area.

[0093] Among them, the maximum cutting size can be calculated by the following formula:

[0094]

[0095] is the maximum cutting size, XB is the trimming allowance, R1 is the processing radius of the main tool, R2 is the processing radius of the corner cleaning tool, and R0 is the chamfer radius of the rectangular processing area.

[0096] Optionally, when the processing radius of the main tool is less than or equal to the chamfer radius of the rectangular processing area, the corner clearing processing area is to reserve a part of the area for scraping the burrs, and the maximum cutting size can be the trimming allowance.

[0097] Optionally, the number of circles required to be processed by the corner cleaning knife (i.e., the number of cutting circles) can be calculated according to the maximum cutting size and the cutting amount of the corner cleaning knife. The number of cutting circles is Dmax / (C2*2), where C2 is the cutting amount of the corner cleaning knife.

[0098] Optionally, determining the processing path of the corner cleaning knife based on the number of cutting circles includes: acquiring vertex coordinates of four vertices in a processing area of ​​the corner cleaning knife, and determining the processing path of the corner cleaning knife based on the vertex coordinates and the number of cutting circles.

[0099] In one embodiment, when calculating the processing path of the corner cleaning tool, it is necessary to calculate the processing paths of the corner cleaning tool at the four corners of the rectangular processing area, where the path of a single corner can be considered as being processed by three paths: straight line-arc-straight line. When calculating the processing path, first calculate the coordinates of the four vertices of the rectangle, and then calculate the corner cleaning path of each circle based on the geometric relationship. The coordinate calculation formula of the four vertices is as follows:

[0100]

[0101]

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108] LB represents the vertex at the bottom left of the rectangular processing area; LT represents the vertex at the top left of the rectangular processing area; RB represents the vertex at the bottom right of the rectangular processing area; RT represents the vertex at the top right of the rectangular processing area; X and Y represent the center coordinates of the rectangular processing area; L and W represent the length and width of the rectangular processing area; θ represents the rotation angle. After obtaining the coordinates of the four vertices of the rectangular processing area, the four vertices can be used to form a tool path for clearing corners. Figure 5The lower left corner of the middle rectangular processing area is an example to illustrate the calculation method of each point of the corner cleaning path:

[0109]

[0110]

[0111]

[0112]

[0113]

[0114]

[0115]

[0116]

[0117] X and Y are the coordinates of the vertices of the rectangle; n is the current number of cutting circles; R0 is the radius of the chamfer; R1 is the tool diameter of the main tool; R2 is the tool diameter of the corner cleaning tool; θ is the rotation angle; D is the current retraction value (the cutting amount of the corner cleaning tool).

[0118] Combine the following Fig. 9 The processing path generation method of the rectangular graphics of the present application is further explained.

[0119] In one embodiment, the operator inputs the processing information and tool information of the rectangular figure, and detects whether the tool corresponding to the tool information can be used for processing (such as whether it can perform corner trimming and main area processing). If not, an error is prompted and a request is made to re-enter. If yes, the main processing area and the corner trimming processing area are calculated. When calculating the processing path of the main processing area, the processing path is obtained according to the main processing area, and the minimum value of the remaining processing area size (the minimum value of the length and width) is detected to be less than the tool diameter of the main tool. If it is not less than the tool diameter, it continues to shrink inward to obtain the processing path; if it is less than the tool diameter, it is detected whether the length of the remaining processing area is greater than the width. If it is greater than the width, the last cut is horizontal processing (i.e., processing along the length direction). If not, the last cut is longitudinal processing. The above processing paths are combined to obtain the processing path of the main tool. When calculating the processing path of the corner trimming tool processing area, the number of cutting circles of the corner trimming tool is calculated, and the processing path is obtained based on the processing radius of the corner trimming tool in the corner trimming tool processing area. If the number of inward deviations is equal to the number of cutting circles, these processing paths are combined to obtain the processing path of the corner trimming tool. After the machining paths of the main tool and the corner cleaning tool are generated, combine the path generation operations.

[0120] The processing path generation method of the rectangular figure of the present application calculates the processing area, and performs path inward deviation on the processing area according to relevant parameters, so that the processing area can be divided into the main processing area processed by the main tool and the corner cleaning processing area processed by the corner cleaning tool. It not only ensures the processing efficiency, but also ensures that the contour result of the milling processing is consistent with the expected result of the rectangular drawing. By calculating the geometric relationship between the outer contour of the rectangular figure and the contour of the main processing area, the number of circles that the corner cleaning tool needs to shrink inward is obtained to ensure that when the tool diameters of the main tool and the corner cleaning tool change, the corresponding figure can still be completely processed. By processing the rectangular figure at the edge of the plate, the processing path is optimized, ensuring that the total path is shorter, which also means reducing the processing time and improving the processing efficiency.

[0121] In an optional embodiment, an electronic device is provided, such as Fig.10 As shown, Fig.10 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0122] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0123] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0124] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0125] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0126] Among them, the electronic device can be any electronic product that can interact with an object, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0127] The electronic device may also include a network device and / or an object device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.

[0128] The network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.

[0129] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0130] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0131] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0132] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. A method for generating a processing path for a rectangular graphic, characterized in that: include: Determine a target tool for machining according to machining information of the rectangular figure, wherein the machining information includes the coordinates of the center point, the size and the rotation angle of the rectangular figure, and the target tool includes a main body tool for machining the main body area of ​​the rectangular figure and a corner cleaning tool for trimming and corner cleaning; The step of determining a target tool for machining according to machining information of the rectangular figure comprises: Determine the chamfer radius of the rectangular figure according to the processing information, and determine the corner cleaning tool based on the processing radius of the tool and the chamfer radius; The main blade is determined according to the number of trimming circles corresponding to each large blade, the number of trimming circles being the number of trimming circles of the corner cleaning blade when the corner cleaning blade and the large blade are combined for processing, and the blade diameter of the large blade is greater than the blade diameter of the corner cleaning blade; Determining the processing areas of the main tool and the corner cleaning tool according to the processing information and the parameters of the target tool; The processing paths of the main tool and the corner cleaning tool are determined based on the processing area and the tool radius of the target tool.

2. The method for generating a processing path for a rectangular graphic according to claim 1, characterized in that: Determining the processing areas of the main tool and the corner cleaning tool according to the processing information and the parameters of the tool includes: Determine a rectangular processing area of ​​the rectangular graphic according to the processing information; The main body processing area of ​​the main body knife is determined based on the rectangular processing area and the predetermined trimming allowance, and the area between the main body processing area and the rectangular processing area is determined as the corner cleaning processing area of ​​the corner cleaning knife.

3. The method for generating a processing path for a rectangular graphic according to claim 2, characterized in that: The method of determining the main body processing area of ​​the main body knife based on the rectangular processing area and the predetermined trimming allowance, and determining the area between the main body processing area and the rectangular processing area as the corner cleaning processing area of ​​the corner cleaning knife, comprises: If it is determined that at least one side of the rectangular processing area is processed into a right angle, the rectangular processing area is expanded based on the side where the right angle is located; The main body processing area and the corner clearing processing area are determined according to the expanded rectangular processing area.

4. The method for generating a processing path for a rectangular graphic according to claim 1, characterized in that: Determining a processing path of the main tool based on the processing area and the tool radius of the target tool includes: The cutting amount of the main body knife is determined according to the knife diameter of the main body knife, and the processing path of the main body knife is determined based on the cutting amount and the remaining processing area, and the remaining processing area is determined based on the processing method of the main body knife.

5. The method for generating a processing path for a rectangular graphic according to claim 4, characterized in that: The processing method includes U-shaped processing, and the processing path of the main knife is determined based on the cutting amount and the remaining processing area, including: Based on the first processing path of the U-shape generated by the cutting amount retraction, determining the remaining processing area corresponding to the first processing path, wherein the remaining processing area is an area of ​​the processing area of ​​the main knife that is not covered by the first processing path; Determining a second processing path corresponding to the remaining processing area based on the size of the remaining processing area relative to the cutting amount; The processing path of the main tool is determined according to the first processing path and the second processing path.

6. The method for generating a processing path for a rectangular graphic according to claim 1, characterized in that: Determining a processing path of the corner cleaning tool based on the processing area and the tool radius of the target tool includes: Determining the maximum cutting size of the corner cleaning knife according to the distance between the edge of the processing area of ​​the corner cleaning knife and the processing area of ​​the main body knife; The number of cutting circles of the corner cleaning knife is determined according to the maximum cutting size and the cutting amount of the corner cleaning knife, and the processing path of the corner cleaning knife is determined based on the number of cutting circles. The cutting amount of the corner cleaning knife is determined by the blade diameter of the corner cleaning knife.

7. The method for generating a processing path for a rectangular graphic according to claim 6, characterized in that: Determining the processing path of the corner cleaning knife based on the number of cutting circles includes: The vertex coordinates of four vertices in the processing area of ​​the corner cleaning knife are obtained, and the processing path of the corner cleaning knife is determined based on the vertex coordinates and the number of cutting circles.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method for generating a processing path for a rectangular graphic as described in any one of claims 1 to 7.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.