A 3D Printing High-Resolution Repair Method Based on Twin Simulation

By combining a twin simulation model with SDF implicit neural representation, local occlusion reconstruction, and Bayesian optimization techniques, the problems of discontinuity and path matching in existing 3D printing repair methods are solved, achieving high-precision 3D printing high-definition repair.

CN123118907APending Publication Date: 2026-11-17WUHAN YINHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611320819.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing 3D printing repair methods are prone to abrupt changes, discontinuities, or excessive smoothing when dealing with objects that have many boundary details, complex surface variations, or uneven sampling. Furthermore, they lack a matching between the repair path and the actual defect morphology, making it difficult to achieve high-definition repair.

Method used

By employing SDF implicit neural representation, local occlusion reconstruction, adaptive octree sampling, and Bayesian optimization techniques, a closed-loop mechanism is formed through a twin simulation model to perform surface estimation of the defect area, generation of candidate repair models, optimization of repair path parameters, and result feedback updates.

Benefits of technology

It improves repair accuracy and surface continuity, and can adaptively adjust repair path parameters to reduce tortuosity and over-smoothing problems, achieving high-precision repair results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118907A_ABST
    Figure CN123118907A_ABST
Patent Text Reader

Abstract

This invention discloses a high-definition 3D printing repair method based on twin simulation, comprising the following steps: S1, acquiring high-definition data and preprocessing it; S2, establishing a surface function solution domain, performing continuous fitting, and incorporating the defective area into the calculation range of the surface function to obtain a twin simulation model; S3, extracting a complete data area, setting a local gap, and calling the twin simulation model to calculate the recovery data within the local gap, performing error backpropagation, and iteratively updating the fitting parameters; S4, setting up completion sampling points within the defective area, calculating the repair discrimination value of the completion sampling points, and filtering and connecting them; S5, dividing the repair path segments, iteratively filtering the optimization variables, and obtaining the repair path parameters; S6, acquiring the repair result data, and incrementally correcting the repair path parameters. This invention can achieve continuous connection and high-definition completion between the defective area and the original surface, improving the adaptability of the 3D printing repair results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D printing repair technology, and in particular to a high-definition 3D printing repair method based on twin simulation. Background Technology

[0002] With the development of 3D scanning, digital modeling, and additive manufacturing technologies, 3D printing restoration is increasingly being applied to the restoration of precision components, cultural relics, complex exterior parts, and objects requiring detailed textures. Existing methods typically involve first acquiring images or point clouds of the object to be restored, then identifying missing areas, completing surfaces, and generating paths based on the acquisition results, finally completing the physical restoration through 3D printing. This type of method can, to some extent, replace manual shaping and improve the efficiency of generating restoration models.

[0003] However, existing 3D printing repair methods mostly rely on discrete point cloud reconstruction, artificial surface patching, or fixed rule interpolation, lacking a continuous function-level representation of surface changes around the damaged area. For objects to be repaired with many boundary details, complex surface changes, or uneven sampling, ordinary completion methods are prone to creating abrupt changes, discontinuities, or local oversmoothing at the damaged location, resulting in insufficient continuity between the candidate repair model and the original surface, making it difficult to meet the requirements of high-definition repair for surface details and boundary connections.

[0004] Meanwhile, existing methods typically perform path planning directly after the repair model is generated. The path spacing, path direction, and compensation amount are mostly determined based on empirical parameters or fixed slicing rules, lacking an iterative optimization process based on the continuous deviation between the candidate repair model and the original acquired data. Since the damaged area itself lacks effective surface data, if the repair surface cannot be estimated and corrected through simulation before repair, the printed path is prone to mismatch with the actual damaged shape, thus affecting the contour transition and detail restoration of the repair area.

[0005] Furthermore, in existing 3D printing repair processes, the completed repair data is often only used for manual inspection or quality evaluation, with little further back-updating of the front-end model and path parameters. The deviation between the repair result and the candidate repair model cannot effectively participate in the correction of model fitting parameters, nor can it make incremental adjustments to subsequent repair paths, resulting in a lack of a closed-loop mechanism of "modeling—completeness—path optimization—result feedback" in the repair process.

[0006] Therefore, how to provide a 3D printing high-definition repair method based on twin simulation is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] One objective of this invention is to propose a high-definition 3D printing repair method based on twin simulation. This invention fully utilizes SDF implicit neural representation, local occlusion reconstruction, adaptive octree sampling, and Bayesian optimization techniques. It details the algorithm process of using a twin simulation model to calculate the surface of the defective area, generate candidate repair models, optimize repair path parameters, and update the repair results. This method has the advantages of high repair accuracy, good surface continuity, and adaptive correction of path parameters.

[0008] A 3D printing high-definition repair method based on twin simulation according to an embodiment of the present invention includes the following steps: S1. Acquire high-definition acquisition data of the object to be repaired and preprocess it to generate a feature dataset; S2. Establish the surface function solution domain according to the effective sampling positions in the feature dataset, use the SDF implicit neural representation method for continuous fitting, and incorporate the defective region into the range to be calculated for the surface function to obtain the twin simulation model. S3. Extract the complete data region from the feature dataset, set a local gap in the complete data region using the local occlusion reconstruction method, and call the twin simulation model to calculate the restored data in the local gap. Compare the restored data with the data before extraction to backpropagate the error, and iteratively update the fitting parameters of the twin simulation model. S4. Adaptive octree sampling method is used to deploy completion sampling points in the defect area, the updated twin simulation model is called to calculate the repair discrimination value of the completion sampling points, and the completion sampling points are screened and connected to form candidate repair models. S5. Divide the repair path segments according to the candidate repair model, and use the path spacing, path direction and compensation amount corresponding to the repair path segments as optimization variables. Then, use the Bayesian optimization method to iteratively filter the optimization variables according to the surface continuous deviation to obtain the repair path parameters. S6. Obtain the repair result data and use the recursive least squares update method to incrementally correct the repair path parameters.

