Object surface fitting method, machine, system and medium for laser processing
By acquiring and fitting the mark point data of the laser-processed surface to construct a three-dimensional model, the problem of processing pattern distortion caused by non-planar surfaces is solved, and the accuracy and efficiency of laser processing are improved.
Patent Information
- Application Number
- CN202410223116.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-02
- Filing Date
- 2024-02-28
- Publication Date
- 2024-09-03
AI Technical Summary
During the laser processing process, the non-planar object surface causes the processing pattern to be distorted, affecting the processing effect.
By obtaining mark point data on the surface to be processed, surface fitting is performed to build a three-dimensional model, and laser processing is performed based on the model.
It improves the accuracy and efficiency of laser processing and ensures high-quality processing effects on irregular surfaces.
Smart Images

Figure CN118587385A
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on March 2, 2023, with the application name “An algorithm for surface fitting based on sparse array points” and priority number 2023102371448, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present application belongs to the field of product processing technology, and specifically relates to a surface fitting method, machine, system and medium for laser processing. Background Art
[0003] Laser processing technology is a processing technology that uses the characteristics of the interaction between laser beams and materials to cut, weld, and surface process materials. Laser processing technology is widely used in various fields. When laser processing an object, it is usually necessary to first determine the shape of the surface to be processed of the object to be processed. If the surface to be processed is not a plane, the processing pattern may be distorted due to the irregular surface to be processed, resulting in poor processing results.
[0004] The information included in this Background section is only for enhancement of understanding of the general background of the disclosure and should not be taken as an admission or any form of suggestion that this information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0005] The present application provides a surface fitting method, machine, system and medium for laser processing of an object, so as to improve the processing efficiency of laser processing on the surface of an object.
[0006] A surface fitting method for laser processing, the method comprising:
[0007] Acquire marking point data corresponding to the surface to be processed, wherein the marking point data indicates positions of marking points arranged in an array on the surface to be processed;
[0008] Perform surface fitting according to the marking point data to obtain a three-dimensional model corresponding to the surface to be processed;
[0009] According to the three-dimensional model, laser processing is performed on the surface to be processed.
[0010] A numerically controlled machine, comprising:
[0011] Slide rails;
[0012] a movable head, the movable head being slidably disposed on the slide rail;
[0013] A communication component, the communication component is used to receive a laser processing signal for laser processing a surface to be processed obtained according to the method in any embodiment of the present application; and
[0014] A controller is provided for controlling the movable head to move on the slide rail to process the material to be processed based on the laser processing signal.
[0015] A computing system comprising at least one numerically controlled machine and at least one processor;
[0016] The processor is used to execute the steps of the method in any embodiment of the present application;
[0017] The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the laser processing signal obtained by the processor.
[0018] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned object surface fitting method for laser processing when executing the computer program.
[0019] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the object surface fitting method for laser processing is implemented.
[0020] In the technical solution provided in the embodiment of the present application, firstly, the marking point data corresponding to the surface to be processed of the product to be processed is obtained, and the marking point data is the position coordinates of the marking points arranged in an array on the surface to be processed; then, surface fitting is performed according to the marking point data to obtain a three-dimensional model corresponding to the surface to be processed; finally, according to the three-dimensional model, the surface to be processed is laser processed, thereby realizing a solution of three-dimensional modeling based on the marking point data of the surface to be processed, and then laser processing based on the three-dimensional model, which helps to more intuitively reflect the morphological information and processing effect of the surface to be processed, can improve the accuracy of laser processing, and can also ensure the processing effect for irregular surfaces to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1A schematic diagram of an application environment of a surface fitting method for laser processing provided by an embodiment of the present application is schematically shown.
[0023] Figure 2 A schematic diagram of a process flow of a surface fitting method for laser processing of an object provided in an embodiment of the present application is shown;
[0024] Figure 3 A schematic diagram of a process for obtaining virtual marker point data provided by an embodiment of the present application is shown;
[0025] Figure 4 A schematic diagram showing an array arrangement of 3 rows and 3 columns of marking point data on a surface to be processed provided by an embodiment of the present application is shown;
[0026] Figure 5 A schematic diagram of a process for obtaining second virtual marker point data provided by an embodiment of the present application is shown;
[0027] Figure 6 A schematic diagram of a process of fitting and obtaining a three-dimensional model provided in an embodiment of the present application is shown;
[0028] Figure 7 A schematic diagram of fitting a two-dimensional curve provided by an embodiment of the present application is shown;
[0029] Figure 8 A schematic diagram showing the structure of a three-dimensional model corresponding to a surface to be processed provided by an embodiment of the present application;
[0030] Fig. 9 A schematic diagram of a process of fitting and obtaining a two-dimensional curve provided by another embodiment of the present application is shown;
[0031] Fig.10 It shows 4 rows and 5 columns of first virtual marking point data provided in one embodiment of the present application;
[0032] Fig.11 It shows 8 rows and 5 columns of first virtual marking point data provided in one embodiment of the present application;
[0033] Fig.12 A schematic diagram of a process of fitting and obtaining a two-dimensional curve according to an embodiment of the present application is shown;
[0034] Fig.13 The second virtual marking point data of 8 rows and 5 columns provided in one embodiment of the present application is shown;
[0035] Fig.14 It shows 8 rows and 10 columns of second virtual marking point data provided in one embodiment of the present application;
[0036] Figures 15 to 17A schematic diagram showing the curvature change of a curve provided in an embodiment of the present application when the subdivision parameter value is fixed and the tension value gradually increases;
[0037] Figures 18 to 20 A schematic diagram showing the change in smoothness of a curve when the tension value provided in an embodiment of the present application is fixed and the subdivision parameter value gradually increases;
[0038] Fig.21 A schematic diagram of a process of laser processing a surface to be processed provided by another embodiment of the present application is shown;
[0039] Fig. 22 A schematic structural diagram of an object surface fitting device for laser processing provided in one embodiment of the present application is shown;
[0040] Fig.23 A structural schematic diagram of a CNC machine provided in one embodiment of the present application is shown.
[0041] Fig.24 A schematic diagram of the structure of a computer device in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0043] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0045] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0046] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0047] In the related art, when laser processing is performed on an object, it is usually necessary to first determine the shape of the surface to be processed of the object to be processed. If the surface to be processed is not a plane, the processing pattern may be distorted due to the irregular surface to be processed, resulting in poor processing effect. Specifically, the user usually edits the processing pattern in the host computer software, and then transmits the code corresponding to the processing pattern to the laser processing equipment (CNC machine) through the host computer, and the laser processing equipment performs the processing. Since the processing pattern editing page of the host computer software usually displays a flat effect, the corresponding surface to be processed is also a flat effect. Therefore, for the uneven surface to be processed, the pattern will be distorted when processing the pattern, and the processing effect is poor.
[0048] The object surface fitting method for laser processing provided in the embodiment of the present application can be applied in Figure 1 In the application environment shown, Figure 1 As shown, the system framework 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The server 105 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0049] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc.
[0050] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Eperts Group Audio Layer III), MP4 (Moving Picture Eperts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0051] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0052] It should be noted that the object surface fitting method for laser processing provided in the embodiment of the present application can be executed by a server, and accordingly, the object surface fitting device for laser processing is arranged in the server.
[0053] It should be understood that Figure 1 The number of terminal devices, networks and servers is only illustrative. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices in the embodiments of the present application may specifically correspond to application systems in actual production.
[0054] In one embodiment, Figure 2 A schematic diagram of a process flow of a surface fitting method for laser processing of an object in an embodiment of the present application is shown. Figure 2 As shown, the object surface fitting method for laser processing includes the following steps S100 to S300.
[0055] S100: Acquire marking point data corresponding to the surface to be processed, where the marking point data indicates the positions of marking points arranged in an array on the surface to be processed.
[0056] Among them, the marking point data is obtained by measuring the surface to be processed by the data acquisition device, and the marking point data includes the position data of multiple marking points, and the multiple marking points are arranged in an array on the surface to be processed. In the embodiment of the present application, the data acquisition device can be a device using infrared, structured light, tof (time of flight) technology, camera technology, etc. For example, the data acquisition device is an infrared ranging device that uses infrared to collect data, and the infrared ranging device can be assembled on the movable head of the CNC machine, and one or more infrared ranging devices can be assembled on the movable head. For example, the data acquisition device is a depth camera (including but not limited to structured light, TOF, binocular camera, etc.), the depth camera can be installed on the movable head of the CNC machine, and move with the movable head. The depth camera can also be installed in a fixed position of the CNC machine. It can be understood that as long as the marking point data can be obtained, the installation method and position of the depth camera are not limited here. It can be understood that both the infrared ranging device and the depth camera need to include a transmitting device for emitting light to measure the distance, so as to obtain the marking point data.
[0057] When the data acquisition device collects the marker point data, it can collect the marker point one by one, or collect multiple marker points, such as collecting the marker point data in a whole row, a whole column, or multiple rows and columns, which is not limited here.
[0058] In one embodiment of the present application, the process of obtaining the marking point data specifically includes: obtaining the first marking point data corresponding to the surface to be processed by a movable head at a first position in the workspace, wherein the movable head is slidably arranged on a slide rail of a numerical control machine, the slide rail includes a first rail and a second rail, and the first rail and the second rail are perpendicular to each other; driving the slide rail to move the movable head to a second position in the workspace, and obtaining the second marking point data corresponding to the surface to be processed by the movable head at the second position. The first marking point data and the second marking point data together constitute the marking point data in the present application.
[0059] In one embodiment of the present application, a numerically controlled machine includes a housing forming a working space, and a movable head moves within the working space to transmit electromagnetic energy.
[0060] In one embodiment of the present application, a numerically controlled machine transmits electromagnetic energy to a product to be processed that is at least partially located in a working space, and the electromagnetic energy transmitted to the product to be processed causes one or more changes to occur in the product to be processed.
[0061] Specifically, the CNC machine can be used with an external feeding component or a heightening component. When the CNC machine is connected with an external feeding component, the feeding component delivers at least part of the product to be processed into the working space through a conveying component such as a conveyor belt, so that the electromagnetic energy transmitted by the movable head in the CNC machine acts on the product to be processed. When the CNC machine is connected with an external heightening component, at least part of the product to be processed is located in the working space, and at least part of the product to be processed is located in the receiving space formed by the heightening component. The working space and the receiving space formed by the heightening component together form an expanded working space, which helps the CNC machine to process larger objects.
[0062] In one embodiment of the present application, the slide rail includes a first rail and a second rail, the first rail and the second rail are perpendicular to each other, the specified direction includes the row direction and the column direction of the marking point array, and the movable head moves through the first rail and the second rail to obtain the marking point data in the row direction and the column direction.
[0063] In one embodiment of the present application, the CNC machine includes an infrared sensor and / or a camera, and the infrared sensor and the camera are installed on the movable head, and the infrared sensor and the camera are used to obtain the marking point data.
[0064] In one embodiment of the present application, the slide rail includes a first rail and a second rail, the first rail and the second rail are perpendicular to each other, the specified direction includes the row direction and the column direction of the marking point array, and the movable head can be slidably connected to the first rail or the second rail to obtain the marking point data in the row direction and the column direction.
[0065] In one embodiment of the present application, the CNC machine includes an infrared distance measuring sensor, which is mounted on the movable head, and the infrared distance measuring sensor is used to obtain the marking point data; and / or;
[0066] The numerical control machine includes a depth camera, which is mounted on the movable head and is used to obtain the marking point data.
[0067] S200: Perform surface fitting according to the marked point data to obtain a three-dimensional model corresponding to the surface to be processed.
[0068] The obtained marking point data is fitted into lines or surfaces, and the object composed of the lines or surfaces is the three-dimensional model corresponding to the surface to be processed.
[0069] In one embodiment of the present application, the process of performing surface fitting based on the marker point data to obtain the three-dimensional model corresponding to the surface to be processed specifically includes: calculating the virtual marker point data in the specified direction in the marker point data based on the marker point data; fitting the three-dimensional model corresponding to the surface to be processed based on the virtual marker point data in the specified direction. Wherein, the specified direction includes the row direction and the column direction of the marker point array, then the virtual marker point data includes the first virtual marker point data corresponding to the row in the marker point data and the second virtual marker point data corresponding to the column in the marker point data. Combining these two kinds of virtual marker point data can constitute the three-dimensional model corresponding to the surface to be processed. Wherein, the surface of the three-dimensional model can be a plane or a curved surface, and the curvatures of each surface can be the same or different, which is not limited here.
[0070] In one embodiment of the present application, the first virtual marking point data includes multiple groups of first virtual marking points corresponding to each row; and the second virtual marking point data includes multiple groups of second virtual marking points corresponding to each column.
[0071] Specifically, obtain a virtual point creation function; divide the marker point data into rows and columns, and group each row and column in the marker point data based on a preset interval division unit (such as 4 marker points as a preset interval division unit); substitute the marker point data of each group into the virtual point creation function, and calculate the first virtual marker point data corresponding to the row in the marker point data and the second virtual marker point data corresponding to the column in the marker point data.
[0072] The virtual point creation function can be expressed according to the following formula (1):
[0073]
[0074] In the formula, tension is a constant between 0 and 1 (for example, 0.5), and the specific value is adjusted according to the actual application scenario and is not specifically limited here. If s0, s1, s2, and s3 are the marking point data of each group corresponding to the row, then by substituting the marking point data of each group corresponding to the row into the virtual point creation function, c0, c1, c2, and c3 are calculated, so that multiple groups of c0, c1, c2, and c3 corresponding to each row in the marking point data can be obtained, thereby obtaining the first virtual marking point data; if s0, s1, s2, and s3 are the marking point data of each group corresponding to the column, then by substituting the marking point data of each group corresponding to the column into the virtual point creation function, the corresponding c0, c1, c2, and c3 are calculated, so that multiple groups of c0, c1, c2, and c3 corresponding to each column in the marking point data can be obtained, thereby obtaining the second virtual marking point data.
[0075] For example, the marking points of each group corresponding to the row or column are PT1, PT2, PT3 and PT4, where s0 = PT1, s1 = PT2, s2 = PT3, s3 = PT4;
[0076] It should be noted here that, among the 4 marking points in the group where the first marking point of each row and column is located, the first marking point is reused; and among the 4 marking points in the group where the last marking point of each row and column is located, the last marking point is reused.
[0077] For example, the four marking points in the group where the first marking point of each row is located are PT1, PT1, PT2, PT3, where s0=PT1, s1=PT1, s2=PT2, s3=PT3; the four marking points in the group where the last marking point of each row is located are PT2, PT3, PT4, PT4, where s0=PT2, s1=PT3, s2=PT4, s3=PT4.
[0078] In one embodiment of the present application, fitting a three-dimensional model according to virtual marker data in a specified direction means fitting a three-dimensional model corresponding to the surface to be processed according to the first virtual marker data and the second virtual marker data. Specifically, the first virtual marker data and the second virtual point control data are respectively substituted into the following formula (2) to fit the three-dimensional model corresponding to the surface to be processed:
[0079] f(t)=B0(t)*c0+B1(t)*c1+B2(t)*c2+B3(t)*c3 (2)
[0080] In the formula, Among them, the value range of t is 0 to 1. The specific value is determined according to the actual application scenario and is not specifically limited here. f(t) is the fitted row two-dimensional curve or column two-dimensional curve. A three-dimensional model can be obtained by combining multiple row two-dimensional curves and multiple column two-dimensional curves.
[0081] S300: laser processing is performed on the surface to be processed according to the three-dimensional model.
[0082] Among them, a laser processing signal can be generated according to the three-dimensional model, and then the laser processing signal is used to control the CNC machine to process the surface to be processed according to the processed three-dimensional model.
[0083] In this embodiment, firstly, the marking point data corresponding to the surface to be processed of the product to be processed is obtained, and the marking point data is the position coordinates of the marking points arranged in an array on the surface to be processed; then, surface fitting is performed according to the marking point data to obtain the three-dimensional model corresponding to the surface to be processed; finally, according to the three-dimensional model, the surface to be processed is laser processed, so as to realize the three-dimensional modeling based on the marking point data of the surface to be processed, and then the scheme of laser processing based on the three-dimensional model is helpful to more intuitively reflect the morphological information and processing effect of the surface to be processed, and improve the accuracy of laser processing. In particular, the technical solution of the present application can be used in the field of laser engraving. Since most of the surfaces of laser engraved objects are relatively regular, the technical solution of the present application can construct a three-dimensional model through a small amount of point cloud data (i.e., a small amount of marking point data). The modeling effect of using a small amount of array points is not much different from the modeling effect of using a dense point cloud, so that the amount of data required for modeling can be reduced while ensuring the modeling effect, thereby improving the modeling efficiency.
[0084] In some optional implementations of this embodiment, Figure 3 FIG. 1 is a schematic diagram showing a process of obtaining virtual marker data provided by an embodiment of the present application. Figure 3 As shown, in step S200, calculating and obtaining virtual marking point data in a specified direction in the marking point data according to the marking point data includes the following steps S210 to S213.
[0085] S210: Sequentially obtain every two adjacent marking points of a marking point in each specified direction of the marking point data as the first marking point and the second marking point.
[0086] S211: sequentially obtain the marking points located before two adjacent marking points in each specified direction of the marking point data as the third marking point.
[0087] S212: sequentially obtain the marking points located after two adjacent marking points in each specified direction of the marking point data as the fourth marking point.
[0088] S213: Calculate and obtain virtual marking point data in a specified direction according to the first marking point, the second marking point, the third marking point and the fourth marking point.
[0089] Among them, when two adjacent marking points include the first marking point in the specified direction, the first marking point is used as the third marking point; when two adjacent marking points include the last marking point in the specified direction, the last marking point is used as the fourth marking point. In other words, the first marking point and the last marking point in the specified direction are reused. Based on this virtual marking point construction method, the minimum number of marking points in the specified direction can be 3, and the specified direction can be the row direction or column direction of the array corresponding to the marking point, so the matrix corresponding to the obtained marking point data can be a matrix of 3 rows and 3 columns at the minimum.
[0090] The first marking point, the second marking point, the third marking point and the fourth marking point can be substituted into formula (1) to calculate the virtual marking point data in the specified direction. It can be understood that when the specified direction is the row direction of the marking point array, the marking point calculated above is the marking point in the row direction, and when the specified direction is the column direction of the marking point array, the marking point calculated above is the marking point in the column direction.
[0091] In one embodiment of the present application, the virtual marker point data in the specified direction is used to fit a line segment in the specified direction. When fitting is not performed, the line segment is recorded as a line segment to be fitted, so that every 4 marker points can fit a line segment, and the line segment to be fitted includes a start point, an end point, and a virtual middle point between the start point and the end point. The process of calculating the virtual marker point data in the specified direction based on the first marker point, the second marker point, the third marker point, and the fourth marker point specifically includes: determining the start point and the end point of the line segment to be fitted from the first marker point, the second marker point, the third marker point, and the fourth marker point according to the type of the line segment to be fitted; for the virtual middle point other than the start point and the end point on the line segment to be fitted, the virtual middle point is calculated based on the marker points and virtual points adjacent to the virtual middle point.
[0092] The type of the line segment to be fitted is also called the property of the line segment to be fitted, including spline curves and Bezier curves. Based on the different types of the line segment to be fitted, the starting and ending points of the line segment to be fitted are different. The first marking point, the second marking point, the third marking point and the fourth marking point are control points on the curve to be fitted. When the curve to be fitted is a spline curve, the curve to be fitted itself does not pass through the first marking point and the fourth marking point. Therefore, the starting point of the curve to be fitted is the second marking point, and the end point is the third marking point. When the curve to be fitted is a Bezier curve, the curve to be fitted itself does not pass through the second marking point and the third marking point. Therefore, the starting point of the curve to be fitted is the first marking point, and the end point is the fourth marking point.
[0093] For virtual middle points other than the starting point and the end point on the line segment to be fitted, the virtual middle point can be calculated based on the front and back adjacent marked points of the marked point at the corresponding position and the virtual point creation function. As shown in the above formula (1), the formula (1) is the calculation method of each point on the curve to be fitted when the curve to be fitted is a spline curve, c0 is the starting point of the curve to be fitted, which is the second marked point s1; c3 is the end point of the curve to be fitted, which is the third marked point s2; c1 and c2 are virtual middle points on the curve to be fitted, the first virtual middle point c1 is calculated based on the front and back adjacent marked points of the second marked point s1 (the first marked point s0 and the third marked point s2) and the first virtual point creation function, and the second virtual middle point c2 is calculated based on the front and back adjacent marked points of the third marked point s2 (the second marked point s1 and the fourth marked point s3) and the second virtual point creation function. Wherein:
[0094] The first virtual point creation function is: C1 = (S2-S0)(tension / 3) + S2;
[0095] The second virtual point creation function is: C2 = (S1-S3)(tension / 3)+S2.
[0096] (S2-S0) represents the first difference between the third marking point and the first marking point, (tension / 3) represents the preset coefficient; (S1-S3) represents the second difference between the second marking point and the fourth marking point. The preset coefficient is the ratio of the preset tensor coefficient tension to the preset constant coefficient 3. The preset tensor coefficient tension is negatively correlated with the curvature of the three-dimensional model. That is, when other conditions remain unchanged, the larger the preset tensor coefficient tension, the smaller the curvature of the three-dimensional model. In the specific graph, it means that the curvature of the corresponding virtual midpoint is smaller, that is, the line or surface in the three-dimensional model is smoother at the virtual midpoint; the smaller the preset tensor coefficient tension, the larger the curvature of the three-dimensional model, that is, the line or surface in the three-dimensional model is sharper at the virtual midpoint. Figure 15-17 It reflects the change of the three-dimensional model when the preset tensor coefficient tension increases successively. It can be seen that after the preset tensor coefficient tension increases, the three-dimensional model becomes smoother, that is, the curvature decreases.
[0097] In order to better understand the above steps S210 to S212, Figure 4 As shown, a schematic diagram of the array arrangement of 3 rows*3 columns of marking point data on the surface to be processed is provided, and the 3 rows*3 columns of marking point data on the surface to be processed are represented by matrix (3):
[0098]
[0099] The marking point data contains three rows of marking points, among which, in the marking points of the first row, i.e., t1 t2 t3, t1 t2 are every two adjacent marking points of the marking points of the first row of the marking point data, t1 is the first marking point, and t2 is the second marking point. It should be noted here that, since t1 is the first marking point in the first row of marking points, the third marking point is t1, the fourth marking point is t3, and t2 t3 are also every two adjacent marking points of the marking points of the first row of the marking point data, t2 is the first marking point, and t3 is the second marking point. It should be noted here that, since t4 is the last marking point in the first row of marking points, the third marking point is t2, the fourth marking point is t4, and so on for the second row of marking points and the third row of marking points, which are not repeated here, thereby obtaining multiple groups of first virtual marking points, i.e., first virtual marking point data.
[0100] In this embodiment, by obtaining every two adjacent marking points in each row of marking points, the first marking point, the second marking point, the third marking point and the fourth marking point can be quickly determined, which is conducive to improving the efficiency of obtaining the first virtual marking point data, thereby facilitating improving the processing efficiency of processing the surface to be processed. In addition, by obtaining every two adjacent marking points in each row of marking points, the first marking point, the second marking point, the third marking point and the fourth marking point can be quickly determined, which is also conducive to ensuring that the multiple groups of first virtual marking points corresponding to each row in the first virtual marking point data are continuous, which is conducive to the subsequent fitting of the first virtual marking point data, and the fitted row two-dimensional curve is continuous and can be differentiable everywhere, which is conducive to improving the smoothness of the row two-dimensional curve, thereby facilitating improving the accuracy of the generated three-dimensional model, and then facilitating accurate processing of the surface to be processed.
[0101] In some optional implementations of this embodiment, Figure 5 FIG. 2 shows a schematic diagram of a process for obtaining second virtual marker data provided by an embodiment of the present application. Figure 5 As shown, in step S200, calculating the second virtual marking point data corresponding to the column in the marking point data according to the marking point data includes the following steps S220 to S223.
[0102] S220: Sequentially obtain every two adjacent marking points in each column of marking points of the marking point data as the fifth marking point and the sixth marking point.
[0103] S221: sequentially obtain the previous marking point of every two adjacent marking points in each column of marking point data as the seventh marking point.
[0104] S222: sequentially obtain the marking point next to every two adjacent marking points in each column of marking point data as the eighth marking point.
[0105] S223: Calculate and obtain second virtual marking point data according to the fifth marking point, the sixth marking point, the seventh marking point and the eighth marking point.
[0106] The fifth marking point, the sixth marking point, the seventh marking point and the eighth marking point can be substituted into formula (1) to calculate and obtain the second virtual marking point data.
[0107] In order to better understand the above steps S220 to S223, the matrix (3) in the previous embodiment is taken as an example, which represents the marking point data:
[0108] The marking point data contains three columns of marking points, among which, in the marking points of the first column, i.e., t1 t4 t7, t1 t4 are two adjacent marking points of the marking points of the first column of the marking point data, t1 is the fifth marking point, and t4 is the sixth marking point. It should be noted here that, since t1 is the first marking point in the marking points of the first column, the seventh marking point is t1, the eighth marking point is t7, and t4 t7 are also two adjacent marking points of the marking points of the first column of the marking point data, t4 is the fifth marking point, and t7 is the sixth marking point. It should be noted here that, since t7 is the last marking point in the marking points of the first column, the seventh marking point is t1, the fourth marking point is t7, and so on for the marking points of the second column and the marking points of the third column, which are not repeated here, thereby obtaining multiple groups of second virtual marking points, i.e., second virtual marking point data.
[0109] In this embodiment, by obtaining every two adjacent marking points in each column of marking points, the fifth marking point, the sixth marking point, the seventh marking point and the eighth marking point can be quickly determined, which is conducive to improving the efficiency of obtaining the second virtual marking point data, thereby facilitating improving the processing efficiency of processing the surface to be processed. In addition, by obtaining every two adjacent marking points in each column of marking points, the fifth marking point, the sixth marking point, the seventh marking point and the eighth marking point are quickly determined, which is also conducive to ensuring that the multiple groups of second virtual marking points corresponding to each column in the second virtual marking point data are continuous, which is conducive to the subsequent fitting of the second virtual marking point data, and the fitted column two-dimensional curve is continuous and can be differentiable everywhere, which is conducive to improving the smoothness of the column two-dimensional curve, thereby facilitating improving the accuracy of the generated three-dimensional model, and then facilitating accurate processing of the surface to be processed.
[0110] In some optional implementations of this embodiment, Figure 6 FIG. 1 is a schematic diagram showing a process of fitting a three-dimensional model provided in an embodiment of the present application. Figure 6 As shown, in step S200, fitting to obtain a three-dimensional model corresponding to the surface to be processed includes the following steps S310 to S312:
[0111] S310: Fitting the first virtual marker point data to obtain a plurality of two-dimensional curves.
[0112] The first virtual point data is substituted into the above formula (2) for fitting to obtain multiple two-dimensional curves.
[0113] For example, Figure 7 As shown, a schematic diagram of the fitting of a row two-dimensional curve is provided, PT1, PT2, PT3 and PT4 are a row of marked points in the marked point data, and the row of marked points is divided into a first group PT1, PT1, PT2 and PT3; a second group PT1, PT2, PT3 and PT4; a third group PT2, PT3, PT4 and PT4; each group is substituted into formula (1) to obtain three groups of first virtual marked points corresponding to the row of marked points, and each group of first virtual marked points is substituted into formula (2) to calculate the first segment curve fitting, the second segment curve fitting and the third end curve fitting, the end point of the first segment curve fitting is the starting point of the second segment curve fitting, and the end point of the second segment curve fitting is the starting point of the third segment curve fitting, thereby fitting to obtain a row two-dimensional curve.
[0114] S311: Fitting the second virtual marker data to obtain a plurality of two-dimensional curves.
[0115] The second virtual point data is substituted into the above formula (2) for fitting to obtain a plurality of column two-dimensional curves.
[0116] S312: Combining the plurality of row two-dimensional curves and the plurality of column two-dimensional curves to obtain a three-dimensional model corresponding to the surface to be processed.
[0117] Among them, since the marking points in the marking point data are arranged in an array on the surface to be processed, when multiple row two-dimensional curves are fitted according to the first virtual point data, and multiple column two-dimensional curves are fitted according to the second virtual point data, all the row two-dimensional curves and all the column two-dimensional curves are combined to form a grid surface, that is, the three-dimensional model corresponding to the surface to be processed.
[0118] like Figure 8 As shown, a structural schematic diagram of a three-dimensional model corresponding to the surface to be processed is provided. The three-dimensional model is a grid composed of a plurality of row two-dimensional curves fitted according to the first virtual point data and a plurality of column two-dimensional curves fitted according to the second virtual point data, that is, the three-dimensional model corresponding to the surface to be processed.
[0119] In this embodiment, since the multiple groups of first virtual marker points corresponding to each row in the first virtual marker point data are continuous, and the multiple groups of second virtual marker points corresponding to each column in the second virtual marker point data are continuous, the first virtual marker point data and the second virtual marker point data are fitted on this basis, which can ensure that the obtained multiple row two-dimensional curves and multiple column two-dimensional curves are continuous and differentiable everywhere, which is beneficial to improving the smoothness of the row two-dimensional curves and the column two-dimensional curves, thereby helping to improve the accuracy of the generated three-dimensional model, and further facilitating accurate processing of the processing surface.
[0120] In one embodiment of the present application, when fitting to obtain the three-dimensional model corresponding to the surface to be processed in step S200, it is first necessary to fit the virtual marking point data in each specified direction respectively to obtain the two-dimensional curves in each specified direction, and each two-dimensional curve in the specified direction is parallel and does not overlap; then, according to the two-dimensional curves in each specified direction, the three-dimensional model corresponding to the surface to be processed is obtained by combining. The specified direction includes the row direction and the column direction of the matrix, so the two-dimensional curve includes the row two-dimensional curve and the column two-dimensional curve.
[0121] In one embodiment of the present application, when generating a two-dimensional curve in a specified direction, firstly, a plurality of fitting coefficients are determined according to a subdivision parameter, and the subdivision parameter is positively correlated with the smoothness of the two-dimensional curve in the specified direction; then, according to each fitting coefficient and a preset fitting function, the virtual marking point data in the specified direction is calculated to obtain the fitting points corresponding to each fitting coefficient; finally, the fitting points corresponding to each fitting coefficient are fitted to obtain the two-dimensional curve in the specified direction. The subdivision parameter refers to the parameter into which the preset fitting coefficient value range is divided, and the preset fitting coefficient value range is the value range of multiple fitting coefficients. Generally, the preset fitting coefficient value range is [0,1]. For example, when the subdivision parameter is 5, the values of the multiple fitting coefficients t can be: 0.0, 0.2, 0.4, 0.6, 0.8, 1.0; when the subdivision parameter is 10, the values of the multiple fitting coefficients t can be: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0. It can be seen that the preset fitting coefficient values are evenly divided based on the subdivision parameters to obtain multiple fitting coefficients. Each fitting coefficient can calculate the corresponding fitting point, so the more fitting coefficients there are, the more fitting points there are, and the more points involved in the curve fitting, the smoother the curve will be. Therefore, the subdivision parameter is positively correlated with the smoothness of the two-dimensional curve in the specified direction, that is, the larger the subdivision parameter, the greater the smoothness of the two-dimensional curve in the specified direction, that is, the smoother the curve; the smaller the subdivision parameter, the smaller the smoothness of the two-dimensional curve in the specified direction, that is, the rougher the curve. Figure 18-Figure 20Schematic diagrams of two-dimensional curves obtained when the subdivision parameter is gradually increased are shown respectively. It can be seen that when the subdivision parameter is gradually increased, the smoothness of the two-dimensional curve is also gradually increased.
[0122] After obtaining multiple fitting coefficients, a preset fitting function is used for fitting calculation to obtain fitting points corresponding to each fitting coefficient. In one embodiment of the present application, the preset fitting function is the aforementioned formula (2), and formula (2) includes 4 coefficients, which are respectively recorded as the first function coefficient B0(t), the second function coefficient B1(t), the third function coefficient B2(t) and the fourth function coefficient B3(t). These 4 coefficients are calculated using corresponding coefficient functions, where the first coefficient function is B0(t)=1-3t+3t 2 -t 3 ; The second coefficient function is B1(t)=3t-6t 2 +3t 3 ; The third coefficient function is B2(t)=3t 2 -3t 3 ; The fourth coefficient function is B3(t)=t 3 ; The value range of t is the preset fitting coefficient value range [0,1]. For example, when t=0, substitute t=0 into the above four coefficient functions for calculation, and we can get the first function coefficient B0(0)=1, the second function coefficient B1(0)=0, the third function coefficient B2(0)=0 and the fourth function coefficient B3(0)=0 corresponding to t=0.
[0123] After obtaining the function coefficients corresponding to a fitting coefficient, substitute the function coefficients and the corresponding marking points into the above formula (2) to calculate the fitting points corresponding to the fitting coefficient. Finally, after obtaining the fitting points corresponding to the fitting coefficients, curve fitting is performed on all the fitting points to form a two-dimensional curve.
[0124] In some optional implementations of this embodiment, Fig. 9 FIG. 2 shows a schematic diagram of a process of fitting a two-dimensional curve provided by another embodiment of the present application. Fig. 9 As shown, in step S310, fitting the first virtual marker data to obtain multiple two-dimensional curves includes the following steps S3100 to S3101:
[0125] S3100: Obtain a preset first subdivision parameter and a first preset fitting function.
[0126] Among them, the first subdivision parameter belongs to the subdivision parameter in the row direction, which can be determined according to the actual application scenario and is not specifically limited here.
[0127] The first preset fitting function may be the formula (2) in the above embodiment, which will not be repeated here.
[0128] Assuming that the first subdivision parameter is 5, the value of t in formula (2) can be 0.0, 0.2, 0.4, 0.6, 0.8, 1.0;
[0129] Assuming that the first subdivision parameter is 10, the value of t in formula (2) can be 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0.
[0130] S3101: Fitting the first virtual marker point data according to the first subdivision parameter and the first preset fitting function to obtain a plurality of two-dimensional line curves.
[0131] Specifically, the first virtual marking point data and the first subdivision parameter are substituted into a first preset fitting function for fitting to obtain a plurality of two-dimensional line curves.
[0132] like Figure 10 to Figure 11 As shown, Fig.10 Provide 4 rows and 5 columns of first virtual marker data, where, assuming that the first subdivision parameter is 3, the values of t in formula (2) are 0.0, 0.33, 0.66, and 1.0. Substitute the values of the first virtual markers src_x[0], src_x[1], src_x[2], src_x[3], src_x[4] and t in each column into the first preset fitting function to obtain the following: Fig.11 The first virtual marking point data of 8 rows*5 columns is shown, and the first virtual marking points of each row are connected to obtain multiple row two-dimensional curves.
[0133] In this embodiment, by fitting the first virtual point control data according to the first subdivision parameter and the first preset fitting function, a plurality of row two-dimensional curves are obtained, which can ensure that the plurality of row two-dimensional curves obtained are continuous and differentiable everywhere, and the smoothness of the plurality of row two-dimensional curves can be accurately controlled according to the first subdivision parameter, which is beneficial to improve the accuracy of the generated three-dimensional model, and further beneficial to accurately process the processing surface.
[0134] In some optional implementations of this embodiment, Fig.12 FIG. 1 is a schematic diagram showing a flow chart of fitting a two-dimensional curve provided by an embodiment of the present application. Fig.12 As shown, in step S311, fitting the second virtual marker data to obtain a plurality of column two-dimensional curves includes the following steps S3110 to S3111:
[0135] S3110: Obtain a preset second subdivision parameter and a second preset fitting function.
[0136] The second subdivision parameter is a subdivision parameter in the column direction, which can be determined according to the actual application scenario and is not specifically limited here. The first subdivision parameter can be the same as or different from the second subdivision parameter.
[0137] The second preset fitting function may be the formula (2) in the above embodiment, which will not be repeated here.
[0138] Assuming that the second subdivision parameter is 5, the value of t in formula (2) can be 0.0, 0.2, 0.4, 0.6, 0.8, 1.0;
[0139] Assuming that the second subdivision parameter is 10, the value of t in formula (2) can be 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0.
[0140] S3111: Fit the second virtual marker point data according to the second subdivision parameter and the second preset fitting function to obtain a plurality of column two-dimensional curves.
[0141] Specifically, the second virtual marking point data and the second subdivision parameter are substituted into the second preset fitting function for fitting to obtain a plurality of column two-dimensional curves.
[0142] As shown in 13 to 14, a schematic diagram of the fitting of a two-dimensional curve is provided. Fig.13 The data shown is 8 rows and 5 columns of the second virtual marker data. Assuming that the first subdivision parameter is 4, the values of t in formula (2) are 0.0, 0.25, 0.5, 0.75, and 1.0. Substituting the values of the second virtual markers and t in each row into the second preset fitting function, the following is obtained: Fig.14 The second virtual marking point data of 8 rows*10 columns is shown, and the second virtual marking points of each column are connected to obtain multiple column two-dimensional curves.
[0143] It should be noted here that the larger the tension in formula (1), the larger the curvature of the fitted row two-dimensional curve and column two-dimensional curve, the larger the values of the first subdivision parameter and the second subdivision parameter, the smoother the fitted row two-dimensional curve and column two-dimensional curve, and the values of the first subdivision parameter and the second subdivision parameter may be equal or unequal.
[0144] For example, Figures 15 to 17 FIG. 1 shows a schematic diagram of the curvature change of the curve when the first subdivision parameter and the second subdivision parameter are fixed and the tension value gradually increases. Assuming that the first subdivision parameter and the second subdivision parameter are infinite, when the tension is 0, the curvature of the curve is as follows: Fig.15 As shown in Figure 2, when the tension is 0.6, the curvature of the curve is Fig.16As shown, when tension is 1, the curvature of the curve is Fig.16 As shown, it can be seen that when the first subdivision parameter and the second subdivision parameter are constant, the larger the value of tension is, the greater the curvature of the curve is;
[0145] For example, Figures 18 to 20 FIG. 1 shows a schematic diagram of the change in the smoothness of a curve when the tension value provided in an embodiment of the present application is fixed and the values of the first subdivision parameter and the second subdivision parameter are gradually increased. Assuming that the tension is 0.5 and the first subdivision parameter and the second subdivision parameter are 3, the smoothness of the curve is as follows: Fig.18 As shown, when the first subdivision parameter and the second subdivision parameter are 5, the smoothness of the curve is shown in 19, and when the first subdivision parameter and the second subdivision parameter are 100, the smoothness of the curve is shown in Fig. 20 As shown, it can be seen that when the tension is constant, the larger the first subdivision parameter and the second subdivision parameter are, the smoother the curve is.
[0146] In an embodiment, the second virtual point control data is fitted according to the second subdivision parameter and the second preset fitting function to obtain multiple columns of two-dimensional curves, which can ensure that the obtained multiple columns of two-dimensional curves are continuous and differentiable everywhere, and the smoothness of the multiple columns of two-dimensional curves can be accurately controlled according to the second subdivision parameter, which is beneficial to improve the accuracy of the generated three-dimensional model, and further facilitate accurate processing of the processing surface.
[0147] In one embodiment of the present application, after obtaining the three-dimensional model, the three-dimensional model can be visualized, and the user can intuitively observe the three-dimensional model of the surface to be processed through the visualization interface. At the same time, when the user is not satisfied with the visualization display effect of the three-dimensional model, the three-dimensional model can be adjusted through the visualization interface. Optionally, after the user adjusts the three-dimensional model, the laser processing equipment can obtain the adjustment information, and adjust the three-dimensional model according to the adjustment information to generate an adjusted three-dimensional model, and then perform laser processing on the surface to be processed according to the adjusted three-dimensional model.
[0148] In some optional implementations of this embodiment, Fig.21 FIG. 2 shows a schematic diagram of a process of laser processing a surface to be processed according to another embodiment of the present application. Fig.21 As shown, in step S300, processing the surface to be processed according to the three-dimensional model includes the following steps S410 to S412:
[0149] S410: Obtaining image information to be processed.
[0150] The image information to be processed may be a picture or a vector image, which has the same coordinate system as the coordinate system of the three-dimensional model.
[0151] S411: Mapping the image information to be processed to a three-dimensional model according to preset coordinate parameters to obtain a target model.
[0152] Among them, the preset coordinate parameters refer to the alignment coordinate points set on the three-dimensional model after the three-dimensional model is generated, so as to facilitate the mapping of the image information to be processed onto the three-dimensional model, thereby obtaining the target model. The preset coordinate parameters are set according to the actual application scenario and are not specifically limited here.
[0153] In one embodiment of the present application, the target model can be displayed through a visual interface, the user can adjust the target model through the visual interface, and the CNC machine can generate an adjusted target model based on the adjustment information.
[0154] S412: Processing the surface to be processed according to the target model.
[0155] Specifically, after the target model is obtained, the surface to be processed is processed by controlling a numerical control machine (such as a laser printer, a laser engraving machine, etc.) based on preset processing parameters (such as power, speed) and the target model.
[0156] In this embodiment, the target model is obtained by mapping the image information to be processed on the three-dimensional model, and then the surface to be processed is processed according to the target model. This is conducive to using a CNC machine to process the surface to be processed according to the image information to be processed on the target model, thereby improving the efficiency and accuracy of processing the surface to be processed.
[0157] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0158] In one embodiment, a surface fitting device for laser processing is provided, which corresponds to the method in the above embodiment. For details not disclosed in the device embodiment of the present application, please refer to the above method embodiment of the present application. Fig. 22 As shown, the object surface fitting device for laser processing includes:
[0159] The data acquisition module 30 is used to acquire the marking point data corresponding to the surface to be processed, and the marking point data indicates the positions of the marking points arranged in an array on the surface to be processed.
[0160] The data fitting module 31 is used to perform surface fitting according to the marking point data to obtain a three-dimensional model corresponding to the surface to be processed.
[0161] The processing module 32 is used to perform laser processing on the surface to be processed according to the three-dimensional model.
[0162] Optionally, the data fitting module 31 includes:
[0163] A virtual point acquisition unit, configured to calculate, based on the marking point data, virtual marking point data in a specified direction in the marking point data, wherein the specified direction includes a row direction and a column direction of the marking point array;
[0164] The fitting unit is used to fit the three-dimensional model corresponding to the surface to be processed according to the virtual marking point data in the specified direction.
[0165] Optionally, the virtual point acquisition unit is specifically used to:
[0166] Sequentially obtain every two adjacent marking points of a marking point in each specified direction of the marking point data as a first marking point and a second marking point;
[0167] Acquire a marking point located before the two adjacent marking points in each specified direction of the marking point data as a third marking point; wherein, when the two adjacent marking points include a first marking point in the specified direction, the first marking point is taken as the third marking point;
[0168] Acquire a marking point located after the two adjacent marking points in each specified direction of the marking point data as a fourth marking point; wherein, when the two adjacent marking points include the last marking point in the specified direction, the last marking point is taken as the fourth marking point;
[0169] According to the first marking point, the second marking point, the third marking point and the fourth marking point, the virtual marking point data in the specified direction is calculated. Optionally, the virtual marking point data includes the starting point, the end point and the virtual middle point of the line segment to be fitted; the virtual point acquisition unit is specifically used to:
[0170] Determine a start point and an end point of the line segment to be fitted from the first marking point, the second marking point, the third marking point and the fourth marking point according to the type of the line segment to be fitted;
[0171] For a virtual middle point on the line segment to be fitted except the starting point and the end point, the virtual middle point is calculated according to a marking point adjacent to the virtual middle point and a virtual point creation function.
[0172] Optionally, the type of the line segment to be fitted is a spline curve; the virtual middle point includes a first virtual middle point and a second virtual middle point; and the virtual point acquisition unit is specifically used to:
[0173] Using the second marked point as the starting point of the line segment to be fitted, and using the third marked point as the end point of the line segment to be fitted;
[0174] The step of calculating the virtual middle point on the line segment to be fitted, for the virtual middle point other than the starting point and the end point, by creating a function based on the marking points adjacent to the virtual middle point and the virtual point, comprises:
[0175] Creating a function according to the first marking point, the third marking point and the first virtual point, and calculating a first virtual middle point;
[0176] A function is created according to the second marking point, the third marking point, the fourth marking point and the second virtual point to calculate and obtain a second virtual middle point.
[0177] Optionally, the virtual point acquisition unit is specifically used to:
[0178] Calculating a first difference between the third marking point and the first marking point, calculating a first ratio of the first difference to a preset coefficient, and superimposing the first ratio with the third marking point to obtain the first virtual middle point;
[0179] A second difference between the second marking point and the fourth marking point is calculated, a second ratio of the second difference to the preset coefficient is calculated, and the second ratio is superimposed on the third marking point to obtain the second virtual intermediate point.
[0180] Optionally, the preset coefficient is a ratio of a preset tensor coefficient to a preset constant coefficient, and the preset tensor coefficient is negatively correlated with the curvature of the three-dimensional model. Optionally, the fitting unit is specifically used for:
[0181] Fitting the virtual marking point data in each of the specified directions respectively to obtain a two-dimensional curve in each of the specified directions;
[0182] According to the two-dimensional curves in the specified directions, a three-dimensional model corresponding to the surface to be processed is obtained by combining them.
[0183] Optionally, the fitting unit is specifically used for:
[0184] Determining a plurality of fitting coefficients according to a subdivision parameter, wherein the subdivision parameter is positively correlated with the smoothness of the two-dimensional curve in the specified direction;
[0185] According to each of the fitting coefficients and the preset fitting function, the virtual marking point data in the specified direction is calculated to obtain the fitting point corresponding to each of the fitting coefficients;
[0186] Fitting is performed on the fitting points corresponding to the fitting coefficients to obtain a two-dimensional curve in the specified direction.
[0187] Optionally, the fitting unit is specifically used for:
[0188] Calculating the fitting coefficients based on the first coefficient function, the second coefficient function, the third coefficient function and the fourth coefficient function respectively to obtain first function coefficients, second function coefficients, third function coefficients and fourth function coefficients;
[0189] The first function coefficient, the second function coefficient, the third function coefficient and the fourth function coefficient are substituted into the preset fitting function, and the virtual marking point data in the specified direction is calculated based on the fitting function corresponding to the fitting coefficient to obtain the fitting point corresponding to each fitting coefficient.
[0190] Optionally, the processing module 32 is specifically used for
[0191] Visually displaying the three-dimensional model to obtain adjustment information of the three-dimensional model based on the visual display effect; and / or;
[0192] Adjusting the three-dimensional model according to the adjustment information to generate an adjusted three-dimensional model;
[0193] The surface to be processed is laser processed according to the adjusted three-dimensional model.
[0194] Optionally, the processing module 32 is specifically used for:
[0195] Obtaining image information to be processed;
[0196] According to preset coordinate parameters, the image information to be processed is mapped to the adjusted three-dimensional model to obtain a target model;
[0197] According to the target model, laser processing is performed on the surface to be processed.
[0198] Optionally, the data acquisition module 30 is specifically used for:
[0199] Acquiring first marking point data corresponding to the surface to be processed by a movable head at a first position in a workspace, wherein the movable head is slidably disposed on a slide rail of a numerical control machine, the slide rail comprising a first rail and a second rail, the first rail and the second rail being perpendicular to each other;
[0200] The slide rail is driven to move the movable head to a second position in the workspace, and second marking point data corresponding to the surface to be processed is acquired through the movable head at the second position.
[0201] Optionally, the working space is included in a housing of the numerically controlled machine, and the movable head moves back and forth in the working space to transmit electromagnetic energy.
[0202] Optionally, the CNC machine transmits electromagnetic energy to the product to be processed that is at least partially located in the working space, and the electromagnetic energy transmitted to the product to be processed causes one or more changes to occur in the product to be processed.
[0203] Optionally, the slide rail includes a first rail and a second rail, the first rail and the second rail are perpendicular to each other, the specified direction includes the row direction and the column direction of the marking point array, and the movable head can be slidably connected to the first rail or the second rail to obtain the marking point data in the row direction and the column direction.
[0204] Optionally, the CNC machine includes an infrared distance measuring sensor, which is mounted on the movable head and is used to obtain the marking point data; and / or;
[0205] The CNC machine includes a depth camera, which is mounted on the movable head and used to obtain the marking point data.
[0206] The meaning of "first" and "second" in the above modules / units is only to distinguish different modules / units, and is not used to define which module / unit has a higher priority or other limiting meanings. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods when implemented in actual applications.
[0207] For the specific definition of the object surface fitting device for laser processing, please refer to the definition of the object surface fitting method for laser processing above, which will not be repeated here. Each module in the above-mentioned object surface fitting device for laser processing can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0208] In one embodiment, please refer to Fig.23 , Fig.23 A schematic diagram of the structure of a CNC machine provided in one embodiment of the present application.
[0209] In this embodiment, the CNC machine 5 also includes a shell 53, a working space is formed in the shell 53, and the movable head moves in the working space to transmit electromagnetic energy. The movable head can be slidably arranged on the slide rail of the CNC machine, and the slide rail includes a first track 52 and a second track 51. The first track 52 is accommodated in the working space of the shell 53 and is carried by the shell 53. The first track 52 is connected with the movable head 10, and the movable head 10 moves along the first track 52 in the first direction D1 and the opposite direction thereof, so as to realize the movable head 10 moving in the first direction D1 to process the workpiece. Among them, the first direction D1 is the direction in which the movable head 10 can move relative to the first track 52 after being connected with the first track 52.
[0210] The second rail 52 is accommodated in the working space of the housing 53 and is carried by the housing 53, and the first rail 51 is slidably connected with the second rail 52, and the first rail 52 can slide relative to the second rail 51 along the extension direction of the second rail 51. The second rail 52 can drive the movable head 10 to move along the first rail 51 in the third direction D3 and the opposite direction thereof, so as to realize the movable head 10 moving in the third direction D3 to process the workpiece. The third direction D3 is the direction in which the first rail 51 and the second rail 52 can move relative to each other after being matched and connected.
[0211] In addition, the CNC machine further includes a cover plate 54, which is made of a transparent material so that the operator can observe the working condition of the bearing assembly 10 through the cover plate 54, and can filter and block the laser to prevent the laser from causing harm to the operator. For example, the material of the cover plate 54 can be, but is not limited to, polycarbonate, optical resin, or polymethyl methacrylate.
[0212] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.24 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the surface fitting method of an object for laser processing. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a surface fitting method of an object for laser processing is implemented.
[0213] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the object surface fitting method for laser processing in the above embodiment are implemented, such as Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the object surface fitting device for laser processing in the above embodiment are realized, for example Fig. 22 The functions of the modules 30 to 32 are shown in Figure 1. To avoid repetition, they will not be described here.
[0214] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0215] The memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc.
[0216] The memory may be integrated into the processor or provided separately from the processor.
[0217] In one embodiment of the present application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned object surface fitting method for laser processing. In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0218] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0219] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the object surface fitting method for laser processing in the above embodiment are implemented, such as Figure 2 Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the surface fitting device for laser processing in the above-mentioned embodiment are realized, for example, Fig. 22 The functions of the modules 30 to 32 are shown in Figure 1. To avoid repetition, they will not be described here.
[0220] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0221] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0222] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A surface fitting method for laser processing, characterized in that: The method comprises: Acquire marking point data corresponding to the surface to be processed, wherein the marking point data indicates positions of marking points arranged in an array on the surface to be processed; Perform surface fitting according to the marking point data to obtain a three-dimensional model corresponding to the surface to be processed; According to the three-dimensional model, laser processing is performed on the surface to be processed.
2. The object surface fitting method according to claim 1, characterized in that: The step of performing surface fitting according to the marking point data to obtain a three-dimensional model corresponding to the surface to be processed includes: According to the marking point data, virtual marking point data in a specified direction in the marking point data is calculated; According to the virtual marking point data in the specified direction, a three-dimensional model corresponding to the surface to be processed is obtained by fitting.
3. The object surface fitting method for laser processing according to claim 2, characterized in that: The step of calculating, based on the marking point data, virtual marking point data in a specified direction in the marking point data comprises: Sequentially obtain every two adjacent marking points of a marking point in each specified direction of the marking point data as a first marking point and a second marking point; Acquire a marking point located before the two adjacent marking points in each specified direction of the marking point data as a third marking point; wherein, when the two adjacent marking points include a first marking point in the specified direction, the first marking point is taken as the third marking point; Acquire a marking point located after the two adjacent marking points in each specified direction of the marking point data as a fourth marking point; wherein, when the two adjacent marking points include the last marking point in the specified direction, the last marking point is taken as the fourth marking point; The virtual marking point data in the specified direction is calculated based on the first marking point, the second marking point, the third marking point and the fourth marking point.
4. The object surface fitting method for laser processing according to claim 3, characterized in that: The virtual marking point data includes the starting point, the end point and the virtual middle point of the line segment to be fitted; The step of calculating the virtual marking point data according to the first marking point, the second marking point, the third marking point and the fourth marking point includes: Determine a start point and an end point of the line segment to be fitted from the first marking point, the second marking point, the third marking point and the fourth marking point; For a virtual middle point on the line segment to be fitted except the starting point and the end point, a function is created according to the marking points adjacent to the virtual middle point and the virtual point to calculate the virtual middle point.
5. The object surface fitting method for laser processing according to claim 4, characterized in that: The virtual middle point includes a first virtual middle point and a second virtual middle point; The determining the starting point and the end point of the to-be-fitted line segment from the first marking point, the second marking point, the third marking point, and the fourth marking point comprises: Using the second marked point as the starting point of the line segment to be fitted, and using the third marked point as the end point of the line segment to be fitted; The step of calculating the virtual middle point on the line segment to be fitted, for the virtual middle point other than the starting point and the end point, by creating a function based on the marking points adjacent to the virtual middle point and the virtual point, comprises: Creating a function according to the first marking point, the third marking point and the first virtual point, and calculating a first virtual middle point; A function is created according to the second marking point, the third marking point, the fourth marking point and the second virtual point to calculate and obtain a second virtual middle point.
6. The object surface fitting method for laser processing according to claim 5, characterized in that: The step of creating a function according to the first marking point, the third marking point and the first virtual point to calculate and obtain a first virtual intermediate point includes: Calculating a first difference between the third marking point and the first marking point, calculating a first ratio of the first difference to a preset coefficient, and superimposing the first ratio with the third marking point to obtain the first virtual middle point; The step of creating a function according to the second marking point, the third marking point, the fourth marking point and the second virtual point to calculate and obtain a second virtual intermediate point comprises: A second difference between the second marking point and the fourth marking point is calculated, a second ratio of the second difference to the preset coefficient is calculated, and the second ratio is superimposed on the third marking point to obtain the second virtual intermediate point.
7. The object surface fitting method for laser processing according to claim 6, characterized in that: The preset coefficient is a ratio of a preset tensor coefficient to a preset constant coefficient, and the preset tensor coefficient is negatively correlated with the curvature of the three-dimensional model.
8. The object surface fitting method for laser processing according to claim 2, characterized in that: The fitting of the three-dimensional model corresponding to the surface to be processed according to the virtual marking point data in the specified direction includes: Fitting the virtual marking point data in each of the specified directions respectively to obtain a two-dimensional curve in each of the specified directions, wherein each of the two-dimensional curves in the specified directions is parallel and does not overlap; According to the two-dimensional curves in the specified directions, a three-dimensional model corresponding to the surface to be processed is obtained by combining them.
9. The object surface fitting method for laser processing according to claim 8, characterized in that: The step of fitting the virtual marking point data in each of the specified directions to obtain a two-dimensional curve in each of the specified directions comprises: Determining a plurality of fitting coefficients according to a subdivision parameter, wherein the subdivision parameter is positively correlated with the smoothness of the two-dimensional curve in the specified direction; According to each of the fitting coefficients and the preset fitting function, the virtual marking point data in the specified direction is calculated to obtain the fitting point corresponding to each of the fitting coefficients; Fitting is performed on the fitting points corresponding to the fitting coefficients to obtain a two-dimensional curve in the specified direction.
10. The object surface fitting method for laser processing according to claim 9, characterized in that: The preset fitting function includes a first coefficient function, a second coefficient function, a third coefficient function and a fourth coefficient function, and the virtual marking point data in the specified direction is calculated according to each of the fitting coefficients and the preset fitting function, including: Calculating the fitting coefficients based on the first coefficient function, the second coefficient function, the third coefficient function and the fourth coefficient function respectively to obtain first function coefficients, second function coefficients, third function coefficients and fourth function coefficients; The first function coefficient, the second function coefficient, the third function coefficient and the fourth function coefficient are substituted into the preset fitting function, and the virtual marking point data in the specified direction is calculated based on the fitting function corresponding to the fitting coefficient to obtain the fitting point corresponding to each fitting coefficient.
11. The object surface fitting method for laser processing according to claim 1, characterized in that: The laser processing of the surface to be processed according to the three-dimensional model comprises: Visually displaying the three-dimensional model to obtain adjustment information of the three-dimensional model based on the visual display effect; and / or; Adjusting the three-dimensional model according to the adjustment information to generate an adjusted three-dimensional model; The surface to be processed is laser processed according to the adjusted three-dimensional model.
12. The object surface fitting method for laser processing according to claim 11, characterized in that: The laser processing of the surface to be processed according to the adjusted three-dimensional model comprises: Obtaining image information to be processed; According to preset coordinate parameters, the image information to be processed is mapped to the adjusted three-dimensional model to obtain a target model; According to the target model, laser processing is performed on the surface to be processed.
13. The object surface fitting method for laser processing according to claim 2, characterized in that: The step of obtaining the marking point data corresponding to the surface to be processed includes: Acquiring first marking point data corresponding to the surface to be processed by a movable head at a first position in a workspace, wherein the movable head is slidably disposed on a slide rail of a numerical control machine; The slide rail is driven to move the movable head to a second position in the workspace, and second marking point data corresponding to the surface to be processed is acquired through the movable head at the second position.
14. The object surface fitting method for laser processing according to claim 13, characterized in that: The numerically controlled machine includes a housing forming the working space in which the movable head moves to transfer electromagnetic energy.
15. The object surface fitting method for laser processing according to claim 13 or 14, characterized in that: The numerically controlled machine transmits electromagnetic energy to a product to be processed that is at least partially located in a working space, and the electromagnetic energy transmitted to the product to be processed causes one or more changes to occur in the product to be processed.
16. The object surface fitting method for laser processing according to claim 13, characterized in that: The slide rail includes a first rail and a second rail, the first rail and the second rail are perpendicular to each other, the specified direction includes the row direction and the column direction of the marking point array, and the movable head can be slidably connected to the first rail or the second rail to obtain the marking point data in the row direction and the column direction.
17. The object surface fitting method for laser processing according to claim 13, characterized in that: The CNC machine comprises an infrared distance measuring sensor, which is mounted on the movable head and is used to obtain the marking point data; and / or; The numerical control machine includes a depth camera, which is mounted on the movable head and is used to obtain the marking point data.
18. A numerically controlled machine, characterized in that: The CNC machine comprises: Slide rails; a movable head, the movable head being slidably disposed on the slide rail; A communication component, the communication component is used to receive a laser processing signal for laser processing a surface to be processed obtained by the method according to any one of claims 1 to 17; and A controller is provided for controlling the movable head to move on the slide rail to process the material to be processed based on the laser processing signal.
19. A computing system, characterized in that: The computing system includes at least one numerically controlled machine and at least one processor; The processor is used to perform the steps of the method according to any one of claims 1 to 17; The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the laser processing signal obtained by the processor.
20. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the object surface fitting method for laser processing as claimed in any one of claims 1 to 17.
