Workpiece grinding allowance calculation method and device for laser cladding additive manufacturing
Through point cloud registration, projection and B-spline fitting methods, the grinding margin of complex geometric shapes is calculated, which solves the problem of surface roughness and margin control of machining parts, and achieves high-precision machining quality and path planning.
Patent Information
- Application Number
- CN202510254256.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-17
AI Technical Summary
It is difficult to achieve strict control of surface roughness and margin during the grinding process of complex geometric shapes, resulting in difficult processing consistency and quality to meet the needs of high-precision applications.
By obtaining the point cloud data of the workpiece before and after grinding, point cloud registration, projection and B-spline fitting are performed to calculate the grinding margin of the workpiece. This method realizes contactless measurement, reduces material waste and improves workpiece processing quality.
It improves the calculation accuracy of the grinding allowance of machining parts, reduces material waste, improves the processing quality of workpieces, supports path planning, and improves the processing technology.
Smart Images

Figure CN120163945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial processing technologies, and particularly relates to a method, device, storage medium, and electronic device for calculating the grinding allowance of a workpiece used in laser cladding additive manufacturing. Background Art
[0002] Workpieces with complex geometric shapes usually have characteristics such as thin-walled structures, complex curvatures, and poor machinability. During the machining process, strict control of the surface roughness and allowance of the workpiece is required. For example, the thickness of the thermal barrier coating of a turbine blade is generally 150 - 350 μm, and the machining allowance is limited. Excessive grinding will result in an overly thin coating, affecting performance, while insufficient grinding will make it difficult to meet the surface quality requirements. For other complex components, surface machining consistency and precise allowance control are also key challenges.
[0003] Currently, the methods for reducing the surface roughness of complex workpieces mainly include manual tool machining, vibratory finishing, and abrasive flow machining, but these machining methods have deficiencies in machining efficiency and consistency. Summary of the Invention
[0004] Embodiments of the present application provide a method, device, storage medium, and electronic device for calculating the grinding allowance of a workpiece used in laser cladding additive manufacturing, which can improve the accuracy of calculating the grinding allowance of the workpiece, effectively improve the machining quality of the workpiece while reducing material waste.
[0005] Embodiments of the present application provide a method for calculating the grinding allowance of a workpiece used in laser cladding additive manufacturing, including: Obtaining first point cloud data of the workpiece before grinding and second point cloud data of the workpiece after grinding; Based on the first point cloud data and the second point cloud data, obtaining the unground part, and registering the unground part to obtain a transformation matrix; Based on the first point cloud data and the transformation matrix, obtaining registered third point cloud data; Projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set; Performing B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; Calculating the grinding allowance based on the first B-spline curve and the second B-spline curve.
[0006] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece used in laser cladding additive manufacturing, the projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set includes: Randomly select several points from the third point cloud data to calculate the corresponding first plane equation; Generate a first auxiliary plane and a second auxiliary plane based on the first fitting plane corresponding to the first plane equation; Count the number of point clouds contained in the space between the first auxiliary plane and the first fitting plane, and the space between the second auxiliary plane and the first fitting plane; Traverse the point clouds in the space on the side with fewer point clouds, and for any one of them p i , search for p i The nearest neighbor point in the point cloud on the other side p j , connect p i p j , and calculate p i p j The intersection point with the first fitting plane as the projection point; Repeat the above steps to obtain several projection points, forming a first discrete projection point set.
[0007] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, wherein the projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set further includes: Randomly select several points from the second point cloud data to calculate the corresponding second plane equation; Generate a third auxiliary plane and a fourth auxiliary plane based on the second fitting plane corresponding to the second plane equation; Count the number of point clouds contained in the space between the third auxiliary plane and the second fitting plane, and the space between the fourth auxiliary plane and the second fitting plane; Traverse the point clouds in the space on the side with fewer point clouds, and for any one of them q i , search for q i The nearest neighbor point in the point cloud on the other side q j , connect q i q j , and calculate q i q jj The intersection point with the second fitting plane as the projection point; Repeat the above steps to obtain a number of projection points, forming a second discrete projection point set.
[0008] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, wherein generating a first auxiliary plane and a second auxiliary plane based on the first fitting plane corresponding to the first plane equation includes: Taking the first fitting plane corresponding to the first plane equation as a reference, translating the first fitting plane to both sides by a first distance respectively to obtain a first auxiliary plane and a second auxiliary plane.
[0009] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, wherein performing B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve includes: For the second discrete projection point set, set the order k and the knot vector { u 0, u 1,.., u m}, and establish a B-spline curve equation:
[0010] wherein, P i is the control point, B i,k ( u ) is the B-spline basis function, the length of the knot vector m +1, the number of control points n +1 and the curve order k have the following relationship:
[0011] For the basis function k of any order B i,k ( t ) the recurrence relation is:
[0012] Define an error calculation function E :
[0013] Use the least squares method to optimize the control points { P i} to obtain a second B-spline curve C ( u ).
[0014] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, wherein calculating the grinding allowance based on the first B-spline curve and the second B-spline curve includes: Select a number of uniformly distributed parameter values on the first B-spline curve and the second B-spline curve, and determine the first corresponding point of each parameter value on the first B-spline curve and the second corresponding point on the second B-spline curve; Determine the tangent direction of the second corresponding point; Calculate the distance from the first corresponding point to the tangent line where the second corresponding point is located as the grinding allowance of the first corresponding point; Repeat the above steps to calculate the grinding allowance for all sampling points to obtain the complete grinding allowance of the workpiece.
[0015] As a further improvement of the present invention, in the above method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, wherein calculating the distance from the first corresponding point to the tangent line where the second corresponding point is located as the grinding allowance of the first corresponding point includes: Calculate the grinding allowance through the first formula, and the first formula is:
[0016] where D = q i - p i , q i is the first corresponding point, p i is the second corresponding point, is the grinding allowance, is the tangent direction of the second corresponding point.
[0017] The embodiment of the present application also provides a device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing, including: A point cloud acquisition module, configured to acquire the first point cloud data of the workpiece before grinding and the second point cloud data of the workpiece after grinding; A first processing module, configured to obtain the unground part based on the first point cloud data and the second point cloud data, and register the unground part to obtain a transformation matrix; A second processing module, configured to obtain the registered third point cloud data based on the first point cloud data and the transformation matrix; A projection module, configured to project the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set; A B-spline curve fitting module, configured to perform B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; A grinding allowance calculation module, configured to calculate the grinding allowance based on the first B-spline curve and the second B-spline curve.
[0018] An embodiment of the present application further provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions are adapted to be loaded by a processor to execute any one of the above methods for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing.
[0019] An embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used for the steps in any one of the above methods for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing.
[0020] The method, device, storage medium and electronic device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the present application are based on the first point cloud data of the workpiece before grinding and the second point cloud data of the workpiece after grinding to perform point cloud registration, projection and B-spline curve fitting, and calculate the grinding allowance of the workpiece. Through laser three-dimensional measurement and point cloud registration algorithm, non-contact measurement in the grinding process of the workpiece is realized, which effectively improves the workpiece processing quality while reducing material waste. In addition, the present application combines the three-dimensional point cloud data of the workpiece to realize path planning in the grinding process and improve the processing technology. Description of the Drawings
[0021] The following will make the technical solutions and other beneficial effects of the present application obvious by describing the specific embodiments of the present application in detail in conjunction with the drawings.
[0022] Figure 1 It is a flowchart of the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by an embodiment of the present application.
[0023] Figure 2 It is a schematic diagram of the fitting plane and the auxiliary plane provided by an embodiment of the present application.
[0024] Figure 3 It is a schematic structural diagram of the device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by an embodiment of the present application.
[0025] Figure 4 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed Embodiments
[0026] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0027] With the development of automation and intelligent technologies, robot control and multi-axis machining systems have been gradually applied to the high-precision machining of complex workpieces, providing higher precision and flexibility for surface allowance consistency control and quality optimization. During the process of using a robot to achieve surface grinding of complex workpieces, it is necessary to accurately measure and reasonably control the surface allowance to ensure machining consistency and surface quality. Excessive grinding may cause excessive local material removal, affecting the performance or structural integrity of the workpiece; while insufficient grinding cannot effectively reduce the surface roughness of the workpiece to meet the requirements of high-precision applications. Therefore, the embodiments of the present application provide a method, device, storage medium, and electronic device for calculating the grinding allowance of workpieces for laser cladding additive manufacturing. A device for calculating the grinding allowance of workpieces for laser cladding additive manufacturing provided by the embodiments of the present application can be integrated into an electronic device, which can be a terminal, a server, or other devices. Among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a microprocessing box, or other devices, etc.
[0028] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for calculating the grinding allowance of workpieces for laser cladding additive manufacturing provided by the embodiments of the present application. It is applied to an electronic device. The method for calculating the grinding allowance of workpieces for laser cladding additive manufacturing includes the following steps: S1, obtain the first point cloud data of the workpiece before grinding and the second point cloud data of the workpiece after grinding.
[0029] Specifically, use a line laser scanner to collect the first point cloud data of the workpiece substrate before grinding P and the second point cloud data of the workpiece after grinding Q .
[0030] S2, obtain the unground part based on the first point cloud data and the second point cloud data, and register the unground part to obtain a transformation matrix.
[0031] Specifically, subtract the second point cloud data P from the first point cloud data Q to obtain the point cloud data of the unground part, and use a registration algorithm to calculate the transformation matrix T for the point cloud data of the unground part.
[0032] S3. Based on the first point cloud data and the transformation matrix, obtain the registered third point cloud data.
[0033] Specifically, for the first point cloud data P apply the transformation matrix T to obtain the registered third point cloud data P’ .
[0034] S4. Project the third point cloud data and the second point cloud data to obtain the first discrete projection point set and the second discrete projection point set.
[0035] In one embodiment, step S4 includes the following steps: S411. Randomly select several points in the third point cloud data to calculate the corresponding first plane equation; S412. Generate the first auxiliary plane and the second auxiliary plane based on the first fitting plane corresponding to the first plane equation; Specifically, taking the first fitting plane corresponding to the first plane equation as a reference, translate the first fitting plane to both sides by the first distance to obtain the first auxiliary plane and the second auxiliary plane.
[0036] S413. Count the number of point clouds contained in the space between the first auxiliary plane and the first fitting plane, and the space between the second auxiliary plane and the first fitting plane; S414. Traverse the point clouds in the space with fewer point clouds. For any point p i , search for p i the nearest neighbor point in the point cloud on the other side p j , connect p i p j , and calculate p i p j the intersection point with the first fitting plane as the projection point; S415. Repeat the above steps to obtain several projection points and form the first discrete projection point set.
[0037] S421. Randomly select several points in the second point cloud data to calculate the corresponding second plane equation; S422. Generate the third auxiliary plane and the fourth auxiliary plane based on the second fitting plane corresponding to the second plane equation; S423. Count the number of point clouds contained in the space between the third auxiliary plane and the second fitting plane, and the space between the fourth auxiliary plane and the second fitting plane; S424. Traverse the point cloud in the space on the side with fewer point clouds, and for any point among them q i , search for q i the nearest neighbor point in the point cloud on the other side q j , connect q i q j , and calculate q i q jj the intersection point with the second fitting plane as the projection point; S425. Repeat the above steps to obtain several projection points, forming a second discrete projection point set.
[0038] Specifically, the slicing projection process of the third point cloud data P’ is as follows: Adopt the Random Sample Consensus (RANSAC) algorithm. Calculate the first plane equation Ax + By + Cz = D according to 3 randomly selected points. Set the plane distance threshold, continuously iterate and count the number of inliers until the plane parameter model with the maximum number of inliers is obtained.
[0039] Then, taking the first fitting plane a as the reference, translate a distance h to generate the first auxiliary plane a1 and the second auxiliary plane a2. Figure 2 This is a schematic diagram of the fitting plane and the auxiliary plane provided by the embodiment of the present application, as shown in Figure 2. Count the number of point clouds contained in the sub-spaces a1a and aa2 on both sides of the plane a. Traverse the point cloud on the side with fewer numbers, and for any point among them p i , search for its nearest neighbor point in the point cloud on the other side p j , connect p i p j and calculate its intersection point with the plane a as the projection point.
[0040] Similarly, perform the above steps on the point cloud Q Finally, obtain the first discrete projection point set of the workpiece point cloud before and after grinding P j and the second discrete projection point set Q j .
[0041] S5. Perform B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain the first B-spline curve and the second B-spline curve.
[0042] Specifically, for the second discrete projection point setQ j , set the order k and the knot vector { u 0, u 1,.., u m} to establish the B-spline curve equation:
[0043] where P i is the control point, B i,k ( u ) is the B-spline basis function, the length of the knot vector m +1, the number of control points n +1 and the curve order k have the following relationship:
[0044] For the basis function of any order k B i,k ( t ) the recurrence relation is:
[0045] Define the error calculation function E :
[0046] Use the least squares method to optimize the control points { P i} to obtain the second B-spline curve C ( u ).
[0047] Based on the above steps, for the point sets P j and Q j respectively, perform fitting to obtain the B-spline curves C P ( u ) and C Q ( u ).
[0048] S6. Calculate the grinding allowance based on the first B-spline curve and the second B-spline curve.
[0049] In one embodiment, step S6 includes the following steps: S61. Select a number of uniformly distributed parameter values on the first B-spline curve and the second B-spline curve, and determine the first corresponding points of each parameter value on the first B-spline curve and the second corresponding points on the second B-spline curve.
[0050] S62. Determine the tangent direction of the second corresponding point.
[0051] S63. Calculate the distance from the first corresponding point to the tangent line where the second corresponding point lies as the grinding allowance of the first corresponding point.
[0052] Specifically, calculate the grinding allowance through the first formula. The first formula is:
[0053] where D = q i - p i , q i is the first corresponding point, p i is the second corresponding point, is the grinding allowance, is the tangent direction of the second corresponding point.
[0054] S64. Repeat the above steps to calculate the grinding allowance for all sampling points to obtain the complete workpiece grinding allowance.
[0055] Specifically, on the curves C P ( u ) and C Q ( u ), select a series of uniformly distributed parameter values u 1, u 2, …, u k . For each parameter value u i on the curve C P ( u ), the corresponding point p i = C P ( u i ), calculate p i the tangent direction at t = dC p ( u ) / du|u = u i , calculate CQ ( u )Corresponding point q i to p i The distance from the tangent line where it is located is used as the grinding allowance of this point d i where D = q i - p i ;
[0056] Calculate for all sampling points d i to obtain the complete grinding allowance distribution of the workpiece
[0057] This application realizes non-contact measurement during the grinding process of the workpiece based on laser three-dimensional measurement and point cloud registration algorithm, effectively improving the workpiece processing quality while reducing material waste. In addition, this application combines the three-dimensional point cloud data of the workpiece to realize path planning during the grinding process and improve the processing technology
[0058] According to the method described in the above embodiments, this embodiment will be further described from the perspective of a device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing. The device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing can be specifically implemented as an independent entity or integrated in an electronic device, which can be a device such as a terminal, a server, etc. Among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC, Personal Computer), a microprocessing box, or other devices, etc
[0059] Please refer to Figure 3 , Figure 3 Specifically describes the device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of this application, which is applied to an electronic device. The device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing can include: A point cloud acquisition module, configured to obtain the first point cloud data of the workpiece before grinding and the second point cloud data of the workpiece after grinding A first processing module, configured to obtain the unground part based on the first point cloud data and the second point cloud data, and register the unground part to obtain a transformation matrix A second processing module, configured to obtain the registered third point cloud data based on the first point cloud data and the transformation matrix A projection module, configured to project the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set The B-spline curve fitting module is used to perform B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; The grinding allowance calculation module is used to calculate the grinding allowance based on the first B-spline curve and the second B-spline curve.
[0060] In specific implementation, each of the above modules and / or units can be implemented as an independent entity, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of each of the above modules and / or units, reference can be made to the foregoing method embodiments. For the specific beneficial effects that can be achieved, reference can also be made to the beneficial effects in the foregoing method embodiments, which will not be elaborated herein.
[0061] In addition, an embodiment of the present application further provides an electronic device, which can be a device such as a computer or a tablet computer. The electronic device can implement the steps in any one of the embodiments of the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present application. Therefore, the beneficial effects that can be achieved by any one of the methods for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present invention can be achieved. For details, please refer to the foregoing embodiments, which will not be elaborated herein.
[0062] As Figure 4 shown, Figure 4 FIG. is a specific structural block diagram of the electronic device provided by an embodiment of the present invention. The electronic device can be used to implement the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided in the foregoing embodiments. The electronic device 500 can be a device such as a terminal or a server. Among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a microprocessing box, or other devices, etc.
[0063] The RF circuit 510 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF circuit 510 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, subscriber identity module (SIM) cards, memories, and so on. The RF circuit 510 can communicate with various networks such as the Internet, enterprise intranets, wireless networks or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular phone networks, wireless local area networks or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for e-mail, instant messaging and short messages, and any other suitable communication protocols, and may even include those protocols that have not yet been developed currently.
[0064] The memory 520 can be used to store software programs and modules, such as the corresponding program instructions / modules in the above embodiments. The processor 580 executes various functional applications and data processing by running the software programs and modules stored in the memory 520, that is, to implement functions such as taking pictures with the front camera, processing the captured images, and switching the display colors of the display content on the display screen. The memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 520 may further include a memory remotely disposed relative to the processor 580, and these remote memories can be connected to the electronic device 500 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0065] The input unit 530 can be used to receive input digital or character information, as well as generate a keyboard and a mouse related to user settings and function controls. The display unit 540 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces, and these graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 540 may include a display panel 541. Optionally, the display panel 541 can be configured in the form of an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
[0066] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the electronic device 500. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, and the speaker 561 converts it into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and then converted into audio data. After the audio data is output to the processor 580 for processing, it is sent to another terminal, for example, through the RF circuit 510, or the audio data is output to the memory 520 for further processing. The audio circuit 560 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device 500.
[0067] The electronic device 500 can help the user receive requests, send information, etc. through the transmission module 570 (such as a Wi-Fi module), and it provides the user with wireless broadband Internet access. Although the transmission module 570 is shown in the figure, it can be understood that it does not belong to the essential components of the electronic device 500 and can be omitted completely as needed without changing the essence of the invention.
[0068] The processor 580 is the control center of the electronic device 500, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 520, and by calling the data stored in the memory 520, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580 either.
[0069] The electronic device 500 also includes a power supply 590 (such as a battery) for supplying power to each component. In some embodiments, the power supply can be logically connected to the processor 580 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 590 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0070] Although not shown, the electronic device 500 also includes a camera (such as a front camera and a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, where one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: Obtain the first point cloud data of the workpiece before grinding and the second point cloud data of the workpiece after grinding; Based on the first point cloud data and the second point cloud data, obtain the unground part, register the unground part, and obtain a transformation matrix; Based on the first point cloud data and the transformation matrix, obtain the registered third point cloud data; Project the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set; Perform B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; Calculate the grinding allowance based on the first B-spline curve and the second B-spline curve.
[0071] In specific implementation, each of the above modules can be implemented as an independent entity, or can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of each of the above modules, reference can be made to the foregoing method embodiments, which will not be elaborated herein.
[0072] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. For this purpose, an embodiment of the present invention provides a storage medium in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps of any one of the embodiments of the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present invention.
[0073] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0074] Since the instructions stored in the storage medium can execute the steps of any one of the embodiments of the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present invention, the beneficial effects achievable by any of the methods for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present invention can be realized. For details, refer to the foregoing embodiments, which will not be elaborated herein.
[0075] The above has introduced in detail a method, device, storage medium, and electronic device for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing, characterized in that: The method comprises: Acquire first point cloud data of the workpiece before grinding and second point cloud data of the workpiece after grinding; Obtaining an unground portion based on the first point cloud data and the second point cloud data, and registering the unground portion to obtain a transformation matrix; Based on the first point cloud data and the transformation matrix, obtaining third point cloud data after registration; Projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set; Performing B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; A grinding allowance is calculated based on the first B-spline curve and the second B-spline curve.
2. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 1, characterized in that: The projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set includes: Randomly selecting a number of points in the third point cloud data to calculate the corresponding first plane equation; Generate a first auxiliary plane and a second auxiliary plane based on a first fitting plane corresponding to the first plane equation; Counting the number of point clouds contained in the space between the first auxiliary plane and the first fitting plane, and the number of point clouds contained in the space between the second auxiliary plane and the first fitting plane; Traverse the point cloud on the side with fewer point clouds, and for any point in it p i , find p i The nearest neighbor point in the other point cloud p j ,connect p i p j , and calculate p i p j The intersection point with the first fitting plane is taken as the projection point; Repeat the above steps to obtain several projection points to form a first discrete projection point set.
3. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 1, characterized in that: The projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set also includes: Randomly selecting a number of points in the second point cloud data to calculate the corresponding second plane equation; Generate a third auxiliary plane and a fourth auxiliary plane based on a second fitting plane corresponding to the second plane equation; Counting the number of point clouds contained in the space between the third auxiliary plane and the second fitting plane, and the space between the fourth auxiliary plane and the second fitting plane; Traverse the point cloud on the side with fewer point clouds, and for any point in it q i , find q i The nearest neighbor point in the other point cloud q j ,connect q i q j , and calculate q i q jj The intersection point with the second fitting plane is taken as the projection point; Repeat the above steps to obtain several projection points to form a second discrete projection point set.
4. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 2, characterized in that: The generating of the first auxiliary plane and the second auxiliary plane based on the first fitting plane corresponding to the first plane equation includes: Taking the first fitting plane corresponding to the first plane equation as a reference, the first fitting plane is translated to both sides by a first distance to obtain a first auxiliary plane and a second auxiliary plane.
5. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 1, characterized in that: The step of performing B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve includes: For the second discrete projection point set, set the order k and node vector { u 0, u 1,.., u m }, establish the B-spline curve equation: in, P i is the control point, B i,k ( u ) is the B-spline basis function, the knot vector length m +1, control points n +1 and curve degree k The following relationship exists: For any order k The basis function B i,k ( t )The recursive relation is: Define the error calculation function E : Use the least squares method to optimize the control points { P i }, get the second B-spline curve C ( u ).
6. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 1, characterized in that: The calculating the grinding allowance based on the first B-spline curve and the second B-spline curve comprises: Selecting a plurality of uniformly distributed parameter values on the first B-spline curve and the second B-spline curve, and determining a first corresponding point on the first B-spline curve and a second corresponding point on the second B-spline curve for each parameter value; determining a tangent direction of the second corresponding point; Calculating the distance from the first corresponding point to the tangent line of the second corresponding point as the grinding allowance of the first corresponding point; Repeat the above steps to calculate the grinding allowance for all sampling points to obtain the complete workpiece grinding allowance.
7. The method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to claim 6, characterized in that: The calculating the distance from the first corresponding point to the tangent line of the second corresponding point as the grinding allowance of the first corresponding point includes: The grinding allowance is calculated by the first formula, which is: Where D = q i - p i , q i is the first corresponding point, p i is the second corresponding point, is the grinding allowance, is the tangent direction of the second corresponding point.
8. A grinding allowance calculation device for a workpiece used in laser cladding additive manufacturing, characterized in that: include: A point cloud acquisition module, used for acquiring first point cloud data of the workpiece before grinding and second point cloud data of the workpiece after grinding; A first processing module, configured to obtain an unground portion based on the first point cloud data and the second point cloud data, and to register the unground portion to obtain a transformation matrix; A second processing module, configured to obtain registered third point cloud data based on the first point cloud data and the transformation matrix; A projection module, used for projecting the third point cloud data and the second point cloud data to obtain a first discrete projection point set and a second discrete projection point set; A B-spline curve fitting module, used for performing B-spline curve fitting on the first discrete projection point set and the second discrete projection point set to obtain a first B-spline curve and a second B-spline curve; The grinding allowance calculation module is used to calculate the grinding allowance based on the first B-spline curve and the second B-spline curve.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method for calculating grinding allowance of a workpiece for laser cladding additive manufacturing according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It comprises a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the method for calculating the grinding allowance of a workpiece for laser cladding additive manufacturing as described in any one of claims 1 to 7.