[0009] Optionally, the preprocessing specifically includes: Perform data integrity verification on the high-definition acquired data, remove duplicate and invalid sampled data, and create a sampling index for the remaining data; The feature point matching method is used to initially align the data under different acquisition angles, and the ICP registration method is used to iteratively register the initially aligned data to obtain the acquisition data under unified coordinates. The collected data under a unified coordinate system is scaled and the sampling density is rearranged. The neighborhood bilateral filtering method is used to remove discrete noise and retain local detail changes. Based on the continuity of sampling and the situation of missing local data, the effective sampling locations and the missing area locations are divided, and a feature dataset containing the effective sampling locations, local detail changes and the missing area locations is generated.

[0010] Optionally, S2 specifically includes: S21. Based on the effective sampling locations in the feature dataset, determine the surface coverage area of ​​the object to be repaired, and set the solution boundary outward according to the surface coverage area to establish the surface function solution domain. The defective area in the feature dataset is included in the range to be calculated within the surface function solution domain. S22. Estimate the neighborhood normal for the effective sampling location, set offset sampling points along the positive and negative directions of the neighborhood normal, take the effective sampling location as the zero distance sample, and take the offset sampling point as the signed distance sample to form the SDF fitting sample. S23. Using the SDF implicit neural representation method, the SDF fitted samples are fitted with a function, the sampled coordinates are mapped to signed distance values, and the fitting parameters of the SDF implicit neural representation method are iteratively corrected based on the distance difference between the zero-distance samples and the signed distance samples. S24. Set up estimation sampling points within the estimation range, call the modified SDF implicit neural representation method, calculate the signed distance value of the estimation sampling points, and determine the continuous surface distribution within the defect area according to the zero-level change relationship of the signed distance value. S25. Using the modified SDF implicit neural representation method as the surface simulation function, the surface function solution domain as the function call range, and the area to be calculated as the defect calculation region, a twin simulation model of the object to be repaired is formed according to the call sequence of sampled coordinate input, signed distance value calculation, and zero-level plane extraction, wherein: The surface simulation function is an SDF implicit neural representation method after fitting parameter correction, used to calculate the corresponding signed distance value based on the input sampling coordinates; The twin simulation model is a callable computational model used to perform surface extrapolation of local gaps and defective areas in subsequent steps.

[0011] Optionally, S23 specifically includes: S231. Based on the zero-distance samples and signed distance samples in the SDF fitting samples, establish a distance supervision relationship, set the target distance corresponding to the zero-distance sample to zero, and set the target distance corresponding to the signed distance sample to a positive or negative value consistent with the normal offset direction. S232. A multilayer perceptron containing 4 to 8 hidden layers is used to perform nonlinear mapping on the sampling coordinates of the SDF fitting samples. The hidden dimension of each hidden layer is 64 to 256. The hidden features corresponding to the sampling coordinates are calculated layer by layer, and the predicted signed distance value is obtained by regression of the hidden features. S233. Calculate the point-by-point error between the predicted signed distance value and the target distance, apply surface constraint weights to the error terms corresponding to the zero-distance samples, and apply directional consistency constraints to the error terms corresponding to the signed distance samples to form the SDF fitting error. S234. Based on the SDF fitting error, backpropagation is performed to update the weight parameters and bias parameters in the multilayer perceptron, and the predicted signed distance value is recalculated after each parameter update. The mapping relationship between the sampled coordinates and the signed distance value is converged round by round. S235. When the change in SDF fitting error is lower than the set convergence threshold for 3 to 10 consecutive rounds, stop parameter updating and use the current weight parameters and bias parameters of the multilayer perceptron as the fitting parameters of the SDF implicit neural representation method.

[0012] Optionally, S3 specifically includes: S31. In the feature dataset, select the data that is continuously sampled and not included in the missing area as the complete data area. Use the local occlusion reconstruction method to determine the occlusion range in the complete data area and remove the data within the occlusion range to form a local gap. Use the retained data around the local gap as the basis for gap restoration. S32. Call the twin simulation model to calculate the signed distance value of the sampling position to be restored within the local gap, and perform adjacent constraint correction on the signed distance value of the sampling position to be restored based on the surface continuity relationship of the data outside the local gap, so as to obtain the restored data within the local gap. S33. Compare the restored data with the data of the corresponding position of the complete data area before occlusion, calculate the distance error and the continuous error of the local gap edge of the restored data respectively, and weight and merge the distance error and the continuous error to obtain the occlusion reconstruction error. S34. Based on the occlusion reconstruction error, backpropagate and update the fitting parameters of the twin simulation model, and after the update, reset the local gap and continue to perform the recovery calculation until the occlusion reconstruction error meets the set convergence condition to obtain the updated twin simulation model.

[0013] Optionally, S32 specifically includes: S321. Within the local gap, determine the sampling positions to be restored in order from the edge of the gap to the center of the gap, and establish a correspondence between each sampling position to be restored and the adjacent data outside the local gap. S322. For each sampling location to be restored, select 3 to 12 adjacent data points outside the local gap, call the twin simulation model to calculate the signed distance value of the sampling location to be restored, and determine the distance correction direction corresponding to the sampling location to be restored based on the change of the signed distance of the adjacent data outside the local gap. S323. Along the distance correction direction, iteratively correct the signed distance value of the sampling position to be restored, and after each correction, calculate the continuous deviation between the sampling position to be restored and the adjacent data outside the local gap; S324. When the continuous deviation is lower than the set deviation threshold, or the continuous deviation change is lower than the set change threshold for 2 to 5 consecutive iterations, stop the iterative correction and use the current sampling position to be recovered and its corrected signed distance value as the recovery data within the local gap.

