Curved surface engraving control method based on laser engraving machine
By collecting the intersection data of rectangular grids in a planar coordinate system in a laser engraving machine, performing parametric calculations, establishing a surface fitting model, and determining the three-dimensional engraving trajectory, the problem of engraving irregular curved objects in existing technologies is solved, and efficient automatic engraving is achieved.
Patent Information
- Application Number
- CN202511419754.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-09-30
AI Technical Summary
Existing laser engraving technology has difficulty in automatically engraving irregular curved surfaces, resulting in low engraving efficiency.
By using the intersection points of rectangular grids as acquisition points in the planar coordinate system of the surface to be processed, discrete point data is collected and parametric calculations are performed to establish a surface fitting model, obtain a preset engraving image, determine the three-dimensional engraving trajectory, and control the laser engraving machine to engrave according to the engraving trajectory.
It enables automatic carving of irregular curved surfaces, improving carving efficiency.
Smart Images

Figure CN120885883A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser engraving technology, and in particular to a method for controlling curved surface engraving based on a laser engraving machine. Background Technology
[0002] Laser engraving machines are devices that use lasers to engrave materials, improving engraving efficiency and producing smooth, rounded surfaces. However, current laser engraving technology typically only supports engraving planar patterns, making automated engraving of irregular surfaces difficult. Therefore, existing laser engraving technology still faces the challenge of engraving irregular curved surfaces. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a surface engraving control method based on a laser engraving machine, which can realize automatic engraving of irregular curved objects and improve the engraving efficiency of irregular curved objects.
[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows: In a first aspect, embodiments of the present invention provide a surface engraving control method based on a laser engraving machine, comprising: In the processing area of the curved surface object to be processed, the intersection points of the planar rectangular grid in the planar coordinate system are used as the acquisition points to collect discrete point data; wherein, the discrete point data includes the planar coordinate data and height data of the acquisition points; Parametric calculations are performed on the discrete point data of each set of intersection points along the horizontal axis in the planar coordinate system to obtain a first virtual data sequence. Parametric calculations are performed on the discrete point data of each set of discrete points along the vertical axis in the planar coordinate system to obtain a second virtual data sequence. In this sequence, the vertical coordinates of each discrete point in each set of discrete points along the horizontal axis are equal, and the horizontal coordinates of each discrete point in each set of discrete points along the vertical axis are equal. Based on the first virtual data sequence and the second virtual data sequence, a surface fitting model for the region to be processed is determined. Obtain a preset carving image, and determine the three-dimensional carving trajectory based on the preset carving image and the surface fitting model; The laser of the laser engraving machine is controlled to engrave the area to be processed according to the three-dimensional engraving trajectory, so as to form the preset engraving image in the area to be processed.
[0005] Furthermore, this embodiment of the invention provides a first possible implementation of the first aspect, wherein determining the surface fitting model of the region to be processed based on the first virtual data sequence and the second virtual data sequence includes: Based on the first virtual data sequence and the second virtual data sequence, a virtual data relationship set matrix is obtained; Surface fitting is performed based on the virtual data relationship set matrix to determine the surface fitting model of the region to be processed.
[0006] Furthermore, this embodiment of the invention provides a second possible implementation of the first aspect, wherein, before performing parameterized calculations on the discrete point data of each set of intersection points along the horizontal axis in the planar coordinate system, the method further includes: Based on the height data, additional collection points are added to the area to be processed, and discrete point data is collected from the additional collection points.
[0007] Furthermore, this embodiment of the invention provides a third possible implementation of the first aspect, wherein supplementing the collection points in the area to be processed based on each of the height data, and collecting discrete point data from the supplemented collection points, includes: Based on the height information, calculate the height difference between every two adjacent collection points in the horizontal axis direction; when the height difference between any two adjacent collection points in the horizontal axis direction is greater than a preset height difference threshold, add a new collection point between the two collection points whose height difference is greater than the preset height difference threshold, and collect the discrete point data for the new collection point; And / or, The height difference between any two adjacent acquisition points along the vertical axis is calculated based on the height information of each discrete point. When the height difference between any two adjacent acquisition points along the vertical axis is greater than a preset height difference threshold, a new acquisition point is added between the two acquisition points whose height difference is greater than the preset height difference threshold, and the discrete point data is acquired at the new acquisition point.
[0008] Furthermore, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein supplementing the collection points in the area to be processed based on each of the height data, and collecting discrete point data from the supplemented collection points, includes: Calculate the height difference between two adjacent vertices of each rectangle in the rectangular grid, and record at least two rectangles whose height difference is greater than a preset height difference threshold as target rectangles; New collection points are added within the target rectangle, and discrete point data is collected at the new collection points.
[0009] Furthermore, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein supplementing the collection points in the area to be processed based on each of the height data, and collecting discrete point data from the supplemented collection points, includes: Calculate the height difference between any two adjacent sampling points in the rectangular grid; The number of collection points whose height difference is greater than a preset height difference threshold is counted, or the percentage of height differences greater than the preset height difference threshold among all the calculated height differences is counted. When the number of discrete points is greater than a first preset number, or when the proportion is greater than a preset ratio, new collection points are added between every two collection points and inside each rectangle of the rectangular grid, and the discrete point data is collected from the added collection points.
[0010] Furthermore, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein supplementing the collection points in the area to be processed based on each of the height data, and collecting discrete point data from the supplemented collection points, includes: When the number of height differences greater than the preset height difference threshold in the horizontal direction is greater than a second preset number, and the number of height differences greater than the preset height difference threshold in the vertical direction is greater than a third preset number, new collection points are uniformly added in the processing area, and discrete point data is collected from the added collection points.
[0011] Furthermore, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein supplementing the collection points in the area to be processed based on each of the height data, and collecting discrete point data from the supplemented collection points, includes: The matrix grid within the area to be processed is divided into multiple grid regions; Calculate the height difference between any two adjacent sampling points in each of the grid regions; Count the number of collection points in each grid region where the height difference is greater than a preset height difference threshold, and record the grid region where the number of collection points is greater than a fourth preset number as the target grid region; New acquisition points are added between every two acquisition points in the target grid area, and discrete point data are acquired at the added acquisition points.
[0012] Furthermore, this embodiment of the invention provides an eighth possible implementation of the first aspect, wherein the step of performing surface fitting based on the virtual data relationship set matrix to obtain a surface fitting model of the region to be processed includes: The equation relationship between the measurement points and control points of the surface fitting model is determined based on the virtual data relationship set matrix. Based on the equation relationship between the measurement point and the control point, an optimization algorithm is used to determine the optimal solution of the control point coordinates, thereby obtaining the surface fitting model; wherein, the surface fitting model is a cubic B-spline surface model.
[0013] Furthermore, this embodiment of the invention provides a ninth possible implementation of the first aspect, wherein obtaining a preset sculpted image and determining a three-dimensional sculpting trajectory based on the preset sculpted image and the surface fitting model includes: A two-dimensional planar path for carving is generated based on the preset carving image, and the two-dimensional planar path is projected onto the surface fitting model to form a three-dimensional carving trajectory.
[0014] This invention provides a surface engraving control method based on a laser engraving machine. The method includes: collecting discrete point data in the processing area of the surface object, using the intersection points of planar rectangular grids in a planar coordinate system as acquisition points; wherein the discrete point data includes the planar coordinate data and height data of the acquisition points; parametrically calculating the discrete point data of each set of intersection points along the horizontal axis of the planar coordinate system to obtain a first virtual data sequence; parametrically calculating the discrete point data of each set of discrete points along the vertical axis of the planar coordinate system to obtain a second virtual data sequence; wherein the vertical coordinates of each discrete point in each set of discrete points along the horizontal axis are equal, and the horizontal coordinates of each discrete point in each set of discrete points along the vertical axis are equal; determining a surface fitting model for the processing area based on the first and second virtual data sequences; acquiring a preset engraving image; determining a three-dimensional engraving trajectory based on the preset engraving image and the surface fitting model; and controlling the laser of the laser engraving machine to engrave in the processing area according to the three-dimensional engraving trajectory to form the preset engraving image in the processing area. This invention uses the intersection points of planar rectangular grids in the coordinate system of the area to be processed of the curved surface object as the collected discrete point data, and calculates the parameters of the discrete point data to obtain a first virtual data sequence and a second virtual data sequence. This allows for the rapid and accurate establishment of a surface fitting model of the area to be processed based on multiple discrete point data. By determining the three-dimensional carving trajectory according to the preset carving image and the surface fitting model, and controlling the laser of the laser carving machine to carve in the area to be processed according to the three-dimensional carving trajectory, the invention can realize the automatic carving of irregular curved surfaces and improve the carving efficiency of irregular curved surfaces.
[0015] Other features and advantages of the embodiments of the present invention will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above in the embodiments of the present invention.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart of a surface engraving control method based on a laser engraving machine provided by an embodiment of the present invention is shown; Figure 2a This diagram illustrates a coordinate system establishment method provided by an embodiment of the present invention. Figure 2b A schematic diagram of a rectangular grid provided by an embodiment of the present invention is shown; Figure 3a This diagram illustrates a supplementary data collection point provided by an embodiment of the present invention. Figure 3b This diagram illustrates another supplementary data collection point provided by an embodiment of the present invention. Figure 3c This diagram illustrates another supplementary data collection point provided by an embodiment of the present invention. Figure 3d This diagram illustrates yet another supplementary data collection point provided by an embodiment of the present invention. Figure 3e This diagram illustrates a method for uniformly supplementing collection points according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The embodiments of the present invention will be described in detail below.
[0020] This embodiment provides a surface engraving control method based on a laser engraving machine. This method can be applied to the controller of a laser engraving machine. See [link to relevant documentation]. Figure 1 The flowchart shown is a surface engraving control method based on a laser engraving machine. This method mainly includes the following steps: Step S102: In the processing area of the surface object to be processed, the intersection of the planar rectangular grid in the planar coordinate system is used as the acquisition point to collect discrete point data. Establish a coordinate system in the processing area of the surface object to be processed, as shown in the example. Figure 2aThe diagram shown illustrates the establishment of a coordinate system. A coordinate system XY is established within the processing area of the surface object to be processed. (See figure...) Figure 2b The diagram shows a rectangular grid. A rectangular grid of a set size is drawn in the XY coordinate system. The size of the rectangular grid can be determined according to the number of discrete points to be collected. The smaller the size of the rectangular grid, the more discrete points can be collected.
[0021] The discrete point data mentioned above includes the planar coordinate data and height data of the acquisition points; the planar coordinate data of each intersection point of the planar rectangular grid in the planar coordinate system is obtained, and the height data of each intersection point of the planar rectangular grid is measured based on the height measurement device to obtain the discrete point data.
[0022] Step S104: Perform parameterized calculations on the discrete point data of each set of intersection points in the horizontal direction of the planar coordinate system to obtain the first virtual data sequence; perform parameterized calculations on the discrete point data of each set of discrete points in the vertical direction of the planar coordinate system to obtain multiple sets of parameter vectors in the horizontal direction, denoted as the second virtual data sequence. The discrete point data of each set of intersection points along the horizontal axis are parameterized using a chord length parameterization strategy or other parameterization methods to obtain multiple sets of parameter vectors along the vertical axis, denoted as the first virtual data sequence. The second virtual data sequence is obtained by parameterizing the discrete point data of each set of discrete points along the vertical axis using the same chord length parameterization strategy or other parameterization methods. In this sequence, the vertical coordinates of all discrete points in each set of discrete points along the horizontal axis are equal, and the horizontal coordinates of all discrete points in each set of discrete points along the vertical axis are equal. For example, suppose a certain set of X-directions The discrete points are (The ordinates of the discrete points in this set are the same), calculate the distance between two adjacent discrete points: The parameter values are obtained by accumulating them: Finally, the parameter vector in the X direction is obtained. The above parameterization calculations are performed on each set of discrete points to obtain a first virtual data sequence consisting of multiple sets of parameter vectors. Simultaneously, parameterization calculations are performed on each set of discrete points in the Y direction to obtain a second virtual data sequence consisting of multiple sets of parameter vectors.
[0023] Step S106: Based on the first virtual data sequence and the second virtual data sequence, determine the surface fitting model of the region to be processed; The first and second virtual data sequences are fitted with surfaces using a surface fitting algorithm to obtain a surface fitting model for the region to be processed. This surface fitting algorithm can be a Non-Uniform Rational B-Splines (NURBS) algorithm, and the surface fitting model can be a cubic B-spline surface model.
[0024] Step S108: Obtain a preset carving image, and determine the three-dimensional carving trajectory based on the preset carving image and the surface fitting model; The process involves obtaining a preset carving image of the area to be carved on the surface object, extracting a two-dimensional carving path from the preset carving image using a path extraction algorithm, and then converting the two-dimensional carving path into a three-dimensional surface fitting model to obtain the three-dimensional carving trajectory.
[0025] In one specific implementation, a planar two-dimensional path for carving trajectory is generated based on a preset carving image, and the planar two-dimensional path is projected onto a surface fitting model to form a three-dimensional carving trajectory.
[0026] The target sculpted image is converted into raster data through a rasterization algorithm, that is, the image is represented by a pixel matrix, where each pixel has a color value and position coordinates. The raster data is then converted into vector graphics, and features such as lines and contours in the image are extracted and represented by a sequence of vector coordinates.
[0027] The centerline path is extracted from the vector graphics using a centerline vectorization method (such as using relevant functions in ArcMap). This involves fitting spline curves to the extracted pixels, sampling points on the fitted curves, and transforming the points that originally had no topological relationship into a quadratic continuous curve position relationship, thus obtaining the planar two-dimensional path of the carving trajectory.
[0028] Obtain the coordinate transformation matrix between the two-dimensional preset carving image and the three-dimensional surface fitting model. Based on the coordinate transformation matrix, convert the coordinate points of the two-dimensional path in the plane into standardized surface node parameters. Then, calculate the three-dimensional path coordinates mapped onto the surface fitting model based on the curve fitting algorithm to obtain the three-dimensional carving trajectory.
[0029] Step S110: Control the laser of the laser engraving machine to engrave in the area to be processed according to the three-dimensional engraving trajectory, so as to form a preset engraving image in the area to be processed.
[0030] The laser of the laser engraving machine based on the three-dimensional engraving trajectory control performs laser processing and engraving on the area to be processed, so that the laser engraving trajectory follows the generated three-dimensional engraving trajectory until the preset engraved image is engraved in the area to be processed.
[0031] The surface engraving control method based on a laser engraving machine provided in this embodiment uses the intersection points of the planar rectangular grid in the coordinate system of the area to be processed of the surface object as the collected discrete point data, and calculates the parameters of the discrete point data to obtain a first virtual data sequence and a second virtual data sequence. This allows for the rapid and accurate establishment of a surface fitting model of the area to be processed based on multiple discrete point data. By determining the three-dimensional engraving trajectory according to the preset engraving image and the surface fitting model, the laser of the laser engraving machine is controlled to engrave in the area to be processed according to the three-dimensional engraving trajectory. This enables automatic engraving of irregular surface objects and improves the engraving efficiency of irregular surface objects.
[0032] In one implementation, this embodiment provides an implementation method for determining the surface fitting model of the region to be processed based on a first virtual data sequence and a second virtual data sequence. The specific steps are as follows: Step (1): Based on the first virtual data sequence and the second virtual data sequence, obtain the virtual data relationship set matrix; Based on each set of X-direction parameter vectors (i.e., the first virtual data sequence) and each set of Y-direction parameter vectors (i.e., the second virtual data sequence), assign parameter value data {x} in the X and Y directions to each discrete point. i,j} and {y i,j}, thus obtaining the parameter values (x) for each discrete point. i,j y i,j This forms a set of discrete point parameter values, resulting in a virtual data relationship set matrix.
[0033] Step (2): Perform surface fitting based on the virtual data relationship set matrix to determine the surface fitting model of the area to be processed.
[0034] By fitting a NURBS surface to a virtual data relationship set matrix, a surface fitting model for the region to be processed is obtained.
[0035] The system takes a set of spatial measurement points arranged in a two-dimensional array (a virtual data relationship set matrix) as input. By default, the measurement points are arranged in row-major order (i.e., from left to right, from top to bottom), and data is collected in a serpentine manner. The required B-spline surface order is set in the input parameters. A unified initial weight matrix is constructed, and the corresponding node vectors in the U and V directions are automatically generated (using clamped end-capping) to build the basic parameter structure required for the NURBS surface. After parameter initialization, a chord length parameterization strategy is used to estimate the parameter vectors of the input measurement points, and normalized parameter allocation is performed on the surface along the U and V directions respectively. To accurately calculate the control point coordinates, the basis function response weight relationship between each measurement point and each control point in the surface space is constructed, forming a coefficient matrix A. Based on the NURBS fundamental function formula S(u,v), this is transformed into a least-squares problem.
[0036] This embodiment solves for the X, Y, and Z coordinates in three-dimensional space independently, constructing a system of linear equations. The precise positions of the control point grid are then derived using normal equations, achieving a close fit to the three-dimensional measurement points. During the calculation of the B-spline basis functions, boundary value behavior at end nodes is considered to ensure numerical continuity and accuracy. After fitting, a sampling evaluation mechanism is implemented on the B-spline surface, generating a series of spatial path points within the defined parameter domain using a fixed step size. Simultaneously, a trajectory file (.NC) in standard G-code format is generated based on the sampling order, where the starting point is marked with a fast move (G0) and subsequent paths are output using linear interpolation (G1).
[0037] In one specific implementation, the equation relationship between the measurement points and control points of the surface fitting model is determined based on the virtual data relationship set matrix; Based on the equation relationship between the measurement points and the control points, an optimization algorithm is used to determine the optimal solution of the control point coordinates, resulting in a surface fitting model; wherein, the surface fitting model is a cubic B-spline surface model.
[0038] The measurement points Q of the surface fitting model are determined based on the virtual data relationship set matrix. i,j The parameter value (x) i,j y i,j ) and control point P i,j The equations relating the points are used to define node vectors U in the X direction and V in the Y direction. The proximity of the surface to the measurement points can be adjusted by regulating the spacing between nodes; increasing the spacing between adjacent nodes makes the surface closer to the measurement point corresponding to the next node. Based on the X and Y parameter vectors corresponding to each discrete point, discrete points or regions with excessive height differences are identified, and the node vectors are adjusted to make the surface closer to these discrete points or regions.
[0039] For each control point P i,j Determine a weight W i,j This forms a weight matrix W. The weight matrix W is initialized to 1 to ensure that all control points have the same influence on the surface. In the parameter value data {x i,j} and {y i,j For regions or discrete points with significant variations, the weights are increased, and the parameter values in the data {U} are... i,j} and {V i,j When the discrete points with significant variations are less than a set value, the weight is set to 1. Based on the parameter vectors in the X and Y directions corresponding to each discrete point, discrete points or regions with excessive height differences are identified, and their weights are increased to make the surface more closely fit the point / region.
[0040] Based on measurement point Qi,j The parameter value (x) i,j y i,j ), node vectors and weights W i,j Determine the measurement point Q i,j and control point P i,j The equation relationship between them; Based on each measurement point Q i,j The parameter value (x) i,j y i,j Given the node vectors, calculate the corresponding NURBS basis function values N. i,k (x) and M j,l (y), based on each basis function value N i,k (x) and M j,l (y) and weight W i,j Construct a coefficient matrix A, where each element in coefficient matrix A represents a measurement point Q. k With control point P k The weighting relationship between them.
[0041] The NURBS surface formula S(x,y) is obtained by passing through control point P. i,j Weight W i,j NURBS basis function value N i,k (x) and M j,l (y) defines a parametric surface, where k and l are the orders in the x and y directions, respectively, and i and j are the control point numbers in the x and y directions, respectively.
[0042] Based on the NURBS surface formula S(x,y), an equation relationship is established between the measurement points and control points. The NURBS surface formula S(x,y) can be of first, second, second, third, third, or fourth order. The higher the order, the greater the computational cost and the greater the impact of a single point on the surface. A suitable order can be selected by judging the gradient / height difference between two adjacent points in the X and Y directions.
[0043] Based on the equation relationship between the measurement point and the control point, determine the control point P. i,j The optimal solution. Control point P. i,j The optimal solution problem is transformed into a least-squares form, namely, minimizing the sum of squared errors between the measurement points and the fitted surface; an optimization algorithm is then used to solve for the control points P. i,j The optimal solution for the coordinates can be obtained using optimization algorithms such as least squares method, gradient descent method, Newton's method, conjugate gradient method, quasi-Newton method (such as BFGS), and trust region method. For example, the least squares method (such as Gauss-Newton method, Levenberg-Marquardt optimization algorithm, etc.) is used to solve for the coefficient matrix A and the coordinates of the measurement points to obtain the control point P. i,j The optimal solution for the coordinates.
[0044] In one implementation, U and V can be sampled within a defined parameter domain with a fixed step size to generate parameter values for each sampling point, based on the parameter values for each sampling point (u i v j ), use the B-spline surface formula to calculate the corresponding spatial coordinates S(u). i v j This process generates a series of spatial path points. Simultaneously, it generates a trajectory file (.NC) in standard G-code format based on the sampling order. The starting point can be marked using fast movement (G0), and subsequent paths are output using linear interpolation (G1). An alarm is triggered when the calculated surface gradient angle exceeds 45°.
[0045] In one embodiment, prior to step S104 above, the method provided in this embodiment further includes: Based on the height data, additional collection points are added to the area to be processed, and discrete point data is collected from the additional collection points.
[0046] Calculate the height difference ΔZ between every two adjacent discrete points in the X and Y directions based on the height data of the discrete points. See example... Figure 3a The diagram showing supplementary data collection points illustrates that when the height difference ΔZ between any two adjacent discrete points is large, supplementary data collection points are added within the measurement area, such as... Figure 3a As shown, a sampling point is added between two discrete points with a large height difference ΔZ (i.e., a sampling point is added on the grid line between the vertices of the two rectangular grids). Figure 3a The red dots in the diagram represent the added collection points, which means increasing the number of discrete collection points, obtaining the planar coordinate data and height data of the newly added collection points, and collecting the discrete point data of the new collection points.
[0047] By supplementing the sampling points based on the height difference of discrete points, new sampling points can be added between discrete points with large height differences, so that the generated surface fitting model is closer to the real surface shape of the object to be processed.
[0048] In one implementation, this embodiment provides six implementation methods for supplementing the data collection points in the area to be processed based on various height data, and for collecting discrete point data from the supplemented data collection points: Implementation method 1: Calculate the height difference between every two adjacent collection points in the horizontal axis direction based on the height information; when the height difference between any two adjacent collection points in the horizontal axis direction is greater than the preset height difference threshold, add a new collection point between the two collection points whose height difference is greater than the preset height difference threshold, and collect discrete point data for the new collection point. Calculate the height difference between every two adjacent discrete points in the X direction. When the height difference between two adjacent discrete points in the X direction is too large, add a new sampling point between the two sampling points whose height difference is greater than the preset height difference threshold, or add a new sampling point at the corresponding position in all X directions.
[0049] For example, see... Figure 3b The diagram shows another supplementary sampling point. If the height difference between the third and fourth sampling points in the X direction is greater than a preset height difference threshold, then new sampling points are added at corresponding positions in all X directions (i.e., between the third and fourth sampling points in the X direction). Figure 3b The red dots in the image represent the added data collection points.
[0050] Implementation Method 2: Calculate the height difference between every two adjacent acquisition points along the vertical axis based on the height information of each discrete point; when the height difference between any two adjacent acquisition points along the vertical axis is greater than a preset height difference threshold, add a new acquisition point between the two acquisition points whose height difference is greater than the preset height difference threshold, and collect discrete point data for the new acquisition point.
[0051] Calculate the height difference between every two adjacent discrete points in the Y direction. When the height difference between two adjacent discrete points in the Y direction is too large, add a new sampling point between the two sampling points whose height difference is greater than the preset height difference threshold, or add a new sampling point at the corresponding position in all Y directions.
[0052] For example, see... Figure 3c The diagram illustrates another method for supplementing data collection points. If the height difference between the third and fourth data collection points in the Y direction is greater than a preset height difference threshold, then new data collection points are added at corresponding positions in all Y directions (i.e., between the third and fourth data collection points in the Y direction). Figure 3c The red dots in the image represent the added data collection points.
[0053] Implementation Method 3: Calculate the height difference between two adjacent vertices of each rectangle in the rectangular grid, and record the rectangles with at least two height differences greater than a preset height difference threshold as target rectangles; Add new collection points within the target rectangle and collect discrete point data from these new collection points.
[0054] For each rectangle in the rectangular grid, calculate the height difference between every two adjacent vertices. When at least two height differences exceed a preset height difference threshold, see [example missing]. Figure 3d The diagram illustrates another method of supplementing collection points. New collection points are added to a rectangular area (such as on the four sides of a rectangular grid and / or at the center point of the rectangular grid) to increase the collection point density of the target rectangle. Figure 3dThe red dots in the diagram represent newly added data collection points. The planar coordinates and height data of these new data collection points are acquired, resulting in discrete point data for these new points.
[0055] Implementation Method 4: Calculate the height difference between every two adjacent sampling points in the rectangular grid; The number of collection points with height differences greater than a preset height difference threshold is counted, or the percentage of height differences greater than the preset height difference threshold is counted among all calculated height differences. When the number of discrete points is greater than the first preset number, or when the proportion is greater than the preset ratio, new collection points are added between every two collection points and inside each rectangle of the rectangular grid, and discrete point data is collected from the added collection points.
[0056] For each rectangle in the rectangular grid, calculate the height difference between every two adjacent vertices, and detect the number of sampling points with a height difference greater than a preset height difference threshold, or the proportion of height differences greater than the preset height difference threshold. When the number of discrete points is greater than a first preset number, or when the proportion is greater than a preset percentage, it indicates that there are many sampling points with large height differences, the sampling points in the processing area are sparsely distributed (or the side length setting of the rectangular grid is large), resulting in a large height difference between adjacent sampling points. See example... Figure 3e The diagram shows the uniform addition of sampling points. New sampling points are added between every two sampling points and within each rectangle of the rectangular grid. Figure 3e The red dots in the diagram represent newly added data collection points. The planar coordinates and height data of these new data collection points are acquired, resulting in discrete point data for these new points.
[0057] Implementation Method 5: When the number of height differences in the horizontal direction that are greater than the preset height difference threshold is greater than the second preset number, and the number of height differences in the vertical direction that are greater than the preset height difference threshold is greater than the third preset number, new collection points are uniformly added in the area to be processed, and discrete point data is collected from the added collection points.
[0058] Calculate the height difference between every two adjacent sampling points along the horizontal axis and the height difference between every two adjacent sampling points along the vertical axis. When the number of height differences exceeding a preset threshold along the horizontal axis exceeds a second preset number, and the number of height differences exceeding a preset threshold along the vertical axis exceeds a third preset number, it indicates that the surface shape of the area to be processed is relatively complex, or the sampling points within the area to be processed are relatively sparse. To make the established surface fitting model approximate the true surface shape of the object to be processed, such as... Figure 3e As shown, new collection points are uniformly added to the area to be processed. The planar coordinate data and height data of the newly added collection points are acquired, and the discrete point data of the new collection points are obtained.
[0059] Implementation method six: Divide the matrix grid within the area to be processed into multiple grid regions; Calculate the height difference between every two adjacent sampling points in each grid region; Count the number of sampling points in each grid region where the height difference is greater than the preset height difference threshold, and record the grid region where the number of sampling points is greater than the fourth preset number as the target grid region; New acquisition points are added between every two acquisition points in the target grid area, and discrete point data is collected from the added acquisition points.
[0060] The matrix grid within the processing area is divided into multiple smaller regions, known as grid regions. The height difference between any two adjacent sampling points within each grid region is calculated. When a large number of sampling points within a grid region have a height difference exceeding a preset threshold, this region is designated as the target grid region. New sampling points are then added uniformly within the target grid region, such as between any two existing sampling points or at the center of a rectangular grid. The planar coordinates and height data of these newly added sampling points are acquired, resulting in discrete point data for these new sampling points.
[0061] This invention provides an electronic device, which includes a processor and a memory. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the method provided in the above embodiments.
[0062] This invention provides a computer-readable medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the methods described in the above embodiments.
[0063] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing embodiments, and will not be repeated here.
[0064] The computer program product of the curved surface engraving control method based on a laser engraving machine provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0065] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0066] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0067] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0068] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for controlling curved surface engraving based on a laser engraving machine, characterized in that, include: In the processing area of the curved surface object to be processed, the intersection points of the planar rectangular grid in the planar coordinate system are used as the acquisition points to collect discrete point data; wherein, the discrete point data includes the planar coordinate data and height data of the acquisition points; Parametric calculations are performed on the discrete point data of each set of intersection points along the horizontal axis in the planar coordinate system to obtain a first virtual data sequence. Parametric calculations are performed on the discrete point data of each set of discrete points along the vertical axis in the planar coordinate system to obtain a second virtual data sequence. In this sequence, the vertical coordinates of each discrete point in each set of discrete points along the horizontal axis are equal, and the horizontal coordinates of each discrete point in each set of discrete points along the vertical axis are equal. Based on the first virtual data sequence and the second virtual data sequence, a surface fitting model for the region to be processed is determined. Obtain a preset carving image, and determine the three-dimensional carving trajectory based on the preset carving image and the surface fitting model; The laser of the laser engraving machine is controlled to engrave the area to be processed according to the three-dimensional engraving trajectory, so as to form the preset engraving image in the area to be processed.
2. The surface carving control method according to claim 1, characterized in that, The step of determining the surface fitting model of the region to be processed based on the first virtual data sequence and the second virtual data sequence includes: Based on the first virtual data sequence and the second virtual data sequence, a virtual data relationship set matrix is obtained; Surface fitting is performed based on the virtual data relationship set matrix to determine the surface fitting model of the region to be processed.
3. The surface carving control method according to claim 1, characterized in that, Before performing parameterization calculations on the discrete point data of each set of intersection points along the horizontal axis in the planar coordinate system, the method further includes: Based on the height data, additional collection points are added to the area to be processed, and discrete point data is collected from the additional collection points.
4. The surface carving control method according to claim 3, characterized in that, The process of supplementing the collection points in the area to be processed based on the height data, and collecting discrete point data from the supplemented collection points, includes: Based on the height information, calculate the height difference between every two adjacent collection points in the horizontal axis direction; when the height difference between any two adjacent collection points in the horizontal axis direction is greater than a preset height difference threshold, add a new collection point between the two collection points whose height difference is greater than the preset height difference threshold, and collect the discrete point data for the new collection point; And / or, The height difference between any two adjacent acquisition points along the vertical axis is calculated based on the height information of each discrete point. When the height difference between any two adjacent acquisition points along the vertical axis is greater than a preset height difference threshold, a new acquisition point is added between the two acquisition points whose height difference is greater than the preset height difference threshold, and the discrete point data is acquired at the new acquisition point.
5. The surface engraving control method according to claim 3, characterized in that, The process of supplementing the collection points in the area to be processed based on the height data, and collecting discrete point data from the supplemented collection points, includes: Calculate the height difference between two adjacent vertices of each rectangle in the rectangular grid, and record at least two rectangles whose height difference is greater than a preset height difference threshold as target rectangles; New collection points are added within the target rectangle, and discrete point data is collected at the new collection points.
6. The surface engraving control method according to claim 3, characterized in that, The process of supplementing the collection points in the area to be processed based on the height data, and collecting discrete point data from the supplemented collection points, includes: Calculate the height difference between any two adjacent sampling points in the rectangular grid; The number of collection points whose height difference is greater than a preset height difference threshold is counted, or the percentage of height differences greater than the preset height difference threshold among all the calculated height differences is counted. When the number of discrete points is greater than a first preset number, or when the proportion is greater than a preset ratio, new collection points are added between every two collection points and inside each rectangle of the rectangular grid, and the discrete point data is collected from the added collection points.
7. The surface engraving control method according to claim 4, characterized in that, The process of supplementing the collection points in the area to be processed based on the height data, and collecting discrete point data from the supplemented collection points, includes: When the number of height differences greater than the preset height difference threshold in the horizontal direction is greater than a second preset number, and the number of height differences greater than the preset height difference threshold in the vertical direction is greater than a third preset number, new collection points are uniformly added in the processing area, and discrete point data is collected from the added collection points.
8. The surface engraving control method according to claim 3, characterized in that, The process of supplementing the collection points in the area to be processed based on the height data, and collecting discrete point data from the supplemented collection points, includes: The matrix grid within the area to be processed is divided into multiple grid regions; Calculate the height difference between any two adjacent sampling points in each of the grid regions; Count the number of collection points in each grid region where the height difference is greater than a preset height difference threshold, and record the grid region where the number of collection points is greater than a fourth preset number as the target grid region; New acquisition points are added between every two acquisition points in the target grid area, and discrete point data are acquired at the added acquisition points.
9. The surface engraving control method according to claim 2, characterized in that, The step of performing surface fitting based on the virtual data relationship set matrix to determine the surface fitting model of the region to be processed includes: The equation relationship between the measurement points and control points of the surface fitting model is determined based on the virtual data relationship set matrix. Based on the equation relationship between the measurement point and the control point, an optimization algorithm is used to determine the optimal solution of the control point coordinates, thereby obtaining the surface fitting model; wherein, the surface fitting model is a cubic B-spline surface model.
10. The surface carving control method according to claim 1, characterized in that, The step of obtaining a preset carving image and determining a three-dimensional carving trajectory based on the preset carving image and the surface fitting model includes: A two-dimensional planar path for carving is generated based on the preset carving image, and the two-dimensional planar path is projected onto the surface fitting model to form a three-dimensional carving trajectory.
Citation Information
Patent Citations
Saxophone reed curved surface model establishing method
CN113781629A
Three-dimensional laser engraving method and device, computer equipment and storage medium
CN118905459A
Object surface fitting method used for laser processing, machine, system, and medium
WO2024179590A1
Cited By
Laser marking method and device for cylindrical workpiece and storage medium
CN122077207A