Methods, devices, electronic equipment and media for detecting the connectivity of crystal structures
By converting the lattice structure into binary voxel data and inverting the boundary filling, automated connectivity detection of the lattice structure is achieved, solving the problem of low efficiency in identifying tiny cavities in existing technologies and improving the success rate and quality of 3D printing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-03-31
AI Technical Summary
Existing 3D design software cannot efficiently and accurately identify tiny cavities in crystal lattice structures and perform connectivity analysis, resulting in a decrease in the success rate and quality of 3D printing.
By converting the lattice structure into binary voxel data and inverting the voxel values after boundary filling, connectivity detection results are generated, thus achieving automated connectivity detection of the lattice structure.
It improves the efficiency and accuracy of lattice structure detection, reduces human intervention, and enhances the quality and reliability of 3D printing.
Smart Images

Figure CN121502853B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing technology, and in particular to a method, apparatus, electronic device and medium for detecting the connectivity of crystal structures. Background Technology
[0002] In recent years, with the rapid development and maturation of additive manufacturing (i.e., 3D printing) technology, its applications in industrial manufacturing, aerospace, biomedicine and other fields have become increasingly widespread. Lattice structures, due to their excellent specific strength, tunable mechanical properties and significant material-saving potential, have become one of the key structural forms in 3D printing design.
[0003] Currently, 3D design software such as nTopology and Materialise 3-matic can be used to generate crystal lattice structures and provide basic geometric and mechanical evaluation functions such as porosity calculation, wall thickness analysis, and stress simulation. However, these tools cannot detect potential defects within the crystal lattice structure.
[0004] Specifically, in actual lattice structure printing, lattice structures composed of repeated or non-periodic arrangement of complex unit cells are prone to forming closed air cavities or "dead volumes" where fluids cannot flow at the microscale due to geometric modeling errors, insufficient Boolean operation precision, or improper unit connection methods. 3D design software tools lack systematic identification and connectivity analysis of these tiny cavities in lattice structures, typically relying on designers to manually observe, slice, or make judgments based on experience. This approach is inefficient, subjective, and prone to overlooking hidden defects, thus reducing the success rate and structural quality of 3D printing.
[0005] It is evident that how to efficiently and accurately identify the solid parts of a crystal structure and its internal closed cavities, and perform connectivity detection to improve the success rate and quality of 3D printing, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, one aspect of this application provides a method for detecting the connectivity of a crystal structure, the method comprising:
[0007] Obtain the crystal structure to be detected;
[0008] The lattice structure is voxelized and converted into binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, the voxel units of the solid part of the lattice structure are the first voxel values, and the voxel units of the blank part are the second voxel values.
[0009] The boundaries of the binary voxel data are filled with voxel units of the second voxel value to enclose the binary voxel data, thus obtaining the first voxel data;
[0010] Invert the voxel values of the first voxel data to obtain the second voxel data;
[0011] The binary voxel data and the second voxel data are analyzed to generate connectivity detection results for the lattice structure.
[0012] Optionally, the step of converting the lattice structure into voxelized binary voxel data composed of voxel units based on a preset voxel resolution includes:
[0013] The lattice size of the lattice structure and the printing resolution of the target 3D printer are obtained; the target 3D printer is used to print the target structure according to the lattice structure;
[0014] The preset voxel resolution is determined based on the lattice size and the printing resolution;
[0015] Based on the preset voxel resolution, a three-dimensional voxel structure of a preset shape is generated, which is composed of the voxel units arranged in a certain way.
[0016] Based on a pre-constructed three-dimensional spatial coordinate system, with the alignment of a specified point as a reference, the lattice structure is placed within the three-dimensional voxel structure; in the X, Y, and Z axes of the three-dimensional spatial coordinate system, the boundary of the lattice structure is aligned with the boundary of the three-dimensional voxel structure.
[0017] The first voxel value is assigned to the voxel unit of the entity portion, and the second voxel value is assigned to the blank portion to obtain the binary voxel data.
[0018] Optionally, the preset shape is a cuboid; the step of filling the boundaries of the binary voxel data with voxel units of the second voxel value to enclose the binary voxel data, thereby obtaining the first voxel data, includes:
[0019] The boundary of the three-dimensional voxel structure is used as the filling boundary of the binary voxel data;
[0020] Each of the filling boundaries is filled with a preset number of voxel units of the second voxel value to obtain the first voxel data.
[0021] Optionally, the preset voxel resolution is smaller than the printing resolution; the preset voxel resolution is negatively correlated with both computing resources and the lattice size.
[0022] Optionally, before analyzing the binary voxel data and the second voxel data to generate the connectivity detection result of the lattice structure, the method further includes:
[0023] The binary voxel data is expanded by a specified factor in a specified direction to obtain third voxel data; the specified direction is the direction of the periodic arrangement during the 3D printing of the lattice structure.
[0024] The third voxel data is filled with voxel units of the second voxel value to enclose the third voxel data, resulting in the fourth voxel data;
[0025] The voxel values of the fourth voxel data are inverted to obtain the fifth voxel data.
[0026] Optionally, the analysis of the binary voxel data and the second voxel data to generate the connectivity detection result of the lattice structure includes:
[0027] Based on the six-connected structure labeling method, connectivity analysis is performed on the binary voxel data, the second voxel data, and the fifth voxel data to determine the first connected component of the entity part and the second connected component of the blank part.
[0028] The first connected component and the second connected component are analyzed to generate the connectivity detection result.
[0029] Optionally, the analysis of the first connected component and the second connected component to generate the connectivity detection result includes:
[0030] The first number of the first connected component, the second number of the second connected component, and the number of voxel units corresponding to each second connected component are counted.
[0031] If the first quantity is 1 and the second quantity is 0, or the number of each voxel unit is within a preset range, the connectivity detection result is the first connectivity.
[0032] If the first quantity is 1, and there is at least one voxel unit quantity that is not within the preset range, the connectivity detection result is the second connectivity;
[0033] If the first quantity is not 1, the second quantity is greater than the preset quantity, there is at least one voxel unit quantity greater than the maximum value of the preset range, and the difference between the voxel unit quantity and the maximum value is greater than the preset difference, then the connectivity detection result is the third connectivity; the first connectivity is better than the second connectivity; the second connectivity is better than the third connectivity.
[0034] Another aspect of this application provides a device for detecting the connectivity of a crystal structure, the device comprising:
[0035] Lattice structure acquisition module, used to acquire the lattice structure to be detected;
[0036] A voxel conversion module is used to convert the voxelization of the lattice structure into binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, the voxel units of the solid part of the lattice structure are the first voxel values, and the voxel units of the blank part are the second voxel values.
[0037] A first boundary filling module is used to fill the boundary of the binary voxel data with voxel units of the second voxel value to wrap the binary voxel data, thereby obtaining the first voxel data.
[0038] The first inversion module is used to invert the voxel values of the first voxel data to obtain the second voxel data;
[0039] The connectivity analysis module is used to analyze the binary voxel data and the second voxel data to generate connectivity detection results for the lattice structure.
[0040] Another aspect of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the computer program to implement the steps of the method for detecting the connectivity of the lattice structure.
[0041] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for detecting the connectivity of the lattice structure.
[0042] The method, apparatus, electronic device, and medium for detecting the connectivity of crystal structures provided in this application have the following beneficial effects: by automatically converting the crystal structure into discrete and regular binary voxel data, and after filling the boundaries of the crystal structure, the voxel values of the first voxel data are inverted, so that the original blank parts are converted into solid voxel values, and the voxel values of solid parts are converted into blanks. In other words, solids and blanks are converted, thereby enabling quantitative analysis of the distribution of solids and cavities in the structure, greatly reducing manual intervention, improving detection efficiency, and achieving accurate detection of cavity defects in the crystal structure, thus improving the quality and reliability of 3D printing. Attached Figure Description
[0043] Figure 1 A schematic flowchart illustrating a method for detecting the connectivity of a crystal structure provided in an embodiment of this application;
[0044] Figure 2 This is a schematic diagram illustrating the effect of lattice structure simplification transformation provided in an embodiment of this application;
[0045] Figure 3 This is a schematic diagram illustrating the effect of binary voxel data boundary filling provided in an embodiment of this application;
[0046] Figure 4 This is a schematic diagram illustrating the effect of binary voxel data processing provided in an embodiment of this application;
[0047] Figure 5 for Figure 3 A schematic diagram of the local effect of boundary filling in binary voxel data;
[0048] Figure 6 for Figure 2 A schematic diagram illustrating the effect of binarized voxel data expansion;
[0049] Figure 7 This is a schematic diagram of a lattice structure provided in an embodiment of this application;
[0050] Figure 8 This is a schematic diagram of a lattice structure connectivity detection device provided in an embodiment of this application;
[0051] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0052] The reference numerals in the attached figures are as follows: 80 is the lattice structure acquisition module, 81 is the voxel conversion module, 82 is the first boundary filling module, 83 is the first inversion module, 84 is the connectivity analysis module, 90 is the memory, 91 is the processor, 92 is the display screen, 93 is the input / output interface, 94 is the communication interface, 95 is the power supply, 96 is the communication bus, 901 is the computer program, 902 is the operating system, and 903 is the data. Detailed Implementation
[0053] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0054] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0055] Figure 1 This is a flowchart illustrating a method for detecting the connectivity of a crystal structure provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:
[0056] S10: Obtain the crystal structure to be detected;
[0057] In specific embodiments, the crystal lattice structure, as a crucial element in 3D printing design, is vital for print reliability due to its excellent connectivity. In particular, if defects within the cavities of the crystal lattice structure cannot be detected, risks such as "dead cavities" may arise. These defects are especially critical in 3D printing processes such as powder bed fusion (PBF), as they can lead to difficulties in completely removing unmelted powder after printing (i.e., "powder removal difficulties"), resulting in serious problems such as internal contamination, thermal stress concentration, and even structural failure.
[0058] To address the aforementioned technical problems and achieve accurate and efficient detection of lattice structure connectivity, this application provides a method for detecting lattice structure connectivity. In a specific embodiment, the lattice structure to be detected is acquired. In an optional embodiment, the lattice structure can be a standard 3D model file, and its format can be, but is not limited to, STL or OBJ format files; this application does not impose any limitations on this.
[0059] Figure 2 This is a schematic diagram illustrating the effect of voxelization conversion of a lattice structure provided in an embodiment of this application. In a specific embodiment, parsing the 3D model file can read geometric information such as the size of the lattice structure. Figure 2 As shown, the left side represents a directly read lattice structure in one optional embodiment.
[0060] S11: Convert the lattice structure into voxelized binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, the voxel units of the solid part of the lattice structure are the first voxel values, and the voxel units of the blank part are the second voxel values.
[0061] Furthermore, to facilitate connectivity analysis of solids and cavities within the crystal structure, the crystal structure can be converted into discrete and regular binary voxel data, i.e., voxelization transformation of the crystal structure. In one optional embodiment, the voxelization transformation can employ a raster-based voxelization method.
[0062] like Figure 2The transformed binary voxel data shown is composed of voxel units arranged at a preset voxel resolution. In this binary voxel data, voxel units in solid portions are assigned a first voxel value, while voxel units in blank portions are assigned a second voxel value. In fact, it can be understood that the first voxel value is used to characterize the solid portions in the crystal structure, that is, the portions where the structure exists. The second voxel value is used to characterize the blank portions (i.e., the cavities).
[0063] from Figure 2 As can be seen, after voxel transformation, the continuous geometric model is directly converted into a discretized voxel representation, which is beneficial for subsequent connectivity analysis. It should be noted that this application does not specifically limit the first voxel value and the second voxel value. In an optional embodiment, the first voxel value can be 1 to represent the existence of voxel units, while the second voxel value can be 0 to represent the absence of voxel units.
[0064] S12: Fill the boundaries of the binary voxel data with voxel units of the second voxel value to wrap the binary voxel data, and obtain the first voxel data;
[0065] S13: Invert the voxel values of the first voxel data to obtain the second voxel data;
[0066] Understandably, in Figure 2 In the binary voxel data shown, since the first voxel data is used to characterize the solid portion and the second voxel data represents the blank portion, only the connectivity of the solid portion can be analyzed. To detect the connectivity inside the cavities of the crystal structure, the first and second voxel data can be inverted.
[0067] However, after inverting, the solid portion becomes blank, and the blank portion becomes solid. At this point, it is impossible to distinguish between the internal cavities of the crystal structure and the external air, and the connectivity of the cavities still cannot be detected and analyzed. Based on this, as an optional embodiment, before inverting the voxel values, the boundaries of the binary voxel data are first filled, and the second voxel data is filled to obtain the first voxel data.
[0068] It should be noted that, in order to completely eliminate boundary effects and ensure data integrity during connectivity detection, the first voxel data after padding completely includes the binary voxel data. Furthermore, the voxel values of the first voxel data are inverted to obtain the second voxel data.
[0069] Figure 3This is a schematic diagram illustrating the effect of boundary filling for binary voxel data provided in an embodiment of this application. In this case, the cavity portion (i.e., the blank portion) of the crystal structure in the second voxel data is wrapped by a layer of filling voxel units that were not originally present at the outer boundary, thereby enabling quantitative analysis of the connectivity of the cavity portion. For ease of understanding, the following will be combined with... Figure 3 Please provide an explanation.
[0070] like Figure 3 As shown, before filling (left image), the outer boundary of the binary voxel data forms a cuboid. To completely enclose the binary voxel data, the boundary filling should start from the boundary of the binary voxel data. Figure 3 After filling (right figure), the binary voxel data is completely enclosed by the cuboid formed by the red boundary.
[0071] It is understandable that the three-dimensional space between the black and red lines is filled with voxel units of the second voxel value. However, it should be noted that this application does not limit the number of second voxel values used for filling. Furthermore, it should be noted that... Figure 3 This is a schematic diagram of an optional filling embodiment. In specific embodiments, this application does not limit the filling method, shape, length, etc., as long as it ensures that the second voxel data after filling can completely include the binary voxel data.
[0072] S14: Analyze the binary voxel data and the second voxel data to generate the connectivity detection results of the lattice structure.
[0073] Figure 4 This is a schematic diagram illustrating the effect of binary voxel data processing provided in an embodiment of this application, as shown below. Figure 4 As shown, in one optional embodiment, after converting the lattice structure into binary voxel data through voxelization, voxel cells with second voxel values at the boundaries are filled to obtain first voxel data. Further, the voxel values in the first voxel data are inverted to obtain... Figure 4 The second voxel data is shown.
[0074] See Figure 4 It can be seen that, with the inverted second voxel data, the originally empty parts of the crystal structure become solid parts due to the conversion of voxel values. At this point, the cavity connectivity of the crystal structure can be quantitatively analyzed based on the second voxel data. In addition, the connectivity of the solid parts of the crystal structure can be quantitatively analyzed based on the binary voxel data.
[0075] In one optional embodiment, the lattice structure connectivity detection method provided in this application can be implemented based on Python and related scientific computing libraries. This not only reduces the technical threshold and cost, but more importantly, it provides high flexibility and scalability, making it easy for users to adjust analysis parameters, integrate into existing workflows, or perform secondary development according to specific needs.
[0076] Therefore, the method for detecting the connectivity of crystal structures provided in this application converts the crystal structure into discrete and regular binary voxel data through automated voxel conversion. After filling the boundaries of the crystal structure, the voxel values of the first voxel data are inverted, so that the original blank parts are converted into solid voxel values, and the voxel values of solid parts are converted into blanks. In other words, solids and blanks are converted, thereby enabling quantitative analysis of the distribution of solids and cavities in the structure, greatly reducing manual intervention, improving detection efficiency, and achieving accurate detection of cavity defects in the crystal structure, thus improving the quality and reliability of 3D printing.
[0077] In one optional embodiment, converting the lattice structure into voxelized binary voxel data composed of voxel units based on a preset voxel resolution includes:
[0078] Obtain the lattice size of the crystal structure and the printing resolution of the target 3D printer; the target 3D printer is used to print the target structure based on the lattice structure;
[0079] Determine the preset voxel resolution based on the lattice size and printing resolution;
[0080] Based on the preset voxel resolution, a three-dimensional voxel structure of a preset shape is generated, which is composed of voxel units arranged in a way that is preset.
[0081] Based on a pre-constructed three-dimensional spatial coordinate system, with the alignment of specified points as a reference, the lattice structure is placed in the three-dimensional voxel structure; in the X-axis, Y-axis and Z-axis directions of the three-dimensional spatial coordinate system, the boundary of the lattice structure is aligned with the boundary of the three-dimensional voxel structure;
[0082] Assign a first voxel value to the voxel units of the solid part and a second voxel value to the blank part to obtain binary voxel data.
[0083] It is understood that, in specific embodiments, after directly reading the triangular mesh model (i.e., lattice structure) in STL or OBJ format, the lattice size of the lattice structure can be directly obtained. In the pre-constructed three-dimensional spatial coordinate system, the lattice structure can obtain the coordinate point data. For a certain boundary of the lattice size, it can be, for example, (-5, -5, -5) mm to (5, 5, 5) mm, or (0, 0, 0) mm to (10, 10, 10) mm.
[0084] Because the lattice unit size is too small, exceeding the printer's resolution, the forming quality cannot be guaranteed. Therefore, to improve the accuracy of connectivity detection and ensure the forming quality of subsequent 3D printing, in an optional embodiment, it is also necessary to simultaneously acquire the printing resolution of the target 3D printer, which is the printer used to print the lattice structure to be detected obtained in this application.
[0085] Furthermore, based on a preset voxel resolution, a three-dimensional voxel structure of a preset shape, composed of arranged voxel units, is generated so that the crystal structure can be placed within this three-dimensional voxel structure. It should be noted that the boundaries of the generated three-dimensional voxel structure are aligned with the boundaries of the crystal structure, that is, the boundaries are aligned in the X, Y, and Z directions of the spatial coordinate system, thereby ensuring that the crystal structure can be completely voxelized into binary voxel data.
[0086] In one optional embodiment, the lattice structure is placed within the three-dimensional voxel structure based on a pre-constructed three-dimensional spatial coordinate system and with a specified point aligned as a reference. It should be noted that, for the specified point, since the boundaries of the three-dimensional voxel structure and the lattice structure are aligned, their center points are also aligned; the specified point can be the center point of the lattice structure. Of course, it can also be a vertex or other point on the lattice structure; this application does not limit this.
[0087] In one alternative embodiment, it can be determined whether the lattice structure can be completely voxelized based on the three-dimensional voxel structure by determining whether the center point of each voxel unit is located inside the lattice structure, or by detecting the intersection of the voxel unit with the triangular facets of the lattice structure.
[0088] Understandably, the obtained STL and OBJ format lattice structures contain coordinate point data, and three coordinate points can form a triangular facet. Therefore, the positional relationship between the lattice structure and the three-dimensional voxel structure can be determined by the intersection of voxel units and triangular facets. It should be noted that when detecting the intersection of voxel units and triangular facets, if the voxel unit intersects with the triangular facet or is completely contained within the lattice structure, then the voxel unit is determined to be a solid part.
[0089] Furthermore, after the lattice structure is placed in the three-dimensional voxel structure, the voxel units in the solid part are assigned a value of 1 (i.e., the first voxel value representing existence), and the voxel units in the blank part are assigned a value of 0 (i.e., the second voxel value representing non-existence). In this way, the continuous geometric model is transformed into a discrete voxel representation, and the resulting binary voxel data can be used for subsequent connectivity analysis of the lattice structure.
[0090] Figure 5 for Figure 3A schematic diagram illustrating the local effect of boundary filling for binary voxel data. In one optional embodiment, to ensure that the first voxel data completely encloses the binary voxel data, facilitating subsequent unprecedented connectivity analysis, in one optional embodiment, as shown... Figure 4 As shown, the boundary can be filled using the face containing the boundary of the binary voxel data.
[0091] To conserve computational resources, the generated three-dimensional voxel structure can be a cuboid, ensuring that the boundaries of the lattice structure do not extend beyond the faces of the three-dimensional voxel structure. Based on this, such as... Figure 4 As shown, the boundaries of the 3D voxel structure are used as the starting points for filling the binary voxel data. That is, each face of the 3D voxel structure is used as the filling boundary.
[0092] Furthermore, a predetermined number of voxel units with a second voxel value are created on each filling boundary to obtain... Figure 4 The first voxel data is shown in the right figure. Figure 5 for Figure 4 A partial schematic diagram of the middle right figure, as shown below. Figure 5 As shown, voxel units are filled starting from the black lines of the three-dimensional voxel structure and continuing until the red lines. Therefore, voxel units of the second voxel value are regularly arranged between the red and black lines.
[0093] It should be noted that, in specific embodiments, this application does not limit the preset number of voxel units to be filled. However, it is understood that the filled voxel units are mainly used to enclose the binary voxel data, aiming to eliminate boundary effects and ensure the accuracy of subsequent connectivity analysis. Therefore, in an optional embodiment, as long as the first voxel data after filling can completely enclose the binary voxel data, that is, completely enclose the lattice structure, it is sufficient. Therefore, considering the need to save computational resources, the preset number can be one.
[0094] For example, in one optional embodiment, the preset voxel resolution is 1*1*1, generating a three-dimensional voxel structure with a cube shape, and the resolution of this three-dimensional voxel structure is 64*64*64, while the resolution of the generated first voxel data is 66*66*66. In fact, it can be understood that, in a three-dimensional spatial coordinate system, starting from the filling boundary, one voxel unit is filled in both directions of the X-axis, and the same applies to the Y-axis and Z-axis directions.
[0095] In an alternative embodiment, a new voxel array can be created based on the size of the crystal structure. This voxel array is larger than the size of the crystal structure, has a preset shape, and completely encloses the crystal structure. Furthermore, voxel units outside the boundary of the binary voxel data are automatically filled with second voxel values, thereby achieving boundary filling.
[0096] It should be noted that, in one optional embodiment, to ensure the feasibility of subsequent 3D printing, the preset voxel resolution of the voxel unit is smaller than the printing resolution of the target 3D printer. Furthermore, to balance computational resources with connectivity detection accuracy and efficiency, based on the above embodiments, the preset voxel resolution is negatively correlated with both computational resources and lattice size. That is, the more abundant the computational resources, the smaller the preset voxel resolution; the larger the lattice size, the smaller the preset voxel resolution.
[0097] Figure 6 for Figure 2 A schematic diagram illustrating the effect of binary voxel data expansion. In an optional embodiment, before analyzing the binary voxel data and the second voxel data to generate the lattice structure connectivity detection results, the lattice structure connectivity detection method further includes:
[0098] The binary voxel data is expanded by a specified factor in a specified direction to obtain the third voxel data; the specified direction is the direction of the periodic arrangement during 3D printing of the crystal structure.
[0099] The third voxel data is filled with voxel units of the second voxel value to enclose the third voxel data, thus obtaining the fourth voxel data.
[0100] Invert the voxel values of the fourth voxel data to obtain the fifth voxel data.
[0101] In a specific embodiment, such as Figure 4 The crystal structure shown has irregular depressions or protrusions at the boundaries. During 3D printing, the regular arrangement and combination of the crystal structure may generate new cavities, and the connectivity of the new cavities will also affect the stability of the final printed structure.
[0102] Therefore, to eliminate connectivity issues caused by subsequent printing of periodic permutations and combinations, as an optional implementation, the binary voxel data is expanded by a specified factor in a specified direction before generating the connectivity results. For example, as... Figure 6 As shown, the binary voxel data is expanded by 3*3*3 to ensure that every corner of the original binary voxel data is completely wrapped by the expanded third voxel data.
[0103] In other words, based on the three-dimensional voxel structure where the binary voxel data is located, each face is expanded by a specified multiple of binary voxel data, so that the binary voxel data is completely wrapped by the expanded third voxel data, and there are no gaps between the binary voxel data on each face.
[0104] Figure 7 This is a schematic diagram of a lattice structure provided in an embodiment of this application. In another optional embodiment, such as... Figure 7 As shown, for simple layered or columnar structures, the periodic arrangement direction can be extended. For example, if the crystal structure is a cylinder and the periodic arrangement direction is along the cylinder's centerline, then extension can be performed only in two directions along the centerline. In aerospace or medical fields, for structures such as honeycomb, columnar, or plate arrays, geometric discontinuity exists only at the two end faces in the stretching direction.
[0105] It should be noted that although unidirectional expansion is sufficient for analyzing connectivity, 3*3*3 expansion using cuboids composed of lattice structures (or binary voxel data) can also be used for accurate analysis. The choice can be made based on actual business needs. For complex lattice structures, expansion in a 3*3*3 direction is recommended, while for simple layered or columnar structures, expansion can be performed in the direction of periodic arrangement.
[0106] For example, for the 64*64*64 binary voxel data mentioned above, it is copied 3 times in each of the three dimensions and then stitched together to form an extended voxel data of 192*192*192 (i.e., the third voxel data). This extension method aims to simulate a local array consisting of 27 original cells (3 layers, 3*3 per layer), and analyze the connectivity and potential cavity problems of its central region (corresponding to the original cells) and its splicing interface with adjacent cells.
[0107] The 3x3x3 configuration was chosen because it covers the nearest and second nearest neighbor interactions with minimal expansion, sufficient to expose macroscopic cavities or connectivity issues that may arise from the periodic arrangement. In other embodiments, the expansion dimensions can be adjusted based on the array size to be evaluated, and expansion can be multiplied in some dimensions while not expanding in others; that is, expansion can be performed in the direction of the periodic arrangement during 3D printing of the lattice structure.
[0108] Furthermore, to avoid edge effects in the expanded third voxel data and ensure data integrity, it is also necessary to pad the boundaries of the third voxel data (for example, expanding the 192*192*192 third voxel data to a 194*194*194 fourth voxel data), and then invert the padded fourth voxel data to obtain the fifth voxel data. It should be noted that in this embodiment, the boundary padding and voxel value inversion operations are the same as in the above embodiments, as described above, and will not be repeated here.
[0109] Based on the above embodiments, as an optional embodiment, analyzing binary voxel data and second voxel data to generate lattice structure connectivity detection results includes:
[0110] Based on the six-connected structure labeling method, connectivity analysis is performed on binary voxel data, second voxel data and fifth voxel data to determine the first connected component of the solid part and the second connected component of the blank part.
[0111] Analyze the first and second connected components to generate connectivity detection results.
[0112] In specific embodiments, because the 6-connectivity structure marking method corresponds to a more stringent definition of physical connectivity, diagonal contacts (e.g., those included in 18-connectivity or 26-connectivity) are generally not considered robust physical connections or effective powder removal channels in 3D printing. Therefore, the 6-connectivity structure marking method more accurately reflects the actual connectivity of the structure after printing and the accessibility of internal cavities.
[0113] Therefore, in this embodiment, detection is performed using a 6-connected structure marking method (i.e., only voxels that are face-to-face adjacent in the X, Y, and Z axes are considered connected). Specifically, the 6-connected structure marking method is used to identify solid parts and blank parts, thereby marking the first connected component and the second connected component.
[0114] In binary voxel data, the portion with the first voxel value is the solid portion, and the portion with the second voxel value is the blank portion. For the second and fifth voxel data, due to the voxel value inversion operation, the voxel units with the first voxel value are blank portions, and the voxel units with the second voxel value are solid portions. The purpose is to solidify and visualize the blank portions, and to virtualize and de-visible the original solid portions. Further, by analyzing the first and second connected components, connectivity detection results can be generated.
[0115] Therefore, by automatically converting traditional STL / OBJ lattice structure model files into fixed-resolution voxel data, and on this basis realizing automated filling, connectivity marking, expansion, and cavity detection, an efficient, objective, and flexible technical solution is provided for structural defect analysis before 3D printing.
[0116] Based on the above embodiments, as an optional embodiment, analyzing the first connected component and the second connected component to generate connectivity detection results includes:
[0117] Count the first quantity of the first connected component, the second quantity of the second connected component, and the number of voxel units corresponding to each second connected component;
[0118] If the first quantity is 1 and the second quantity is 0, or the number of each voxel unit is within a preset range, the connectivity detection result is the first connectivity.
[0119] If the first quantity is 1, and there is at least one voxel unit quantity that is not within the preset range, the connectivity detection result is the second connectivity.
[0120] If the first quantity is not 1, the second quantity is greater than the preset quantity, there is at least one voxel unit quantity greater than the maximum value of the preset range, and the difference between the voxel unit quantity and the maximum value is greater than the preset difference, the connectivity detection result is the third connectivity; the first connectivity is better than the second connectivity; the second connectivity is better than the third connectivity.
[0121] In a specific embodiment, after marking the empty parts of the lattice structure (e.g., regions with a voxel value of 1) as connected components, in order to distinguish between real cavities inside the lattice structure and the infinite space outside, the system first identifies and excludes empty connected components connected to the outside world, which typically correspond to the external space of the model. The remaining empty connected components are then regarded as potential cavities inside the model, and the volume (i.e., the number of voxel units) of these internal cavities is statistically analyzed and thresholded.
[0122] Specifically, the number of voxel units in the marked internal cavity (the blank connected component obtained after excluding the external space, i.e., the second connected component) is counted. At the same time, the first quantity of the first connected component and the second quantity of the second connected component are counted.
[0123] In one alternative embodiment, to ensure the printability of the lattice structure, the number of voxel units needs to be within a preset range; that is, the blank areas (i.e., cavities) should not be too small or too large. Therefore, the preset range includes a minimum value and a maximum value, and the minimum value is not 0.
[0124] For example, a minimum voxel number threshold of 5 is used to identify tiny cavities that may cause difficulties in powder removal (in metal 3D printing, powder is sintered, and if the cavity is small, it may be impossible to remove the powder) or stress concentration. Furthermore, a maximum voxel number threshold, such as a voxel unit number accounting for 10% of the total volume, is used to identify excessively large cavities that may affect the overall performance of the structure, or, if the cavity is large, to allow for post-processing such as drilling before powder removal.
[0125] The first connected component is the solid part of the crystal structure. The number of the first connected components is mainly used to identify whether the solid part is a single, dominant connected component. The number of the second connected components is mainly used to identify the complexity of the internal cavity. The more second connected components there are, the higher the complexity of the internal cavity.
[0126] Based on the above description, in one optional embodiment, return codes can be used to characterize different connectivity detection results. For example, the detection result for the first connectivity can be in the range of code 0, used to characterize good connectivity of the lattice structure. In a specific detection embodiment, if the first quantity is 1, indicating good connectivity of the main structure (i.e., the solid part forms a single major connected component), and if the second quantity is 0 (indicating that no internal cavity is detected, i.e., the lattice structure is a solid structure), or the number of each voxel unit is within a preset range (i.e., greater than the minimum voxel number threshold and less than the maximum voxel number threshold), then the detection result for the first connectivity is generated.
[0127] In another optional embodiment, the detection result for the second connectivity can be ranged from code 1, used to characterize a potential risk to the connectivity of the crystal structure. In a specific detection embodiment, if the first quantity is 1, and the number of voxel units is less than the minimum voxel quantity threshold or greater than the maximum voxel quantity threshold (i.e., not within a preset range), a second connectivity detection result is generated.
[0128] In another optional embodiment, the detection result for third connectivity can be ranged from code 2, used to characterize a severe defect in the connectivity of the crystal structure. In a specific detection embodiment, a detection result for third connectivity can be generated if at least one of the following conditions is met.
[0129] Scenario 1: If the first quantity is not 1, it indicates that the main crystal structure is not unique, meaning the main structure is not connected (e.g., the model entity is divided into multiple unconnected main parts). Scenario 2: If the number of at least one voxel unit is greater than the maximum voxel number threshold, and the difference from the maximum voxel number threshold is greater than a preset difference, it indicates the existence of a huge internal cavity with a size far exceeding expectations. Scenario 3: If the second quantity is greater than the preset quantity, it indicates a complex cavity situation, suggesting a serious problem with the structural design, making it unsuitable for printing and requiring modification.
[0130] In an optional embodiment, depending on user configuration, the voxel data and connectivity marker arrays (such as raw data, padding data, extended data and their connectivity marker results) processed at each stage can be saved as a specified format file (e.g., a .npy format file) for subsequent analysis or as a database record.
[0131] In another alternative embodiment, a PyVista visualization module is integrated to perform 3D rendering of the voxel data. Users can adjust the transparency (e.g., set to 0.1 or 1) to visually observe the distribution of solids and cavities in the structure, facilitating quick manual review and aiding in the assessment of design feasibility and structural defects.
[0132] Therefore, the lattice structure connectivity detection method provided in this application significantly reduces the limitations of relying on manual judgment in traditional methods through its automated decision-making mechanism, and improves the objectivity and efficiency of detection.
[0133] In the above embodiments, the method for detecting the connectivity of crystal structures has been described in detail. This application also provides an embodiment of a device for detecting the connectivity of crystal structures.
[0134] Figure 8 This is a schematic diagram of the structure of a lattice structure connectivity detection device provided in an embodiment of this application, as shown below. Figure 8 As shown, the device includes:
[0135] Lattice structure acquisition module 80 is used to acquire the lattice structure to be detected;
[0136] Voxel conversion module 81 is used to convert the voxelization of the crystal structure into binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, the voxel units of the solid part of the crystal structure are the first voxel values, and the voxel units of the blank part are the second voxel values.
[0137] The first boundary filling module 82 is used to fill the boundary of the binary voxel data with voxel units of the second voxel value to wrap the binary voxel data, so as to obtain the first voxel data.
[0138] The first inversion module 83 is used to invert the voxel values of the first voxel data to obtain the second voxel data;
[0139] The connectivity analysis module 84 is used to analyze binary voxel data and second voxel data to generate connectivity detection results for the crystal structure.
[0140] Furthermore, the lattice structure connectivity detection device provided in this application embodiment also includes:
[0141] The first acquisition module is used to acquire the lattice size of the crystal structure and the printing resolution of the target 3D printer; the target 3D printer is used to print the target structure according to the crystal structure.
[0142] The voxel resolution determination module is used to determine the preset voxel resolution based on the lattice size and printing resolution.
[0143] The 3D voxel structure generation module is used to generate a 3D voxel structure of a preset shape composed of voxel units based on a preset voxel resolution.
[0144] An embedding module is used to place a lattice structure within a three-dimensional voxel structure based on a pre-built three-dimensional spatial coordinate system and with specified point alignment as a reference; the boundaries of the lattice structure are aligned with the boundaries of the three-dimensional voxel structure in the X, Y, and Z directions of the three-dimensional spatial coordinate system.
[0145] The voxel value assignment module is used to assign a first voxel value to the voxel units of the solid part and a second voxel value to the blank part, so as to obtain binary voxel data.
[0146] The fill boundary determination module is used to use the boundary of the 3D voxel structure as the fill boundary of the binary voxel data; the preset shape is a cuboid.
[0147] The second boundary filling module is used to fill each filling boundary with a preset number of voxel units of the second voxel value to obtain the first voxel data.
[0148] The voxel data expansion module is used to expand binary voxel data by a specified factor in a specified direction to obtain third voxel data; the specified direction is the direction of periodic arrangement during lattice structure 3D printing;
[0149] The third boundary filling module is used to fill the boundary of the third voxel data with voxel units of the second voxel value to wrap the third voxel data, so as to obtain the fourth voxel data.
[0150] The second inversion module is used to invert the voxel values of the fourth voxel data to obtain the fifth voxel data.
[0151] The connected component determination module is used to perform connectivity analysis on binary voxel data, second voxel data and fifth voxel data based on the six-connected structure labeling method, so as to determine the first connected component of the entity part and the second connected component of the blank part.
[0152] The detection result generation module is used to analyze the first connected component and the second connected component to generate connectivity detection results.
[0153] The quantity statistics module is used to count the first quantity of the first connected component, the second quantity of the second connected component, and the number of voxel units corresponding to each second connected component.
[0154] The first result generation module is used to generate a connectivity detection result as the first connectivity if the first quantity is 1 and the second quantity is 0 or the number of each voxel unit is within a preset range.
[0155] The second result generation module is used to generate a connectivity detection result as a second connectivity if the first quantity is 1 and there is at least one voxel unit quantity that is not within a preset range.
[0156] The third result generation module is used to generate a connectivity detection result as a third connectivity if at least one of the following conditions is met: the first quantity is not 1, the second quantity is greater than a preset quantity, there is at least one voxel unit quantity greater than the maximum value of a preset range, and the difference between the voxel unit quantity and the maximum value is greater than a preset difference; the first connectivity is better than the second connectivity; and the second connectivity is better than the third connectivity.
[0157] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes: a memory 90 for storing computer programs;
[0158] The processor 91 is used to execute a computer program to implement the steps of the method for detecting the connectivity of the crystal structure as described in the above embodiments.
[0159] The electronic devices provided in this embodiment may include, but are not limited to, laptops or desktop computers.
[0160] The processor 91 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 91 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 91 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 91 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 91 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0161] The memory 90 may include one or more computer-readable storage media, which may be non-transitory. The memory 90 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 90 is used to store at least the following computer program 901, which, after being loaded and executed by the processor 91, is capable of implementing the relevant steps of the lattice structure connectivity detection method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 90 may also include an operating system 902 and data 903, and the storage method may be temporary or permanent storage. The operating system 902 may include Windows, Unix, Linux, etc. The data 903 may include, but is not limited to, relevant data involved in the lattice structure connectivity detection method.
[0162] In some embodiments, the electronic device may further include a display screen 92, an input / output interface 93, a communication interface 94, a power supply 95, and a communication bus 96.
[0163] Those skilled in the art will understand that Figure 9 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0164] The electronic device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the method for detecting the connectivity of the crystal structure in the above embodiments.
[0165] It should be noted that although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Claims
1. A method of detecting connectivity of a lattice structure, characterized by, The method comprises: acquiring a lattice structure to be detected; converting the lattice structure into binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, voxel units of a solid part of the lattice structure are a first voxel value, and voxel units of a blank part are a second voxel value; filling the voxel units of the second voxel value on the boundary of the binary voxel data to wrap the binary voxel data, to obtain first voxel data; inverting the voxel values of the first voxel data to obtain second voxel data; analyzing the binary voxel data and the second voxel data to generate a connectivity detection result of the lattice structure; the conversion of the lattice structure into binary voxel data composed of voxel units based on a preset voxel resolution comprises: acquiring a lattice size of the lattice structure and a printing resolution of a target 3D printer; the target 3D printer is used to print a target structure according to the lattice structure; determining the preset voxel resolution according to the lattice size and the printing resolution; generating a preset shape of a three-dimensional voxel structure composed of the voxel units based on the preset voxel resolution; aligning the lattice structure to a specified point as a reference in a three-dimensional spatial coordinate system constructed in advance; in the X-axis, Y-axis and Z-axis directions of the three-dimensional spatial coordinate system, the boundary of the lattice structure is aligned with the boundary of the three-dimensional voxel structure; assigning the first voxel value to the voxel units of the solid part and the second voxel value to the blank part to obtain the binary voxel data.
2. The method of claim 1, wherein the step of determining the connectivity of the lattice structure is performed by a computer. The preset shape is a cuboid; the filling of the voxel units of the second voxel value on the boundary of the binary voxel data to wrap the binary voxel data to obtain first voxel data comprises: taking the boundary of the three-dimensional voxel structure as the filling boundary of the binary voxel data; filling each of the filling boundaries with a preset number of voxel units of the second voxel value to obtain the first voxel data.
3. The method of claim 1, wherein the step of determining the connectivity of the lattice structure is performed by a computer. The preset voxel resolution is smaller than the printing resolution; the preset voxel resolution is negatively correlated with the computing resources and the lattice size.
4. The method of claim 1, wherein the step of determining the connectivity of the lattice structure is performed by a computer. Before the analysis of the binary voxel data and the second voxel data to generate the connectivity detection result of the lattice structure, the method further comprises: expanding the binary voxel data in a specified direction by a specified multiple to obtain third voxel data; the specified direction is a direction of periodic arrangement when the lattice structure is 3D printed; filling the voxel units of the second voxel value on the boundary of the third voxel data to wrap the third voxel data to obtain fourth voxel data; inverting the voxel values of the fourth voxel data to obtain fifth voxel data.
5. The method of claim 4, wherein the step of determining the connectivity of the lattice structure is performed by a method comprising: determining the connectivity of the lattice structure by using a computer program. The analysis of the binary voxel data and the second voxel data to generate the connectivity detection result of the lattice structure comprises: Perform connectivity analysis on the binary voxel data, the second voxel data and the fifth voxel data based on a six-connected structure marking method to determine a first connected component of the solid part and a second connected component of the blank part; Analyze the first connected component and the second connected component to generate the connectivity detection result.
6. The method of claim 5, wherein the step of determining the connectivity of the lattice structure is performed by a method comprising: determining a plurality of distances between the plurality of points; and determining the connectivity of the lattice structure based on the plurality of distances. The analysis of the first connected component and the second connected component to generate the connectivity detection result includes: Counting a first number of the first connected component, a second number of the second connected component, and a number of voxel units corresponding to each of the second connected components; If the first number is 1 and the second number is 0 or each of the numbers of voxel units is within a preset range, the connectivity detection result is first connectivity; If the first number is 1 and there is at least one number of voxel units that is not within the preset range, the connectivity detection result is second connectivity; If the first number is not 1, the second number is greater than a preset number, there is at least one number of voxel units that is greater than a maximum value of the preset range, and the difference between the maximum value and the at least one number of voxel units is greater than a preset difference, the connectivity detection result is third connectivity; the first connectivity is better than the second connectivity; and the second connectivity is better than the third connectivity.
7. A device for detecting connectivity of a lattice structure, characterized by The device includes: A lattice structure acquisition module configured to acquire a lattice structure to be detected; A voxel conversion module configured to voxelize the lattice structure to convert the lattice structure into binary voxel data composed of voxel units based on a preset voxel resolution; in the binary voxel data, voxel units of a solid part of the lattice structure are of a first voxel value, and voxel units of a blank part are of a second voxel value; A first boundary filling module configured to fill voxel units of the second voxel value at a boundary of the binary voxel data to wrap the binary voxel data to obtain first voxel data; A first negation module configured to negate voxel values of the first voxel data to obtain second voxel data; A connectivity analysis module configured to analyze the binary voxel data and the second voxel data to generate a connectivity detection result of the lattice structure; A first acquisition module configured to acquire a lattice size of the lattice structure and a printing resolution of a target 3D printer; the target 3D printer is configured to print a target structure according to the lattice structure; A voxel resolution determination module configured to determine the preset voxel resolution based on the lattice size and the printing resolution; A three-dimensional voxel structure generation module configured to generate a three-dimensional voxel structure of a preset shape composed of the voxel units based on the preset voxel resolution; An embedding module configured to embed the lattice structure in the three-dimensional voxel structure based on a three-dimensional space coordinate system pre-constructed and taking specified point alignment as a reference; in X-axis, Y-axis and Z-axis directions of the three-dimensional space coordinate system, a boundary of the lattice structure is aligned with a boundary of the three-dimensional voxel structure. A voxel value assigning module is configured to assign the first voxel value to voxel units of the entity part and the second voxel value to the blank part, so as to obtain the binary voxel data.
8. An electronic device comprising a memory and a processor, said memory having stored thereon a computer program operable to run on said processor, characterized in that, The processor executes the computer program to implement the steps of the method for detecting the connectivity of the lattice structure according to any one of claims 1 to 6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the method for detecting the connectivity of the lattice structure according to any one of claims 1 to 6.
Citation Information
Patent Citations
Model cavity detection method and system
CN120431052A
Method and apparatus for analytical modeling
US6407738B1