[0014] Optionally, S4 specifically includes: S41. Determine the octree sampling range based on the location boundary of the missing area, establish an initial sampling unit within the octree sampling range, and set up supplementary sampling points at one spatial center point and eight corner points of the initial sampling unit respectively. S42. Call the updated twin simulation model, calculate the repair discrimination value of the corresponding completion sampling point of the spatial center point and the 8 corner points in the initial sampling unit, and determine whether the initial sampling unit contains the surface to be restored based on the positive and negative changes and numerical differences of the repair discrimination value in the same initial sampling unit. S43. Perform octree subdivision on the initial sampling unit containing the surface to be restored, divide the corresponding initial sampling unit into 8 sub-sampling units, and redistribute the complete sampling points at 1 spatial center point and 8 corner points of each sub-sampling unit. S44. Repeat the process for each sub-sampling unit, calculate the repair discrimination value and determine the surface to be restored. Sub-sampling units that contain the surface to be restored but have not reached the set subdivision level of 4 to 8 layers are further subdivided. Sub-sampling units that have reached the set subdivision level are used as surface extraction units. S45. Within the surface extraction unit, zero-level plane matching is performed based on the repair discrimination value of the completed sampling points to screen out the completed sampling points belonging to the surface to be restored, and connections are established according to the spatial adjacency relationship between the screened completed sampling points to form a candidate repair model.

[0015] Optionally, S45 specifically includes: S451. Within the surface extraction unit, compare the signs of the repair discriminant values ​​of two completed sampling points located on the same unit edge. When the repair discriminant values ​​of the two completed sampling points are located on both sides of zero, mark the corresponding unit edge as a surface crossing edge. S452. Perform linear interpolation on the two completed sampling points on the surface crossing edge, and calculate the zero horizontal intersection point on the surface crossing edge based on the spatial position of the two completed sampling points and the repair discrimination value. S453. Connect the zero-horizontal intersection points within the same surface extraction unit according to the spatial arrangement order of the surface crossing edges within the surface extraction unit, and generate local repair patches based on the connection direction between the zero-horizontal intersection points. S454. Merge the zero-level intersection points on the shared boundary in the adjacent surface extraction units, stitch the local repair patches on both sides of the shared boundary according to the merged zero-level intersection points, and remove isolated patches that have not established connections with adjacent patches to form a candidate repair model.

[0016] Optionally, S5 specifically includes: S51. Extract continuous repair lines based on the connection relationship of the candidate repair models, and divide the candidate repair models into multiple repair path segments according to the direction of the continuous repair lines. S52. For each repair path segment, set the value range for path spacing, path direction, and compensation amount, and combine the path spacing, path direction, and compensation amount as optimization variables, where: The path spacing is a distance parameter between adjacent repair path lines, used to limit the density of path lines within the repair path segment. The path direction is the extension direction of the repair path line within the repair path segment, used to limit the arrangement angle of the repair path line relative to the surface trend of the candidate repair model. The compensation amount is a parameter used to locally correct the position of the repair path line, and is used to adjust the surface continuity deviation between the candidate repair model and the feature dataset. S53. Map the optimization variables to the corresponding repair path segments, calculate the surface continuity deviation between the repair path segments and the feature dataset, and use the surface continuity deviation as the target evaluation value of the Bayesian optimization method. S54. Using the Bayesian optimization method, the candidate values ​​of the optimization variables are updated based on the target evaluation value, and the candidate values ​​are iteratively filtered to obtain the repair path parameters corresponding to each repair path segment. S55. According to the connection order between the repair path segments, the repair path parameters corresponding to each repair path segment are sequentially spliced ​​together, and the path direction and compensation amount of adjacent repair path segments are smoothly connected to form the repair path parameters for the candidate repair model.

[0017] Optionally, S6 specifically includes: S61. The repair result data is registered and compared with the candidate repair model. According to the corresponding sampling position, the positional deviation of the repair result data relative to the candidate repair model is calculated, and the comparison deviation is formed based on the positional deviation. The repair result data is the sampling data re-collected after the defective area is repaired. S62. The sampling positions corresponding to the candidate repair model are used as the observation input of the recursive least squares update method, and the comparison deviation is used as the observation residual to establish a recursive update relationship for the fitting parameters of the twin simulation model. S63. Using the recursive least squares update method, the correction amount of the fitting parameters is calculated based on the observation residuals, and the correction amount is superimposed on the fitting parameters of the twin simulation model to form the corrected twin simulation model. S64. According to the distribution of the comparison deviation in the candidate repair model, match the corresponding repair path segment, and based on the deviation direction and deviation magnitude of the corresponding repair path segment, incrementally correct the path spacing, path direction and compensation amount in the repair path parameters.

[0018] The beneficial effects of this invention are: First, this invention uses the SDF implicit neural representation method to continuously fit the effective surface data and takes the missing area as the range to be calculated, so that the missing area can be calculated through the twin simulation model, reducing the problems of discontinuity, abrupt change and excessive smoothing caused by ordinary interpolation or manual surface patching.

[0019] Secondly, this invention corrects the twin simulation model through local occlusion reconstruction and adaptive octree sampling, and performs layered completion calculations in the defective area, so that the candidate repair model can better adapt to complex surfaces and local detail changes.

[0020] Finally, this invention uses a Bayesian optimization method to iteratively screen the repair path parameters, and incrementally corrects the twin simulation model and repair path parameters based on the repair result data, forming a closed loop of modeling, completion, path optimization and feedback update, thereby improving the stability and adaptability of 3D printed high-definition repair. Attached Figure Description

