An additive manufacturing model visualization method, apparatus, and medium
By using DeepSDF network and adaptive convolution kernel technology, the problems of low rendering efficiency and low data compression rate of additive manufacturing models are solved, enabling real-time monitoring and efficient data processing, thereby improving the rendering quality and efficiency of additive manufacturing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG HUAYUN 3D TECH CO LTD
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-17
AI Technical Summary
Existing additive manufacturing model rendering is inefficient and cannot perform real-time quality analysis. Furthermore, data compression methods cannot effectively handle the local features of volumetric data, resulting in low compression ratios and easy loss of microstructural details.
The additive manufacturing model is decomposed into multiple levels using the DeepSDF network. By constructing an adaptive convolution kernel and dynamically adjusting the ray sampling step size, and combining it with a BVH tree structure for parallel computation, the model achieves hierarchical data compression and real-time defect detection.
It improves rendering efficiency and quality, enables real-time monitoring and quality assessment of the additive manufacturing process, and ensures the efficiency and accuracy of data storage and transmission.
Smart Images

Figure CN121482293B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of general image data processing technology, and specifically to a method, device and medium for visualizing additive manufacturing models. Background Technology
[0002] Additive manufacturing, as an advanced digital manufacturing technology, has been widely applied in high-end fields such as aerospace, medical implants, and complex molds. Real-time monitoring and quality inspection of its manufacturing process are crucial to ensuring product accuracy and reliability. Visualization of the additive manufacturing process primarily relies on volumetric rendering technology. Traditional volumetric rendering techniques mainly use ray-mapping algorithms to visualize the internal structure of the model. However, ray-mapping algorithms typically employ a fixed-step sampling strategy, which cannot adaptively adjust to local density changes, resulting in low rendering efficiency. Furthermore, it cannot perform quality analysis simultaneously during rendering, requiring additional post-processing steps for defect detection, thus impacting the real-time performance of the additive model. In addition, with the rapid development of additive manufacturing technology, the complexity and data volume of additive manufacturing models are increasing exponentially, necessitating data compression to address storage and transmission issues. However, existing data compression methods are mostly based on geometric mesh compression, often ignoring the hierarchical structure and local features of the additive manufacturing model. This results in ineffective processing of volumetric data, leading to low compression ratios and a tendency to lose microscopic structural details, failing to meet the accuracy requirements of additive manufacturing. Summary of the Invention
[0003] To address the above problems, this invention proposes a method for visualizing additive manufacturing models, comprising:
[0004] The raw volume data generated during the additive manufacturing process is decomposed into multiple layers. The DeepSDF network corresponding to each layer is called, and the raw volume data corresponding to each layer is loaded sequentially to convert the raw volume data into a set of network weight parameters. This achieves hierarchical compression of the raw volume data and obtains the compressed volume data.
[0005] Based on the sampling points corresponding to the detection rays, the local region where the sampling points are located is reconstructed using the compressed volume data. Based on the local density gradient and material property parameters corresponding to the reconstructed voxels, convolution kernels of different sizes are constructed so that the volume data is convolved under the receptive field corresponding to the convolution kernel to obtain the enhanced volume data.
[0006] The enhanced volume data is sampled to obtain sampling results. During the sampling process, defect detection is performed on the enhanced volume data based on the local density gradient corresponding to the sampling point to obtain the defect location.
[0007] By adjusting the sampling step size of the detection ray to the next sampling point based on the local density gradient of the sampling point, and repeating the sampling according to the sampling step size, until the detection ray passes out of the spatial range corresponding to the original volume data;
[0008] Using a forward synthesis algorithm, a visualization image corresponding to the additive manufacturing model is generated based on the sampling results and the defect location corresponding to each detection ray.
[0009] In one implementation of the present invention, convolutional kernels of different sizes are constructed based on the local density gradient and material property parameters corresponding to the reconstructed voxels, specifically including:
[0010] For the voxels reconstructed in the local region, the local density gradient corresponding to the voxel is determined based on the density values of the surrounding voxels.
[0011] Based on the material property parameters corresponding to the volume data, a material property parameter matrix is constructed, and the weight coefficients corresponding to the local density gradient and the material property parameter matrix are determined respectively; wherein, the weight coefficient corresponding to the local density gradient is positively correlated with the local density gradient;
[0012] The adjustment factor corresponding to the basic receptive field is determined by multiplying the weighting coefficient with the local density gradient and the material property parameter matrix, respectively.
[0013] The basic receptive field is adjusted based on the adjustment factor, and convolutional kernels of different sizes are constructed using the adjusted basic receptive field.
[0014] In one implementation of the present invention, adjusting the sampling step size of the detection ray to the next sampling point based on the local density gradient of the sampling point specifically includes:
[0015] The corresponding step size adjustment coefficient is determined by the local density gradient of the sampling points;
[0016] The step size correction factor is determined based on the difference between the preset benchmark correction factor and the product of the step size adjustment coefficient and the local density gradient.
[0017] The basic step size corresponding to the detection ray is adjusted according to the step size correction factor to obtain the sampling step size.
[0018] In one implementation of the present invention, before adjusting the base step size corresponding to the detection ray according to the step size correction factor, the method further includes:
[0019] Obtain historical production data of the additive manufacturing model corresponding to the original body data, and determine the historical defect distribution information corresponding to the additive manufacturing model based on the historical production data;
[0020] Based on the historical defect distribution information, the defect coverage rate corresponding to the additive manufacturing model is determined;
[0021] The basic step size corresponding to the detection ray is determined based on the production ratio of additive manufacturing models with defect coverage greater than the preset coverage; wherein the basic step size is negatively correlated with the production ratio of the model.
[0022] In one implementation of the present invention, defect detection is performed on the enhanced volume data based on the local density gradient corresponding to the sampling point to obtain the defect location, specifically including:
[0023] Calculate the local density gradient standard deviation within the receptive field where the sampling point is located. When the local density gradient standard deviation is greater than a preset standard deviation, mark the area where the receptive field is located as a pore region.
[0024] For each sampling point, the second derivative of its corresponding local density gradient is determined. If the second derivative is greater than a preset value, the sampling point is marked as a candidate anomaly.
[0025] Spatial connectivity analysis is performed on candidate anomaly points within the receptive field where the sampling points are located, and regions within the receptive field that satisfy spatial linear connectivity are marked as crack regions.
[0026] By using the pore region and the crack region as defect locations, defect detection can be achieved in the enhanced volume data.
[0027] In one implementation of the present invention, sampling the enhanced volume data to obtain sampling results specifically includes:
[0028] The GPU thread corresponding to each detection ray is invoked, and the ray is traversed according to the sampling step size based on the BVH tree corresponding to the original volume data. By analyzing the intersection of each node in the BVH tree with the detection ray, the voxels contained in the leaf nodes that intersect with the detection ray are selected for sampling to obtain the sampling result.
[0029] In one implementation of the present invention, the raw body data generated during the additive manufacturing process is decomposed into multiple levels, specifically including:
[0030] Determine the characteristic parameters corresponding to the original body data generated during the additive manufacturing process; wherein, the characteristic parameters include at least one or more of the following: density gradient magnitude, geometric curvature, and surface complexity;
[0031] Based on the preset mapping relationship between feature parameters and each level, the original volume data is decomposed into multiple levels according to the feature parameters; wherein, the levels include a coarse layer, a detail layer, a fine layer, and a defect layer.
[0032] In one implementation of the present invention, the DeepSDF network corresponding to the layer is invoked, and the original volume data corresponding to each layer is loaded sequentially to convert the original volume data into a set of network weight parameters, thereby achieving layered compression of the original volume data. Specifically, this includes:
[0033] Determine the model accuracy corresponding to each level;
[0034] The DeepSDF network corresponding to the model accuracy is invoked, and the original volume data corresponding to the coarse layer, the detail layer, the fine layer and the defect layer are loaded in sequence according to the specified loading order. The original volume data is then converted into a set of network weight parameters to achieve layered compression of the original volume data.
[0035] This invention provides an additive manufacturing model visualization device, the device comprising:
[0036] At least one processor;
[0037] And, a memory communicatively connected to the at least one processor;
[0038] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform an additive manufacturing model visualization method as described in any of the preceding claims.
[0039] This invention provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0040] An additive manufacturing model visualization method as described in any of the preceding items.
[0041] The additive manufacturing model visualization method proposed in this invention can bring the following beneficial effects:
[0042] Based on the DeepSDF network, the original volumetric data is decomposed into a set of neural network weight parameters at multiple precision layers. This achieves data compression while fully preserving key feature information from macroscopic contours to microscopic defects, fundamentally alleviating the pressure of data storage and transmission. Secondly, by dynamically constructing convolutional kernels using local density gradients and adaptively adjusting the ray sampling stride, precise allocation of computational resources is achieved. Sampling accuracy is automatically improved in structurally complex regions, while computational efficiency is optimized in uniform regions, thus significantly improving the overall speed of volumetric rendering while maintaining high-fidelity rendering quality. Defect detection is performed synchronously during ray propagation, enabling real-time monitoring and immediate quality assessment of the additive manufacturing process. Attached Figure Description
[0043] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0044] Figure 1 A flowchart illustrating an additive manufacturing model visualization method provided in an embodiment of the present invention;
[0045] Figure 2 This is a schematic diagram illustrating the working principle of a convolution kernel provided in an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of the structure of an additive manufacturing model visualization device provided in an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0048] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0049] like Figure 1 As shown in the figure, an additive manufacturing model visualization method provided by an embodiment of the present invention includes:
[0050] S101: Decompose the original volume data generated during the additive manufacturing process into multiple layers, call the DeepSDF network corresponding to each layer, load the original volume data corresponding to each layer in sequence, so as to convert the original volume data into a set of network weight parameters, realize the hierarchical compression of the original volume data, and obtain the compressed volume data.
[0051] Additive manufacturing is a manufacturing technology that builds three-dimensional objects by adding materials layer by layer, commonly known as 3D printing. In high-end additive manufacturing processes, such as the 3D printing of aerospace engine blades, high-precision raw volume data is generated using techniques such as volume rendering to monitor printing quality in real time. Volume data refers to a discrete dataset composed of voxels in three-dimensional space. Each voxel contains information such as density, material properties, or stress fields, used to represent the internal structure of an object. Volume rendering generates images by simulating the propagation of light in volume data. It typically uses ray-mapping algorithms to sample and accumulate color and transparency along the direction of light to visualize the internal features of the object. However, volume data is extremely large in size, and the storage and transmission costs of large-scale 3D data are high. Traditional mesh compression methods are ineffective when processing volume data that represents internal structures, easily losing key microscopic details and failing to meet the dual requirements of accuracy and real-time performance in additive manufacturing. Therefore, this invention provides an additive manufacturing monitoring system. This system decomposes the raw body data generated during the additive manufacturing process into multiple levels based on the feature parameters of different regions in the raw body data. Since the feature precision saved by different levels is different, different compression strategies can be adopted for each level when compressing the raw body data.
[0052] DeepSDF is a deep neural network used to learn the directed distance field representation of 3D geometry. Traditional volume data explicitly stores the value of each voxel, while DeepSDF trains a neural network that encodes the entire 3D geometry as weight parameters. This allows the neural network to receive the coordinates (X, Y, Z) of a 3D point as input and output the shortest directed distance from that point to the object's surface. Based on this, for each level obtained from the previous decomposition, a pre-trained DeepSDF network matched to the characteristics of that level's data is invoked. Then, the original volume data blocks corresponding to each level are loaded sequentially as training data. By adjusting the neural network's weight parameters, its output is made as close as possible to the directed distance (Signed Distance Field, SDF) represented by the volume data of that level. Through the DeepSDF network, geometric information that originally required the storage of millions of voxels is transformed into a continuous function representation representing different levels of detail. Through this transformation, the neural network can implicitly learn the intrinsic rules of the geometry, enabling the reconstruction of 3D models at arbitrary resolutions.
[0053] Therefore, by calling the DeepSDF network corresponding to each layer and sequentially loading the original volume data for each layer, the original volume data can be converted into the weight parameters of that network. Compared to storing the complete volume data, storing a set of network weight parameters representing the compressed geometric information effectively reduces the amount of data that needs to be stored, thus achieving layered compression of the original volume data to obtain compressed volume data. In this way, by running the DeepSDF networks corresponding to different layers, the original volume data can be encoded into a directed distance field based on the coordinates of each 3D point in the volume data. It should be noted that the compressed volume data here refers to the implicitly compressed set of neural network parameters, not the SDF values.
[0054] In one embodiment, when performing hierarchical decomposition of the original volume data, multidimensional feature analysis is required to determine the level to which the original volume data belongs. Therefore, it is necessary to determine the feature parameters corresponding to the original volume data generated during additive manufacturing. The feature parameters include at least one or more of the following: density gradient magnitude, geometric curvature, and surface complexity. Through the preset mapping relationship between the feature parameters and each level, the original volume data can be automatically decomposed into multiple levels based on the feature parameters. These levels include a roughness layer, a detail layer, a fineness layer, and a defect layer. The roughness layer mainly contains overall, relatively macroscopic feature information of the original volume data, such as the general outline of the object. The detail layer preserves surface texture and boundary information. The fineness layer retains high-frequency detail information. The defect layer is specifically used to store defect-related information that may exist in the original volume data, such as pores and cracks.
[0055] After determining the original volume data for each layer, the model precision for each layer needs to be determined to achieve layered compression of the original volume data. Different layers of data require different model precisions due to their varying characteristics and importance. Model precision determines the structure and parameter scale of the DeepSDF network. For example, coarse layers use simpler networks, while fine and defect layers require more complex networks to ensure that key information is not lost, balancing compression ratio and detail preservation. Once the model precision for each layer is determined, the DeepSDF network corresponding to that precision can be called. Following the specified loading order, the original volume data for the coarse, fine, and defect layers are loaded sequentially. This progressive encoding ensures that the overall structure is captured first, followed by refinement of local features. During loading, the DeepSDF network processes the input original volume data, mapping the original volume data of that layer to a continuous directed distance field function. Ultimately, the original volume data is compressed into a set of weight parameters for the neural network. This hierarchical encoding allows for the adoption of appropriate compression strategies based on the characteristics of data at different levels, achieving efficient hierarchical compression of the original volumetric data. This ensures both high compression ratio and maximum preservation of important details and features of the additive manufacturing model, meeting the accuracy and real-time requirements of additive manufacturing. The compressed volumetric data is no longer a massive voxel mesh, but rather a set of weight parameters from multiple DeepSDF networks. These network weight parameters define a directed distance field function, allowing the acquisition of SDF values at any point through the network, thereby reconstructing geometric shape and density information.
[0056] S102: Based on the sampling points corresponding to the detection rays, the local region where the sampling points are located is reconstructed using compressed volume data. Based on the local density gradient and material property parameters corresponding to the reconstructed voxels, convolution kernels of different sizes are constructed so that the volume data is convolved under the receptive field corresponding to the convolution kernel to obtain enhanced volume data.
[0057] Compressing the original volume data can effectively reduce the data volume. However, the compressed volume data is a set of weight parameters from multiple DeepSDF networks, rather than directly usable voxel data. Since volume rendering requires voxel data, it is necessary to convert the compressed volume data into voxels that can be used for rendering. Specifically, based on the sampling points corresponding to the detection rays, the local region where the sampling points are located is reconstructed using the compressed volume data, i.e., the DeepSDF network, to convert the implicitly represented compressed data into explicit voxel data.
[0058] Traditional volumetric rendering methods are mostly based on fixed sampling strides and uniform rendering strategies, failing to fully consider the local feature differences in different regions of the volumetric data. In the volumetric data of additive manufacturing models, the local density gradients and material property parameters of different voxels often vary significantly. Using a traditional fixed strategy may miss important details in areas with drastic density changes, while excessive and unnecessary calculations may be performed in areas with relatively uniform density, thus reducing rendering efficiency and quality. This invention constructs convolutional kernels of different sizes based on the local density gradients and material property parameters corresponding to the reconstructed voxels. When the local density gradient is large or the material properties change significantly, a larger convolutional kernel is used, allowing for the capture of feature changes in the volumetric data within a larger receptive field and highlighting important details. Conversely, when the local density gradient is small or the material properties are relatively stable, a smaller convolutional kernel is used to reduce computation and improve processing speed. Figure 2 The diagram shown illustrates the working principle of a convolution kernel. When processing a single voxel, dynamic convolution is required based on the size of the kernel, and the area below represents its corresponding receptive field.
[0059] This method, which involves performing convolution operations on volumetric data within the receptive field corresponding to the convolution kernel, enhances the feature representation of different regions within the volumetric data. The enhanced volumetric data, in subsequent rendering processes, can more accurately reflect the internal structure and features of the additive manufacturing model. This not only improves rendering efficiency but also allows for simultaneous quality analysis during rendering, significantly enhancing the real-time performance of the additive model.
[0060] In one embodiment, when constructing the convolution kernel, firstly, for each voxel reconstructed in a local region, the local density gradient of that voxel is calculated based on the density values of the surrounding voxels. For example, a 3x3x3 or 5x5x5 local region is selected to calculate the density values. By calculating the rate of change and direction of the density values of these neighboring voxels, the local density gradient of the central voxel is determined. The local density gradient is a vector whose direction points in the direction of the fastest increase in density, and its magnitude is its modulus. This indicates the degree of drastic change in density. Volume data not only contains density information but may also include other material-related physical properties, i.e., material property parameters. Based on the material property parameters corresponding to the volume data, a material property parameter matrix is constructed. The property parameters included in the material property parameter matrix are shown in Table 1:
[0061] Table 1 Material property parameters
[0062]
[0063] The weighting coefficients corresponding to the local density gradient and the material property parameter matrix are determined respectively. The weighting coefficient corresponding to the local density gradient is positively correlated with the local density gradient, and the weighting coefficient corresponding to the material property parameter matrix is positively correlated with the degree of change of the material property parameters. That is, the more obvious the change of the material property parameters, the larger its weighting coefficient.
[0064] Based on the weighting coefficients, the local density gradient and material property parameter matrix are weighted and fused to comprehensively consider the influence of density variations and material properties in the volume data, thus calculating the adjustment factor corresponding to the basic receptive field. Then, the size of the basic receptive field, which is a pre-defined standard receptive field size, is adjusted according to this adjustment factor. Specifically, this can be expressed as the following formula:
[0065]
[0066] in, Indicates the basic receptive field, and These represent the weighting coefficients corresponding to the local density gradient and the material property parameter matrix, respectively. This represents the adjustment factor for the basic receptive field.
[0067] The adjusted receptive field size determines the size of the convolution kernel; that is, the size of the convolution kernel is determined based on the adjusted receptive field. When the adjustment factor is large, it indicates that the density and material properties of the volume data in that region are more significant, requiring a larger convolution kernel to capture these features, thus increasing the kernel size. Conversely, when the adjustment factor is small, the kernel size decreases.
[0068] After determining the size of the convolution kernel, convolution kernels of different sizes are applied to the volumetric data, allowing the volumetric data to undergo convolution operations within the receptive field corresponding to the kernel. Convolution can be viewed as a process of feature extraction and enhancement of volumetric data. It involves sliding the convolution kernel across the volumetric data, performing a weighted summation of voxels at each location and their surrounding voxels to obtain enhanced voxel values. Convolution highlights the features of different regions within the volumetric data, making previously overlooked details more apparent. The enhanced volumetric data contains more feature information. In subsequent volumetric rendering, this feature information allows for the adoption of more appropriate rendering strategies, thereby more accurately presenting the internal structure and features of the additive manufacturing model, further improving rendering quality and efficiency, and meeting the needs of real-time monitoring and quality inspection in the additive manufacturing process.
[0069] S103: Sample the enhanced volume data to obtain the sampling results. During the sampling process, perform defect detection on the enhanced volume data based on the local density gradient corresponding to the sampling point to obtain the defect location.
[0070] Starting from the initial position, the enhanced volume data is sampled step-by-step along the ray's path to obtain sampling results for different sampling points. The sampling results refer to relevant information about the volume data at each sampling point, such as density values and material property parameters. During the sampling process, to ensure the quality of the additive manufacturing model, real-time defect detection of the model needs to be performed simultaneously during the ray's movement. In this embodiment of the invention, defect detection is performed on the enhanced volume data based on the local density gradient corresponding to the sampling point to determine the defect location. Defect detection is mainly divided into two types: porosity detection and crack detection.
[0071] For porosity detection, when the standard deviation of the local density gradient at a sampling point exceeds the normal range, it may indicate the presence of porosity in that area. This is because the presence of porosity leads to uneven distribution of local density, making the changes in the local density gradient more drastic and increasing the standard deviation. Specifically, for each sampling point, the standard deviation of the local density gradient of the voxels within its receptive field is first calculated. The standard deviation of the local density gradient reflects the dispersion of the voxel density gradient within the receptive field region of that sampling point. If the standard deviation is large, it indicates that the local density gradient changes of the voxels in that region are relatively drastic, possibly indicating abrupt changes in internal structure, suggesting the presence of defects. Therefore, after calculating the standard deviation of the local density gradient for each sampling point, it needs to be compared with a preset standard deviation threshold. The preset standard deviation threshold is determined based on historical data and experience from a large number of additive manufacturing models and is used to distinguish between normal areas and areas that may contain defects. When the standard deviation of the local density gradient at a sampling point exceeds the preset threshold, the area where the current receptive field is located is marked as a porosity region.
[0072] For crack detection, the second derivative of the corresponding local density gradient is determined. If the second derivative is greater than a preset value, the sampling point is marked as a candidate anomaly. The second derivative represents the rate of change of the local density gradient and can more sensitively capture abrupt changes in the density gradient. In additive manufacturing models, the presence of cracks often causes drastic changes in the local density gradient, and the second derivative can effectively detect such abrupt changes. When the second derivative of the local density gradient is greater than the preset value, it indicates that the density gradient change near the sampling point is very drastic, and a crack is very likely to exist. Therefore, the sampling point is marked as a candidate anomaly.
[0073] After marking a point as a candidate anomaly, further verification is required. Therefore, spatial connectivity analysis needs to be performed on the candidate anomalies within the receptive field of the sampling point to determine whether there are regions within the receptive field that satisfy spatial linear connectivity, i.e., continuous density gradient anomaly regions. If continuous anomaly regions exist, and the morphology and distribution of these regions conform to the characteristics of cracks, such as exhibiting a slender linear distribution, then the region where the candidate anomaly point is located can be identified as a crack region.
[0074] After marking the porosity and crack areas, these areas are recorded as defect locations. Based on these defect locations, the causes of the defects are further analyzed, such as whether they are due to material defects, improper additive manufacturing process parameter settings, or equipment malfunctions. For different causes, corresponding improvement measures can be taken, such as adjusting the material formula, optimizing process parameters, or performing equipment maintenance. Simultaneously, this defect location information can also be used to generate detailed quality inspection reports, providing a basis for the subsequent processing of additive manufactured products.
[0075] In one embodiment, this invention utilizes a CUDA architecture to achieve parallel computation of ray movement. Each GPU thread processes one ray, and by optimizing data access through shared memory, computational efficiency is significantly improved. Furthermore, if traditional ray-voxel intersection testing is used when processing ray movement, each GPU thread needs to test every voxel in the 3D volume data space, resulting in a huge computational burden. This invention employs a spatial acceleration structure based on a Bounding Volume Hierarchy (BVH) tree, organizing the 3D volume data space into a BVH tree. The BVH tree organizes the 3D spatial data through a hierarchical structure of bounding boxes. Each node corresponds to an axis-aligned bounding box, which encompasses the geometry of all its child nodes. The tree construction uses a top-down recursive partitioning strategy, selecting the optimal partitioning axis and partitioning position each time to minimize the volume of the child node bounding boxes while maintaining tree balance. The partitioning axis is selected based on the distribution characteristics of the geometric data, typically choosing the axis with the largest variance, while the partitioning position is chosen from the median or centroid. During ray traversal according to the sampling step size, the sampling speed can be significantly improved by using a BVH tree.
[0076] Specifically, due to the hierarchical structure of the BVH tree and the bounding box characteristics of its nodes, irrelevant sampling regions are excluded by analyzing the intersections between each node in the BVH tree and the detection ray. The bounding box of the ray and the root node is tested; if they do not intersect, the entire subtree can be excluded, avoiding testing all child nodes. If they intersect, the child nodes are recursively tested until a leaf node is reached. This strategy quickly reduces computational complexity by rapidly eliminating nodes that do not intersect with the ray and the large number of voxels they contain, sampling only the voxels contained in leaf nodes that intersect with the detection ray. This sampling result significantly reduces the number of intersection tests between the ray and voxels.
[0077] Therefore, in the parallel computation of ray movement based on the CUDA architecture in this embodiment of the invention, each GPU thread processes one ray and adopts a BVH tree structure, which can further improve computational efficiency. This allows each thread to independently perform BVH tree intersection tests and voxel sampling on the ray it is responsible for, avoiding a large amount of data communication and synchronization overhead between threads, and giving full play to the parallel computing capabilities of the GPU.
[0078] During the sampling process, each thread samples the voxels contained in the leaf nodes intersecting with the ray according to the sampling step size of the ray it processes, obtaining the sampling results. The sampling results can be directly used for subsequent operations such as defect detection and rendering. In this way, not only are the number of ray-voxel intersection tests reduced, but the overall computational efficiency is also improved, enabling more efficient and accurate real-time monitoring and quality inspection of additive manufacturing models.
[0079] S104: Adjust the sampling step size of the detection ray to travel to the next sampling point by using the local density gradient of the sampling point, and repeat the sampling according to the sampling step size until the detection ray passes through the spatial range corresponding to the original volume data.
[0080] Traditional volumetric rendering techniques typically employ a fixed sampling step size strategy, failing to adequately consider the feature differences between different regions within the volumetric data. In additive manufacturing models, local density gradients vary significantly across different locations. Using a fixed sampling step size may lead to the omission of crucial features in regions with large local density gradients and drastic feature changes due to an excessively large sampling step size, while conversely, a sampling step size that is too small may increase unnecessary computation and reduce rendering efficiency in regions with small local density gradients and relatively stable features.
[0081] The ray initially travels at a base step size, and then the sampling step size is dynamically adjusted at each sampling point. That is, at the starting position, it first travels to the first sampling point with the base step size, and then the sampling step size for the detection ray to move to the next sampling point is dynamically adjusted based on the local density gradient at that sampling point. For each sampling point, the sampling step size needs to be adjusted, and the above region reconstruction and sampling process is repeated at the sampling point until the detection ray passes through the spatial range corresponding to the original volume data. When the local density gradient of a sampling point is large, it indicates that the features of the local region corresponding to that sampling point change drastically. In this case, reducing the sampling step size allows for more detailed capture of the feature information of that region, avoiding the omission of key features. Conversely, when the local density gradient of a sampling point is small, it means that the features of that region are relatively stable. In this case, increasing the sampling step size reduces unnecessary computation and improves rendering efficiency.
[0082] Specifically, the step size adjustment coefficient is determined by the local density gradient of the sampling points. The step size adjustment coefficient can be dynamically selected based on the amplitude range of the local density gradient. By analyzing the statistical characteristics of a large number of additive manufacturing samples in advance, a mapping relationship between the density gradient threshold and the adjustment coefficient is established. In this way, the corresponding step size adjustment coefficient can be selected based on the local density gradient at the intersection. Generally, in the high density gradient region, that is, the local density gradient amplitude is greater than the set upper limit, the step size adjustment coefficient is larger, thereby significantly reducing the step size and ensuring accurate capture of defect boundaries. In the medium density gradient region, the step size adjustment coefficient takes an intermediate value to balance accuracy and efficiency. In the low density gradient region, the step size adjustment coefficient takes a smaller value to maintain a larger step size to quickly traverse the uniform material region.
[0083] Furthermore, after determining the step size adjustment coefficient, the step size correction factor is determined based on the difference between the preset baseline correction factor and the product of the step size adjustment coefficient and the local density gradient. It should be noted that the baseline correction factor is 1. If the step size adjustment coefficient is represented by , then the step size correction factor can be expressed as . By using this step size correction factor, the base step size corresponding to the detection ray can be adjusted. Adjustments are made to obtain the sampling step size. The adjustment method for the sampling step size can be expressed by the following formula:
[0084]
[0085] In this way, after the ray travels to the next sampling point with an adaptive step size, the sampling step size needs to be adjusted according to the local density gradient of the current sampling point until the sampling endpoint is reached. This dynamic adjustment of the sampling step size ensures accurate capture of key features of the additive manufacturing model while minimizing unnecessary computation, significantly improving the efficiency and quality of volume rendering. In subsequent rendering processes, based on the information from these sampling points, the internal structure and features of the additive manufacturing model can be presented more accurately, providing a more reliable basis for real-time monitoring and quality inspection during the additive manufacturing process.
[0086] It should be noted that the base step size needs to be adaptively set based on the historical defect situation in additive manufacturing. If certain types of defects frequently occur in a certain additive manufacturing history, it means that the local density gradients and feature changes of these defective regions in the volumetric data will be more complex. In this case, the base step size should be set relatively small so that the feature information of these potentially defective regions can be captured more meticulously in subsequent sampling processes, avoiding the omission of key features.
[0087] Specifically, historical production data of the additive manufacturing model corresponding to the original volume data is obtained. Based on this historical production data, the historical defect distribution information of the additive manufacturing model is determined. Historical defect distribution information refers to the frequency, range, and severity of different types of defects at various locations in the model during the additive manufacturing process. Based on this information, the defect coverage rate of the additive manufacturing model can be determined. Defect coverage rate refers to the proportion of defective areas in the additive manufacturing model to the total model volume. The defect coverage rate is obtained by statistically analyzing the ratio of the number of defective voxels to the total number of voxels in the historical production data. If the defect coverage rate is greater than a preset coverage rate, it indicates a higher probability of defects in this type of additive manufacturing model. In this case, the base step size needs to be appropriately reduced to make the sampling process more intensive and ensure accurate capture of potential defect features. When determining the base step size, the base step size corresponding to the detection ray can be determined based on the production proportion of additive manufacturing models with defect coverage rates greater than the preset coverage rate. The base step size is negatively correlated with the production proportion of the model; that is, the higher the production proportion, the smaller the base step size should be. For example, if a certain type of additive manufacturing model has a high proportion of models with a defect coverage rate greater than the preset coverage rate in the production quantity within a certain period of time, then in order to ensure accurate capture of the internal structure and features of this type of model, the basic step size of the detection ray should be set to be smaller.
[0088] Furthermore, the base step size can be set in conjunction with the size of the additive manufacturing model. For larger additive manufacturing models, a base step size that is too small will result in an excessive number of sampling points, significantly increasing computational load and processing time, thus affecting rendering efficiency. Conversely, a base step size that is too large may miss crucial features within the model. Therefore, for large models, the base step size can be appropriately increased while ensuring that important features are captured. For smaller additive manufacturing models, since their internal features are relatively concentrated, the base step size can be set smaller to ensure that every detail of the model is accurately captured. Taking into account both the historical defects in the additive manufacturing process and the model size when setting the base step size allows for more reasonable sampling of the inspection rays within the volumetric data of the additive manufacturing model.
[0089] S105: Using a forward synthesis algorithm, a visualization image corresponding to the additive manufacturing model is generated based on the sampling results and defect location corresponding to each detection ray.
[0090] Starting from the camera position, the detection ray advances progressively. After the sampling process described above, each detection ray yields corresponding sampling results and defect location information. The sampling results include the material's density and color information. The forward synthesis algorithm first calculates the color and transparency of each detection ray based on this information. For each sampling point, a corresponding color and transparency value is assigned based on its density value, material property parameters, and whether it is located at a defect location. In normal areas, color and transparency can be determined based on the material's sampling step size and density. However, at defect locations, such as pore and crack areas, special colors and higher transparency can be used to highlight them, allowing the distribution of defects to be clearly seen in the visualized image. Then, along the direction of the ray, the color and transparency of each sampling point are synthesized according to the sampling order. During the synthesis process, the influence of the transparency of each sampling point on the color of subsequent sampling points is considered. Through the superposition of transparency and the mixing of colors, the final color value of the ray on the screen is obtained.
[0091] By performing this forward composite calculation on all inspection rays, a visual image of the entire additive manufacturing model can be obtained. This visual image intuitively displays information such as the internal structure, material properties, and defect locations of the additive manufacturing model, providing strong support for real-time monitoring and quality inspection during the additive manufacturing process. Operators can observe the visual image to promptly identify defects in the model and adjust manufacturing process parameters, thereby improving the quality and production efficiency of additive manufactured products. Simultaneously, the visual image can also be saved as historical data for subsequent analysis and research, further optimizing the additive manufacturing process.
[0092] The above are embodiments of the method proposed in this invention. Based on the same idea, some embodiments of this invention also provide devices and non-volatile computer storage media corresponding to the above methods.
[0093] Figure 3 This is a schematic diagram of the structure of an additive manufacturing model visualization device provided in an embodiment of the present invention. Figure 3 As shown, it includes:
[0094] At least one processor; and,
[0095] At least one processor-communication-connected memory; wherein,
[0096] The memory stores instructions that can be executed by at least one processor, and the instructions, when executed by at least one processor, enable at least one processor to:
[0097] Perform an additive manufacturing model visualization method as described in any of the preceding items.
[0098] This invention provides a non-volatile computer storage medium storing computer-executable instructions. When the computer executes the executable instructions, it implements an additive manufacturing model visualization method as described in any of the preceding claims.
[0099] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are relatively simple in description because they are fundamentally similar to the method embodiments; relevant parts can be referred to the descriptions in the method embodiments.
[0100] The devices, media, and methods provided in the embodiments of the present invention are one-to-one correspondences. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0101] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0109] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A method of additive manufacturing model visualization, characterized by, The method includes: The raw volume data generated during the additive manufacturing process is decomposed into multiple layers. The DeepSDF network corresponding to each layer is called, and the raw volume data corresponding to each layer is loaded sequentially to convert the raw volume data into a set of network weight parameters. This achieves hierarchical compression of the raw volume data and obtains the compressed volume data. Based on the sampling points corresponding to the detection rays, the local region where the sampling points are located is reconstructed using the compressed volume data. Based on the local density gradient and material property parameters corresponding to the reconstructed voxels, convolution kernels of different sizes are constructed so that the volume data is convolved under the receptive field corresponding to the convolution kernel to obtain the enhanced volume data. The enhanced volume data is sampled to obtain sampling results. During the sampling process, defect detection is performed on the enhanced volume data based on the local density gradient corresponding to the sampling point to obtain the defect location. By adjusting the sampling step size of the detection ray to the next sampling point based on the local density gradient of the sampling point, and repeating the sampling according to the sampling step size, until the detection ray passes out of the spatial range corresponding to the original volume data; Using a forward synthesis algorithm, a visualization image corresponding to the additive manufacturing model is generated based on the sampling results and the defect location corresponding to each detection ray.
2. A method of additive manufacturing model visualization according to claim 1, wherein, Based on the reconstructed local density gradients and material property parameters corresponding to the voxels, convolutional kernels of different sizes are constructed, specifically including: For the voxels reconstructed in the local region, the local density gradient corresponding to the voxel is determined based on the density values of the surrounding voxels. Based on the material property parameters corresponding to the volume data, a material property parameter matrix is constructed, and the weight coefficients corresponding to the local density gradient and the material property parameter matrix are determined respectively; wherein, the weight coefficient corresponding to the local density gradient is positively correlated with the local density gradient; The adjustment factor corresponding to the basic receptive field is determined by multiplying the weighting coefficient with the local density gradient and the material property parameter matrix, respectively. The basic receptive field is adjusted based on the adjustment factor, and convolutional kernels of different sizes are constructed using the adjusted basic receptive field.
3. The method of claim 1, wherein, Adjusting the sampling step size of the detection ray to the next sampling point based on the local density gradient of the sampling point specifically includes: The corresponding step size adjustment coefficient is determined by the local density gradient of the sampling points; The step size correction factor is determined based on the difference between the preset benchmark correction factor and the product of the step size adjustment coefficient and the local density gradient. The basic step size corresponding to the detection ray is adjusted according to the step size correction factor to obtain the sampling step size.
4. The method of claim 3, wherein, Before adjusting the base step size corresponding to the detection ray according to the step size correction factor, the method further includes: Obtain historical production data of the additive manufacturing model corresponding to the original body data, and determine the historical defect distribution information corresponding to the additive manufacturing model based on the historical production data; Based on the historical defect distribution information, the defect coverage rate corresponding to the additive manufacturing model is determined; The basic step size corresponding to the detection ray is determined based on the production ratio of additive manufacturing models with defect coverage greater than the preset coverage; wherein the basic step size is negatively correlated with the production ratio of the model.
5. The method of claim 1, wherein, Based on the local density gradient corresponding to the sampling point, defect detection is performed on the enhanced volume data to obtain the defect location, specifically including: Calculate the local density gradient standard deviation within the receptive field where the sampling point is located. When the local density gradient standard deviation is greater than a preset standard deviation, mark the area where the receptive field is located as a pore region. For each sampling point, the second derivative of its corresponding local density gradient is determined. If the second derivative is greater than a preset value, the sampling point is marked as a candidate anomaly. Spatial connectivity analysis is performed on candidate anomaly points within the receptive field where the sampling points are located, and regions within the receptive field that satisfy spatial linear connectivity are marked as crack regions. By using the pore region and the crack region as defect locations, defect detection can be achieved in the enhanced volume data.
6. The method of claim 1, wherein, The enhanced volume data is sampled to obtain sampling results, specifically including: The GPU thread corresponding to each detection ray is invoked, and the ray is traversed according to the sampling step size based on the BVH tree corresponding to the original volume data. By analyzing the intersection of each node in the BVH tree with the detection ray, the voxels contained in the leaf nodes that intersect with the detection ray are selected for sampling to obtain the sampling result.
7. The method of claim 1, wherein, The raw material data generated during additive manufacturing is decomposed into multiple levels, specifically including: Determine the characteristic parameters corresponding to the original body data generated during the additive manufacturing process; wherein, the characteristic parameters include at least one or more of the following: density gradient magnitude, geometric curvature, and surface complexity; Based on the preset mapping relationship between feature parameters and each level, the original volume data is decomposed into multiple levels according to the feature parameters; wherein, the levels include a coarse layer, a detail layer, a fine layer, and a defect layer.
8. A method of additive manufacturing model visualization according to claim 7, wherein, The DeepSDF network corresponding to the aforementioned layer is invoked, and the original volume data corresponding to each layer is loaded sequentially to convert the original volume data into a set of network weight parameters, thereby achieving layered compression of the original volume data. Specifically, this includes: Determine the model accuracy corresponding to each level; The DeepSDF network corresponding to the model accuracy is invoked, and the original volume data corresponding to the coarse layer, the detail layer, the fine layer and the defect layer are loaded in sequence according to the specified loading order. The original volume data is then converted into a set of network weight parameters to achieve layered compression of the original volume data.
9. An additive manufacturing model visualization device, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform an additive manufacturing model visualization method as described in any one of claims 1-8.
10. A non-transitory computer storage medium storing computer-executable instructions, the computer-executable instructions comprising instructions for: receiving a request to access a file; determining whether the file is stored in a cache; and in response to determining that the file is stored in the cache, providing access to the file from the cache. The computer-executable instructions are set as follows: A method for visualizing additive manufacturing models as described in any one of claims 1-8.
Citation Information
Patent Citations
Variable density modeling
CN107111895A
Reconstruction method, system and equipment of three-dimensional grid model and medium
CN119107429A