[0021] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a 3D printing high-definition repair method based on twin simulation proposed in this invention; Figure 2 This is a flowchart of the local occlusion reconstruction and model parameter update process of a 3D printing high-definition repair method based on twin simulation proposed in this invention. Figure 3This is a flowchart of the repair path parameter optimization process for a 3D printing high-definition repair method based on twin simulation proposed in this invention. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0023] refer to Figures 1-3 A 3D printing high-definition repair method based on twin simulation includes the following steps: S1. Acquire high-definition acquisition data of the object to be repaired and preprocess it to generate a feature dataset; S2. Establish the surface function solution domain according to the effective sampling positions in the feature dataset, use the SDF implicit neural representation method for continuous fitting, and incorporate the defective region into the range to be calculated for the surface function to obtain the twin simulation model. S3. Extract the complete data region from the feature dataset, set a local gap in the complete data region using the local occlusion reconstruction method, and call the twin simulation model to calculate the restored data in the local gap. Compare the restored data with the data before extraction to backpropagate the error, and iteratively update the fitting parameters of the twin simulation model. S4. Adaptive octree sampling method is used to deploy completion sampling points in the defect area, the updated twin simulation model is called to calculate the repair discrimination value of the completion sampling points, and the completion sampling points are screened and connected to form candidate repair models. S5. Divide the repair path segments according to the candidate repair model, and use the path spacing, path direction and compensation amount corresponding to the repair path segments as optimization variables. Then, use the Bayesian optimization method to iteratively filter the optimization variables according to the surface continuous deviation to obtain the repair path parameters. S6. Obtain the repair result data and use the recursive least squares update method to incrementally correct the repair path parameters.

[0024] In this embodiment, the preprocessing specifically includes: Perform data integrity verification on the high-definition acquired data, remove duplicate and invalid sampled data, and create a sampling index for the remaining data; The feature point matching method is used to initially align the data under different acquisition angles, and the ICP registration method is used to iteratively register the initially aligned data to obtain the acquisition data under unified coordinates. The collected data under a unified coordinate system is scaled and the sampling density is rearranged. The neighborhood bilateral filtering method is used to remove discrete noise and retain local detail changes. Based on sampling continuity and local data loss, the effective sampling locations and missing region locations are divided, and a feature dataset containing the effective sampling locations, local detail changes, and missing region locations is generated. In this embodiment, the high-definition acquisition data includes multi-view image data and point cloud sampling data, with a point cloud sampling interval of 0.02mm to 0.10mm; Data from different acquisition angles are initially aligned through feature point matching and coordinates are unified through ICP registration, with ICP registration iterations ranging from 20 to 60 times. Based on the registered acquisition data, the sampling density is sorted according to the target sampling interval of 0.03mm to 0.08mm, and discrete noise is removed by 5×5 or 7×7 neighborhood bilateral filtering. When the distance between adjacent sampling points is greater than 2 to 5 times the target sampling distance, and there are continuous data gaps around it, the corresponding area is marked as the location of the missing area. The data locations where the distance between adjacent sampling points is within the target sampling distance range and the data locations that have been removed by noise are marked as valid sampling locations; The feature dataset is formed by the effective sampling locations, local detail changes, and the locations of the missing areas.

[0025] In this embodiment, S2 specifically includes: S21. Based on the valid sampling locations in the feature dataset, determine the surface coverage area of ​​the object to be repaired, and extend the solution boundary outward according to the surface coverage area to establish the surface function solution domain. Include the defective area in the feature dataset within the calculation range of the surface function solution domain, where: The surface function solution domain is a function calculation region established based on the distribution range of effective sampling positions, which is used to limit the fitting range and calling range of the SDF implicit neural representation method; The area to be calculated is the data gap area corresponding to the missing area in the surface function solution domain, which is used to carry the surface function calculation within the missing area; S22. Estimate the neighborhood normal for the effective sampling location, set offset sampling points along the positive and negative directions of the neighborhood normal, take the effective sampling location as the zero distance sample, and take the offset sampling point as the signed distance sample to form the SDF fitting sample. S23. Using the SDF implicit neural representation method, a function is fitted to the SDF-fitted samples, mapping the sampled coordinates to signed distance values, and iteratively correcting the fitting parameters of the SDF implicit neural representation method based on the distance difference between zero-distance samples and signed distance samples, wherein: The signed distance value represents the distance of the sampling coordinates relative to the surface of the object to be repaired, where the sign is used to distinguish the relative positions of the sampling coordinates on both sides of the surface; S24. Set up estimation sampling points within the estimation range, call the modified SDF implicit neural representation method, calculate the signed distance value of the estimation sampling points, and determine the continuous surface distribution within the defect area according to the zero-level change relationship of the signed distance value. S25. Using the modified SDF implicit neural representation method as the surface simulation function, the surface function solution domain as the function call range, and the area to be calculated as the defect calculation region, a twin simulation model of the object to be repaired is formed according to the call sequence of sampled coordinate input, signed distance value calculation, and zero-level plane extraction, wherein: The surface simulation function is an SDF implicit neural representation method after fitting parameter correction, which is used to calculate the corresponding signed distance value based on the input sampling coordinates. The twin simulation model is a callable computational model used to perform surface extrapolation of local gaps and defective areas in subsequent steps.

[0026] In this embodiment, S23 specifically includes: S231. Based on the zero-distance samples and signed distance samples in the SDF fitting samples, establish a distance supervision relationship, set the target distance corresponding to the zero-distance sample to zero, and set the target distance corresponding to the signed distance sample to a positive or negative value consistent with the normal offset direction. S232. A multilayer perceptron containing 4 to 8 hidden layers is used to perform nonlinear mapping on the sampling coordinates of the SDF fitting samples. The hidden dimension of each hidden layer is 64 to 256. The hidden features corresponding to the sampling coordinates are calculated layer by layer, and the predicted signed distance value is obtained by regression of the hidden features. S233. Calculate the point-by-point error between the predicted signed distance value and the target distance, apply surface constraint weights to the error terms corresponding to the zero-distance samples, and apply directional consistency constraints to the error terms corresponding to the signed distance samples to form the SDF fitting error. S234. Based on the SDF fitting error, backpropagation is performed to update the weight parameters and bias parameters in the multilayer perceptron, and the predicted signed distance value is recalculated after each parameter update. The mapping relationship between the sampled coordinates and the signed distance value is converged round by round. S235. When the change in SDF fitting error is lower than the set convergence threshold for 3 to 10 consecutive rounds, stop parameter updating and use the current weight parameters and bias parameters of the multilayer perceptron as the fitting parameters of the SDF implicit neural representation method.

[0027] In this embodiment, S3 specifically includes: S31. In the feature dataset, select data that are continuously sampled and not included in the missing area as the complete data region. Use a local occlusion reconstruction method to determine the occlusion range within the complete data region, and remove data within the occlusion range to form a local gap. Use the retained data around the local gap as the basis for gap restoration, wherein: The local occlusion reconstruction method is a self-supervised training method that temporarily deletes some known data within the complete data area and uses the retained data around the deletion location to recover the data at the deletion location. The coverage area is the area of ​​data temporarily deleted within the complete data area; A local gap is an area to be recovered after data within the obscured area has been deleted; The basis for gap restoration is data around the local gap that has not been deleted and has a sampling continuity relationship with the local gap; S32. Call the twin simulation model to calculate the signed distance value of the sampling position to be restored within the local gap, and perform adjacent constraint correction on the signed distance value of the sampling position to be restored based on the surface continuity relationship of the data outside the local gap, so as to obtain the restored data within the local gap. S33. Compare the restored data with the data of the corresponding position of the complete data area before occlusion, calculate the distance error and the continuous error of the local gap edge of the restored data respectively, and weight and merge the distance error and the continuous error to obtain the occlusion reconstruction error. S34. Based on the occlusion reconstruction error, backpropagate and update the fitting parameters of the twin simulation model, and after the update, reset the local gap and continue to perform the recovery calculation until the occlusion reconstruction error meets the set convergence condition to obtain the updated twin simulation model.

[0028] In this embodiment, S32 specifically includes: S321. Within the local gap, determine the sampling positions to be restored in order from the edge of the gap to the center of the gap, and establish a correspondence between each sampling position to be restored and the adjacent data outside the local gap. S322. For each sampling location to be restored, select 3 to 12 adjacent data points outside the local gap, call the twin simulation model to calculate the signed distance value of the sampling location to be restored, and determine the distance correction direction corresponding to the sampling location to be restored based on the change of the signed distance of the adjacent data outside the local gap. S323. Along the distance correction direction, iteratively correct the signed distance value of the sampling position to be restored, and after each correction, calculate the continuous deviation between the sampling position to be restored and the adjacent data outside the local gap; S324. When the continuous deviation is lower than the set deviation threshold, or the continuous deviation change is lower than the set change threshold for 2 to 5 consecutive iterations, stop the iterative correction and use the current sampling position to be recovered and its corrected signed distance value as the recovery data within the local gap.

[0029] In this embodiment, S4 specifically includes: S41. Determine the octree sampling range based on the location boundary of the missing area, establish an initial sampling unit within the octree sampling range, and set up supplementary sampling points at one spatial center point and eight corner points of the initial sampling unit respectively. S42. Call the updated twin simulation model, calculate the repair discrimination value of the corresponding completion sampling point of the spatial center point and the 8 corner points in the initial sampling unit, and determine whether the initial sampling unit contains the surface to be restored based on the positive and negative changes and numerical differences of the repair discrimination value in the same initial sampling unit. S43. Perform octree subdivision on the initial sampling unit containing the surface to be restored, divide the corresponding initial sampling unit into 8 sub-sampling units, and redistribute the complete sampling points at 1 spatial center point and 8 corner points of each sub-sampling unit. S44. Repeat the process for each sub-sampling unit, calculate the repair discrimination value and determine the surface to be restored. Sub-sampling units that contain the surface to be restored but have not reached the set subdivision level of 4 to 8 layers are further subdivided. Sub-sampling units that have reached the set subdivision level are used as surface extraction units. S45. Within the surface extraction unit, zero-level plane matching is performed based on the repair discrimination value of the completed sampling points to screen out the completed sampling points belonging to the surface to be restored, and connections are established according to the spatial adjacency relationship between the screened completed sampling points to form a candidate repair model.

[0030] In this embodiment, S45 specifically includes: S451. Within the surface extraction unit, compare the signs of the repair discriminant values ​​of two completed sampling points located on the same unit edge. When the repair discriminant values ​​of the two completed sampling points are located on both sides of zero, mark the corresponding unit edge as a surface crossing edge. S452. Perform linear interpolation on the two completed sampling points on the surface crossing edge, and calculate the zero horizontal intersection point on the surface crossing edge based on the spatial position of the two completed sampling points and the repair discrimination value. S453. Connect the zero-horizontal intersection points within the same surface extraction unit according to the spatial arrangement order of the surface crossing edges within the surface extraction unit, and generate local repair patches based on the connection direction between the zero-horizontal intersection points. S454. Merge the zero-level intersection points on the shared boundary in the adjacent surface extraction units, stitch the local repair patches on both sides of the shared boundary according to the merged zero-level intersection points, and remove isolated patches that have not established connections with adjacent patches to form a candidate repair model.

[0031] In this embodiment, S5 specifically includes: S51. Extract continuous repair lines based on the connection relationship of the candidate repair models, and divide the candidate repair models into multiple repair path segments according to the direction of the continuous repair lines. S52. For each repair path segment, set the value range for path spacing, path direction, and compensation amount, and combine the path spacing, path direction, and compensation amount as optimization variables, where: The path spacing is a distance parameter between adjacent repair path lines, used to limit the density of path lines within a repair path segment. The path direction refers to the direction in which the repair path line extends within the repair path segment, and is used to limit the arrangement angle of the repair path line relative to the surface trend of the candidate repair model. The compensation amount is a parameter used to make local position corrections at the corresponding positions of the repair path lines, and is used to adjust the surface continuity deviation between the candidate repair model and the feature dataset. S53. Map the optimization variables to the corresponding repair path segments, calculate the surface continuity deviation between the repair path segments and the feature dataset, and use the surface continuity deviation as the target evaluation value of the Bayesian optimization method. S54. Using the Bayesian optimization method, the candidate values ​​of the optimization variables are updated based on the target evaluation value, and the candidate values ​​are iteratively filtered to obtain the repair path parameters corresponding to each repair path segment. S55. According to the connection order between the repair path segments, the repair path parameters corresponding to each repair path segment are sequentially spliced ​​together, and the path direction and compensation amount of adjacent repair path segments are smoothly connected to form the repair path parameters for the candidate repair model.

[0032] In this embodiment, S6 specifically includes: S61. Register and compare the repair result data with the candidate repair model. According to the corresponding sampling position, calculate the positional deviation of the repair result data relative to the candidate repair model, and form a comparison deviation based on the positional deviation. The repair result data is the sampling data re-collected after the defective area is repaired. S62. The sampling positions corresponding to the candidate repair model are used as the observation input of the recursive least squares update method, and the comparison deviation is used as the observation residual to establish a recursive update relationship for the fitting parameters of the twin simulation model. S63. Using the recursive least squares update method, the correction amount of the fitting parameters is calculated based on the observation residuals, and the correction amount is superimposed on the fitting parameters of the twin simulation model to form the corrected twin simulation model. S64. According to the distribution of the comparison deviation in the candidate repair model, match the corresponding repair path segment, and based on the deviation direction and deviation magnitude of the corresponding repair path segment, incrementally correct the path spacing, path direction and compensation amount in the repair path parameters.

[0033] Example 1: To verify the feasibility of this invention in practice, it was applied to a high-definition repair scenario of a complex-looking component. The component's surface has continuous curved surfaces and fine textures, with irregular defects in some areas and obvious undulations at the defect edges. Conventional scanning and surface repair methods mainly rely on interpolation of the defect edges, which easily results in an overly smooth curved surface being filled into the central area of ​​the defect. Small breaks are also prone to appear at the edge junctions, leading to abrupt changes between the repaired surface and the original surface.

[0034] In this scenario, multi-view image data and point cloud sampling data of the object to be repaired are first acquired, with a point cloud sampling interval of 0.02mm to 0.10mm. After data verification, registration, sampling density adjustment, and neighborhood bilateral filtering, a feature dataset containing effective sampling locations, local detail changes, and the location of the defective area is formed. Subsequently, the SDF implicit neural representation method is used to continuously fit the effective surface data, and the defective area is used as the range to be inferred to form a twin simulation model.

[0035] During the model correction process, local gaps were set within the complete data area, allowing the twin simulation model to reconstruct the data within the gap based on the data surrounding the gap. The reconstructed data was then compared with the data before occlusion. After multiple rounds of local occlusion reconstruction, the average error of the occlusion reconstruction decreased from 0.082 mm to 0.026 mm, indicating that the twin simulation model can learn the surface change patterns of the object to be repaired.

[0036] During the actual defect area completion process, an adaptive octree sampling method is used to deploy completion sampling points, and refined sampling and zero-level plane extraction are performed based on the repair discrimination value to form a candidate repair model. Compared with the conventional interpolation surface completion method, the average continuous deviation at the defect edge of the candidate repair model formed by this invention is reduced from 0.118mm to 0.041mm, and the maximum local deviation is reduced from 0.236mm to 0.087mm.

[0037] During the repair path generation process, candidate repair models are divided into multiple repair path segments, and path spacing, path direction, and compensation amount are used as optimization variables. Bayesian optimization method is used for iterative screening. After the repair is completed, the repair result data is collected again and compared with the candidate repair models. The fitting parameters of the twin simulation model are corrected using the recursive least squares update method, and the repair path parameters are incrementally corrected at the same time.

[0038] After feedback and updates, the average height deviation between the repaired area and the original surface decreased to 0.034 mm, the number of edge abrupt change points decreased from 79 to 25, and the surface detail retention rate reached 91.7%. This indicates that the present invention can improve the surface connection accuracy, detail restoration effect and repair stability of 3D printed high-definition repair.

[0039] Table 1. Data on the Verification of Twin Simulation Repair Effect

[0040] As shown in Table 1, the present invention outperforms conventional scanning and surface repair methods in terms of defect edge continuity, local deviation control, occlusion reconstruction error, post-repair height deviation, and surface detail preservation. This indicates that the present invention, through continuous surface calculation of the defect area using a twin simulation model and combined with repair path parameter optimization and feedback updates, can reduce abrupt changes between the repair area and the original surface, thereby improving the precision and stability of 3D printed high-definition repair.

[0041] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A 3D printing high-definition restoration method based on twin simulation, characterized in that, Includes the following steps: S1. Acquire high-definition acquisition data of the object to be repaired and preprocess it to generate a feature dataset; S2. Establish the surface function solution domain according to the effective sampling positions in the feature dataset, use the SDF implicit neural representation method for continuous fitting, and incorporate the defective region into the range to be calculated for the surface function to obtain the twin simulation model. S3. Extract the complete data region from the feature dataset, set a local gap in the complete data region using the local occlusion reconstruction method, and call the twin simulation model to calculate the restored data in the local gap. Compare the restored data with the data before extraction to backpropagate the error, and iteratively update the fitting parameters of the twin simulation model. S4. Adaptive octree sampling method is used to deploy completion sampling points in the defect area, the updated twin simulation model is called to calculate the repair discrimination value of the completion sampling points, and the completion sampling points are screened and connected to form candidate repair models. S5. Divide the repair path segments according to the candidate repair model, and use the path spacing, path direction and compensation amount corresponding to the repair path segments as optimization variables. Then, use the Bayesian optimization method to iteratively filter the optimization variables according to the surface continuous deviation to obtain the repair path parameters. S6. Obtain the repair result data and use the recursive least squares update method to incrementally correct the repair path parameters.

2. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. The preprocessing specifically includes: Perform data integrity verification on the high-definition acquired data, remove duplicate and invalid sampled data, and create a sampling index for the remaining data; The feature point matching method is used to initially align the data under different acquisition angles, and the ICP registration method is used to iteratively register the initially aligned data to obtain the acquisition data under unified coordinates. The collected data under a unified coordinate system is scaled and the sampling density is rearranged. The neighborhood bilateral filtering method is used to remove discrete noise and retain local detail changes. Based on the continuity of sampling and the situation of missing local data, the effective sampling locations and the missing area locations are divided, and a feature dataset containing the effective sampling locations, local detail changes and the missing area locations is generated.

3. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S2 specifically includes: S21. Based on the effective sampling locations in the feature dataset, determine the surface coverage area of ​​the object to be repaired, and set the solution boundary outward according to the surface coverage area to establish the surface function solution domain. The defective area in the feature dataset is included in the range to be calculated within the surface function solution domain. S22. Estimate the neighborhood normal for the effective sampling location, set offset sampling points along the positive and negative directions of the neighborhood normal, take the effective sampling location as the zero distance sample, and take the offset sampling point as the signed distance sample to form the SDF fitting sample. S23. Using the SDF implicit neural representation method, the SDF fitted samples are fitted with a function, the sampled coordinates are mapped to signed distance values, and the fitting parameters of the SDF implicit neural representation method are iteratively corrected based on the distance difference between the zero-distance samples and the signed distance samples. S24. Set up estimation sampling points within the estimation range, call the modified SDF implicit neural representation method, calculate the signed distance value of the estimation sampling points, and determine the continuous surface distribution within the defect area according to the zero-level change relationship of the signed distance value. S25. Using the modified SDF implicit neural representation method as the surface simulation function, the surface function solution domain as the function call range, and the area to be calculated as the defect calculation region, a twin simulation model of the object to be repaired is formed according to the call sequence of sampled coordinate input, signed distance value calculation, and zero-level plane extraction, wherein: The surface simulation function is an SDF implicit neural representation method after fitting parameter correction, used to calculate the corresponding signed distance value based on the input sampling coordinates; The twin simulation model is a callable computational model used to perform surface extrapolation of local gaps and defective areas in subsequent steps.

4. The method of claim 3, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S23 specifically includes: S231. Based on the zero-distance samples and signed distance samples in the SDF fitting samples, establish a distance supervision relationship, set the target distance corresponding to the zero-distance sample to zero, and set the target distance corresponding to the signed distance sample to a positive or negative value consistent with the normal offset direction. S232. A multilayer perceptron containing 4 to 8 hidden layers is used to perform nonlinear mapping on the sampling coordinates of the SDF fitting samples. The hidden dimension of each hidden layer is 64 to 256. The hidden features corresponding to the sampling coordinates are calculated layer by layer, and the predicted signed distance value is obtained by regression of the hidden features. S233. Calculate the point-by-point error between the predicted signed distance value and the target distance, apply surface constraint weights to the error terms corresponding to the zero-distance samples, and apply directional consistency constraints to the error terms corresponding to the signed distance samples to form the SDF fitting error. S234. Based on the SDF fitting error, backpropagation is performed to update the weight parameters and bias parameters in the multilayer perceptron, and the predicted signed distance value is recalculated after each parameter update. The mapping relationship between the sampled coordinates and the signed distance value is converged round by round. S235. When the change in SDF fitting error is lower than the set convergence threshold for 3 to 10 consecutive rounds, stop parameter updating and use the current weight parameters and bias parameters of the multilayer perceptron as the fitting parameters of the SDF implicit neural representation method.

5. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S3 specifically includes: S31. In the feature dataset, select the data that is continuously sampled and not included in the missing area as the complete data area. Use the local occlusion reconstruction method to determine the occlusion range in the complete data area and remove the data within the occlusion range to form a local gap. Use the retained data around the local gap as the basis for gap restoration. S32. Call the twin simulation model to calculate the signed distance value of the sampling position to be restored within the local gap, and perform adjacent constraint correction on the signed distance value of the sampling position to be restored based on the surface continuity relationship of the data outside the local gap, so as to obtain the restored data within the local gap. S33. Compare the restored data with the data of the corresponding position of the complete data area before occlusion, calculate the distance error and the continuous error of the local gap edge of the restored data respectively, and weight and merge the distance error and the continuous error to obtain the occlusion reconstruction error. S34. Based on the occlusion reconstruction error, backpropagate and update the fitting parameters of the twin simulation model, and after the update, reset the local gap and continue to perform the recovery calculation until the occlusion reconstruction error meets the set convergence condition to obtain the updated twin simulation model.

6. The method of claim 5, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. Specifically, S32 includes: S321. Within the local gap, determine the sampling positions to be restored in order from the edge of the gap to the center of the gap, and establish a correspondence between each sampling position to be restored and the adjacent data outside the local gap. S322. For each sampling location to be restored, select 3 to 12 adjacent data points outside the local gap, call the twin simulation model to calculate the signed distance value of the sampling location to be restored, and determine the distance correction direction corresponding to the sampling location to be restored based on the change of the signed distance of the adjacent data outside the local gap. S323. Along the distance correction direction, iteratively correct the signed distance value of the sampling position to be restored, and after each correction, calculate the continuous deviation between the sampling position to be restored and the adjacent data outside the local gap; S324. When the continuous deviation is lower than the set deviation threshold, or the continuous deviation change is lower than the set change threshold for 2 to 5 consecutive iterations, stop the iterative correction and use the current sampling position to be recovered and its corrected signed distance value as the recovery data within the local gap.

7. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S4 specifically includes: S41. Determine the octree sampling range based on the location boundary of the missing area, establish an initial sampling unit within the octree sampling range, and set up supplementary sampling points at one spatial center point and eight corner points of the initial sampling unit respectively. S42. Call the updated twin simulation model, calculate the repair discrimination value of the corresponding completion sampling point of the spatial center point and the 8 corner points in the initial sampling unit, and determine whether the initial sampling unit contains the surface to be restored based on the positive and negative changes and numerical differences of the repair discrimination value in the same initial sampling unit. S43. Perform octree subdivision on the initial sampling unit containing the surface to be restored, divide the corresponding initial sampling unit into 8 sub-sampling units, and redistribute the complete sampling points at 1 spatial center point and 8 corner points of each sub-sampling unit. S44. Repeat the process for each sub-sampling unit, calculate the repair discrimination value and determine the surface to be restored. Sub-sampling units that contain the surface to be restored but have not reached the set subdivision level of 4 to 8 layers are further subdivided. Sub-sampling units that have reached the set subdivision level are used as surface extraction units. S45. Within the surface extraction unit, zero-level plane matching is performed based on the repair discrimination value of the completed sampling points to screen out the completed sampling points belonging to the surface to be restored, and connections are established according to the spatial adjacency relationship between the screened completed sampling points to form a candidate repair model.

8. The 3D printing high-definition restoration method based on twin simulation according to claim 7, characterized in that, Specifically, S45 includes: S451. Within the surface extraction unit, compare the signs of the repair discriminant values ​​of two completed sampling points located on the same unit edge. When the repair discriminant values ​​of the two completed sampling points are located on both sides of zero, mark the corresponding unit edge as a surface crossing edge. S452. Perform linear interpolation on the two completed sampling points on the surface crossing edge, and calculate the zero horizontal intersection point on the surface crossing edge based on the spatial position of the two completed sampling points and the repair discrimination value. S453. Connect the zero-horizontal intersection points within the same surface extraction unit according to the spatial arrangement order of the surface crossing edges within the surface extraction unit, and generate local repair patches based on the connection direction between the zero-horizontal intersection points. S454. Merge the zero-level intersection points on the shared boundary in the adjacent surface extraction units, stitch the local repair patches on both sides of the shared boundary according to the merged zero-level intersection points, and remove isolated patches that have not established connections with adjacent patches to form a candidate repair model.

9. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S5 specifically includes: S51. Extract continuous repair lines based on the connection relationship of the candidate repair models, and divide the candidate repair models into multiple repair path segments according to the direction of the continuous repair lines. S52. For each repair path segment, set the value range for path spacing, path direction, and compensation amount, and combine the path spacing, path direction, and compensation amount as optimization variables, where: The path spacing is a distance parameter between adjacent repair path lines, used to limit the density of path lines within the repair path segment. The path direction is the extension direction of the repair path line within the repair path segment, used to limit the arrangement angle of the repair path line relative to the surface trend of the candidate repair model. The compensation amount is a parameter used to locally correct the position of the repair path line, and is used to adjust the surface continuity deviation between the candidate repair model and the feature dataset. S53. Map the optimization variables to the corresponding repair path segments, calculate the surface continuity deviation between the repair path segments and the feature dataset, and use the surface continuity deviation as the target evaluation value of the Bayesian optimization method. S54. Using the Bayesian optimization method, the candidate values ​​of the optimization variables are updated based on the target evaluation value, and the candidate values ​​are iteratively filtered to obtain the repair path parameters corresponding to each repair path segment. S55. According to the connection order between the repair path segments, the repair path parameters corresponding to each repair path segment are sequentially spliced ​​together, and the path direction and compensation amount of adjacent repair path segments are smoothly connected to form the repair path parameters for the candidate repair model.

10. The method of claim 1, wherein the method is a high-definition restoration method based on twin simulation for 3D printing. S6 specifically includes: S61. The repair result data is registered and compared with the candidate repair model. According to the corresponding sampling position, the positional deviation of the repair result data relative to the candidate repair model is calculated, and the comparison deviation is formed based on the positional deviation. The repair result data is the sampling data re-collected after the defective area is repaired. S62. The sampling positions corresponding to the candidate repair model are used as the observation input of the recursive least squares update method, and the comparison deviation is used as the observation residual to establish a recursive update relationship for the fitting parameters of the twin simulation model. S63. Using the recursive least squares update method, the correction amount of the fitting parameters is calculated based on the observation residuals, and the correction amount is superimposed on the fitting parameters of the twin simulation model to form the corrected twin simulation model. S64. According to the distribution of the comparison deviation in the candidate repair model, match the corresponding repair path segment, and based on the deviation direction and deviation magnitude of the corresponding repair path segment, incrementally correct the path spacing, path direction and compensation amount in the repair path parameters.