A method for slicing the surface of complex parts by layer based on irregular voxelization
By adopting a curved surface layered slicing method based on irregular voxelization in the additive manufacturing of complex metal parts, the problems of insufficient morphological and positional accuracy and low slice efficiency in the prior art are solved, and the manufacturing of complex metal parts with high precision and low material consumption is achieved.
Patent Information
- Application Number
- CN202210137820.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-02-15
AI Technical Summary
In the additive manufacturing of complex metal parts, the shape and position accuracy is insufficient, and the plane slicing algorithm leads to low slicing efficiency, large material consumption, and the generated model accuracy is not high.
The hierarchical slicing method of complex parts based on irregular voxelization is adopted. By inputting the STL model in the slice software, the bottom triangular surface information is extracted, the base slice surface is generated, and non-equidistant offset and irregular grid division is performed. The irregular voxelization is achieved with layer thickness, and Boolean operations are used to quickly intersect to form the layered surfaces of complex metal parts.
It realizes rapid and free surface slicing of complex metal parts models, improves slice efficiency and forming efficiency, ensures high-precision finished products, and reduces material consumption and engineering volume.
Smart Images

Figure CN114692326B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of additive manufacturing, and relates to layered slicing of complex metal part surfaces, and in particular to a layered slicing method of complex part surfaces based on irregular voxelization. Background Art
[0002] In recent years, my country's metal additive manufacturing has developed rapidly, covering major national projects such as large ships (aircraft carriers), aerospace vehicles, and high-rise buildings. Although metal additive manufacturing equipment can currently realize the processing of complex metal parts, the additive manufacturing technology still has the current situation that the shape and position accuracy of complex metal parts cannot meet the requirements of actual industrial use. When manufacturing digital models into complex metal parts, slicing is an indispensable part of the manufacturing process. The slicing operation is to divide the digital model into several layers according to a certain thickness, so that the three-dimensional model is converted into two-dimensional plane data, and the motion path of the extruder is designed to generate a file that can be recognized by the hardware device.
[0003] Although plane slicing currently occupies a dominant position in the market, the widely used slicing algorithms on the market, such as those based on triangular face topology information, based on model geometric features, and based on model geometric continuity, are all plane slicing algorithms. Although plane slicing algorithms are simple to implement and have fast program execution speed, these algorithms differ in layering processing speed, layering efficiency, information storage memory size, and processing difficulty. In addition, the step effect is obvious, which will affect the surface quality of complex metal parts or lose a small amount of model morphological features, and it is easy to cause local energy accumulation and uneven temperature field when forming complex metal parts. In the technology of additive manufacturing of complex metal parts using methods such as laser powder feeding, wire feeding, and arc welding, the model accuracy of complex structural parts produced by additive manufacturing based on plane slicing is low, the amount of files that can be recognized by the generated hardware equipment is large, and the material consumption is large.
[0004] Therefore, a new technical solution is needed to solve the above problems. Summary of the invention
[0005] Purpose of the invention: In order to solve the complex problems existing in the additive manufacturing of complex metal parts in the prior art, a complex part surface layered slicing method based on irregular voxelization is provided, which can realize fast and free-form surface slicing of complex metal part models, and has the advantages of improving slicing efficiency and forming efficiency while ensuring high precision requirements.
[0006] Technical solution: To achieve the above purpose, the present invention provides a complex part surface layered slicing method based on irregular voxelization, comprising the following steps:
[0007] S1: Input the STL model of the complex metal part into the slicing software, extract the information of the bottom triangular facets of the model, generate the base slicing surface according to the information of the bottom triangular facets, and use the generated base slicing surface as the reference surface;
[0008] S2: Perform non-uniform offset on the reference surface to obtain the slicing surface;
[0009] S3: Conduct irregular grid division on the slicing surface, and then combine with the layer thickness of the current layer where the slicing surface is located to achieve irregular voxelization, forming an irregular voxel model with different shapes, sizes, and thicknesses;
[0010] S4: Use Boolean operation to quickly intersect the irregular voxel model with the complex metal part, discard the part of the slicing surface that is not the complex metal part, and form the layered surfaces of the complex metal part; and the surface structure can be adjusted through length, width, height, area, volume, and precision parameters to accelerate the speed of the irregular voxelized surface slicing;
[0011] S5: Write the surface slicing software to perform surface slicing and save the multi-layer surface slicing data file.
[0012] Further, the step S1 includes the following steps:
[0013] A1: Reconstruct the topological relationship of the input STL model of the complex metal part, and automatically extract the information of the bottom triangular facets of the model;
[0014] A2: Automatically generate the base slicing surface according to the information of the bottom triangular facets, and use the generated base slicing surface as the reference surface.
[0015] Further, the step A1 is specifically as follows:
[0016] A1-1: Traverse each triangular facet in the STL model of the complex metal part, and record the x, y, and z coordinates of the vertices of each triangular facet in arrays A, B, and C respectively;
[0017] A1-2: First sort array C, and then sort the x and y coordinates of the vertices with the same z coordinate in ascending order to remove redundancy for each vertex of the triangular facet; remove the edges formed by the redundant vertices and adjacent redundant vertices to remove redundancy for each edge of the triangular facet;
[0018] A1-3: Reconstruct the topological relationship of the STL model of the complex metal part;
[0019] A1-4: Select the values of arrays A and B after redundancy removal, and obtain as shown in the following formula (1):
[0020] M = {(x m , y m ) | m = 1, 2, ..., n} (1)
[0021] Wherein, M is the coordinate representation set of the projections of all vertex coordinates on the complex metal part onto the XOY plane. x m is the x-axis coordinate of the m-th vertex of the projections of all vertex coordinates on the complex metal part onto the XOY plane, and y m is the y-axis coordinate of the m-th vertex of the projections of all vertex coordinates on the complex metal part onto the XOY plane. n is the number of all vertices on the complex metal part;
[0022] Take the vertex coordinate with the smallest z coordinate among the vertex coordinates that satisfy the equality of the projections of the vertex coordinates on the complex metal part onto the XOY plane to obtain its corresponding original vertex coordinate, as shown in the following formula (2):
[0023] N = {(x m , y m , z minm ) | m = 1, 2, ..., n} (2)
[0024] Wherein, N is the set of original vertex coordinates of the bottom triangular patches of the complex metal part. z minm is the smallest z coordinate value among all vertices that satisfy M = {(x m , y m ) | m = 1, 2, ..., n}.
[0025] Furthermore, the specific content of step A2 is as follows:
[0026] Automatically generate a base slicing surface according to the obtained bottom triangular patch information. The projection area of this surface on the XOY plane is equivalent to the projection of the entire complex metal part on the XOY plane, and use the base slicing surface as the reference surface.
[0027] Furthermore, the specific content of step S2 is as follows:
[0028] B1: Along the direction perpendicular to the direction with high plastic requirements, generally take the Z-axis direction as the forming direction, and perform non-uniform division in the Z-axis direction of the complex metal part according to different precision requirements;
[0029] B2: Perform non-uniform offset on the reference surface according to the non-uniform division in step B1 to determine the slicing surface.
[0030] Furthermore, the specific content of step B1 is as follows:
[0031] Take the Z-axis direction as the forming direction, and divide the accuracy requirements of the Z-axis direction of the complex metal part according to the standard tolerance International Tolerance. There are a total of 20 tolerance grades. The tolerance grade IT01 has the highest accuracy, and the tolerance grade IT18 has the lowest accuracy. Set the distance at the tolerance grade IT01 as the minimum distance d min , for each increase in the tolerance grade by one level, the distance increases by one minimum distance d min on the basis of min , as shown in the following formula (3):
[0032] D z,s =[k - (-1)]d min (3)
[0033] In the formula, D z,s represents the distance divided in the forming direction of the current s-th layer, k represents the tolerance grade ITk of the complex metal part in the forming direction, and d min represents the distance at the tolerance grade IT01 of the complex metal part in the forming direction;
[0034] According to the distance divided in the forming direction of each layer, complete the non-uniform division of the complex metal part in the forming direction;
[0035] The specific content of step B2 is as follows:
[0036] Offset the obtained reference surface upward in the forming direction according to the non-uniform division distance. The calculation of the offset amount each time is as shown in the following formula (4):
[0037] Offset z,s =D z,s (4)
[0038] In the formula, Offset z,s represents the offset amount of the current s-th layer in the forming direction, and D z,s represents the distance divided in the forming direction of the current s-th layer;
[0039] According to the offset amount of each layer in the forming direction, perform non-uniform offset on the obtained reference surface to determine the sliced surface of the complex metal part.
[0040] Furthermore, the method for performing irregular grid division on the sliced surface in step S3 is as follows:
[0041] Discretize the determined sliced surface. First, change each layer of the sliced surface into regular grids divided according to the highest accuracy of the layer where the current sliced surface is located, and calculate the grid side length, as shown in the following formula (5):
[0042] Length = P H In formula (5), Length refers to the side length of the regular grid, and P H is the highest precision of the layer where the current sliced surface is located;
[0043] Then, the partial grids with a precision requirement lower than the highest precision P H are merged, and the grids with the same precision requirement are merged together to obtain an irregular grid division.
[0044] Further, the method for forming the irregular voxel model in step S3 is as follows:
[0045] The STL format model is sliced layer by layer along the Z-axis direction from the minimum value Z in array C min to the maximum value Z in array C max Using the incremental method to calculate the precision information coordinates of adjacent voxels on the Z-direction scan line, a series of inner and outer contour rings are formed after layer-by-layer slicing.
[0046] Further, step S4 is specifically as follows:
[0047] C1: Using Boolean operations, perform "intersection, union, and complement" operations on the sliced surface that realizes irregular voxelization and the complex metal part quickly;
[0048] C2: Determine whether the voxels at the same position belong to both the inside of the sliced surface and the inside of the complex metal part at the same time, and discard the part of the sliced surface that does not belong to the complex metal part to form the layered surfaces of the complex metal part;
[0049] C3: Adjust the surface structure through length, width, height, area, volume, and precision parameters, and export the multi-layer surface slice file to speed up the slicing speed of the irregular voxelized surface slice, and realize improving the slicing efficiency and forming efficiency while ensuring high-precision requirements;
[0050] Step C1 is specifically as follows: In each layer of the sliced surface, find the solid part within the inner and outer contour rings formed in step 3.2 and mark it as "1", and mark the rest as "0";
[0051] Step C2 is specifically as follows: Detect whether each surface voxel is "1". If it is "1", it is inside the solid, and then keep the voxel. Otherwise, if it is not inside the solid, set the voxel on the surface to an empty voxel.
[0052] Further, step S5 is specifically as follows:
[0053] D1: The surface slicing software is developed based on vb.net, and uses the graphics software package OpenTK as the display tool for the model. The menu bar of the surface slicing software includes five menus: "Model", "Translation", "Scaling", "Rotation", and "Sectioning".
[0054] D2: Select the corresponding model file format under the "Model" menu in step D1, and then perform operations such as opening, saving, and exiting the file. Under the "Translation" menu, translate the model in the X, Y, and Z directions. Under the "Scaling" menu, set the scaling parameters and perform the scaling operation on the model. Under the "Rotation" menu, set the rotation angle and the parameters of the central axis, and perform the model rotation. Under the "Sectioning" menu, slice the model, set the parameters of the model surface slice, and perform the slicing. Save the slice data. The file type for saving the multi-layer surface slice file is the.slc file.
[0055] For models with some complex metal parts, in order to improve the model strength, reduce the engineering quantity, and lower the material consumption, and produce complex metal parts with higher strength and better fitting the surface of the existing model, it is also necessary to select a better surface slicing method. The present invention is based on plane slicing, designs a slicing surface that automatically generates a surface fitting the bottom surface of the model based on the input STL model of the complex metal part, voxelizes the model according to different precision requirements, designs surface adjustment parameters, and converts the surface information of the model into three-dimensional voxel information of the model, so as to realize fast and free surface slicing of the model. Using the data file generated by surface slicing for manufacturing can produce complex metal parts with higher strength and better fitting the surface of the existing model.
[0056] Advantageous effects: Compared with the prior art, the present invention has the following advantages:
[0057] 1. The slicing surface can automatically extract the bottom triangular patch information of the model through an algorithm, and automatically generate a slicing surface according to the bottom triangular patch information, improving the forming efficiency.
[0058] 2. Voxelize the model irregularly according to different precision requirements, and the surface can be adjusted through parameters to achieve an ideal slicing surface, improving the efficiency of surface slicing on the premise of ensuring the forming quality.
[0059] 3. It is possible to perform irregular grid division on the slicing surface and combine with the layer thickness of the current layer where the slicing surface is located to achieve irregular voxelization, so as to form irregular voxel models with different shapes, sizes, and thicknesses.
[0060] 4. It is possible to adjust the surface structure through length, width, height, area, volume, and precision parameters to accelerate the speed of irregular voxelized surface slicing. Description of the Drawings
[0061] Figure 1 is a schematic diagram of the working process of the method of the present invention;
[0062] Figure 2It is a multi-directional steel node model of complex metal parts provided by an embodiment of the present invention;
[0063] Figure 3 It is an intersection surface diagram of a multi-directional steel node of a complex metal part selected in the software interface of the surface slicing software provided by an embodiment of the present invention;
[0064] Figure 4 It is an irregular voxel model diagram of the intersection surface of a multi-directional steel node of complex metal parts provided by an embodiment of the present invention;
[0065] Figure 5 It is a display diagram of irregular grid division carried out according to accuracy requirements provided by an embodiment of the present invention;
[0066] Figure 6 It is the main interface diagram of the slicing software provided by an embodiment of the present invention;
[0067] Figure 7 It is the system structure diagram of the surface slicing software provided by an embodiment of the present invention. Detailed implementation manners
[0068] The present invention will be further clarified below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. After reading the present invention, various equivalent modifications of the present invention by those skilled in the art fall within the scope defined by the appended claims of this application.
[0069] The present invention provides a method for slicing the surface of complex parts based on irregular voxelization, as Figure 1 shown, which includes the following steps:
[0070] Step 1: Input the STL model of the complex metal part into the slicing software, automatically extract the bottom triangular patch information of the STL model, and automatically generate a base slicing surface according to the bottom triangular patch information to determine the reference surface;
[0071] Step 2: Through the division of different parts of the complex metal part with different accuracy requirements, take the direction perpendicular to the direction with high plasticity requirement as the forming direction, and perform non-uniform offset on the reference surface to determine the slicing surface;
[0072] Step 3: Perform irregular grid division on the slicing surface determined in Step 2, and then combine with the layer thickness of the current layer where the slicing surface is located to realize irregular voxelization to form an irregular voxel model;
[0073] Step 4: Using Boolean operations, quickly intersect the sliced surface that realizes irregular voxelization in Step 3 with the complex metal part, and discard the part of the sliced surface that is not the complex metal part to form the layered surfaces of the complex metal part. Moreover, the surface structure can be adjusted by length, width, height, area, volume, and precision parameters to accelerate the speed of slicing the irregular voxelized surface;
[0074] Step 5: Write surface slicing software using vb.net, connect the operations of file reading, model moving, and model slicing parameter design with the controls of the software, set the parameters of model surface slicing, calculate and display the length, width, height, area, and volume parameters of the imported STL file model on the software interface, perform surface slicing, and save the multi-layer surface slicing data file.
[0075] Based on the above surface slicing method, in this embodiment, the above surface slicing method is applied to the Figure 2 multi-directional steel joint model of the complex metal part as shown in
[0076] Step 1 includes:
[0077] Step 1.1: Reconstruct the topological relationship of the input STL model of the multi-directional steel joint of the complex metal part, and automatically extract the bottom triangular patch information of the model;
[0078] Step 1.2: Use the base sliced surface automatically generated according to the bottom triangular patch information obtained in Step 1.1 as the reference surface.
[0079] Specifically, Step 1.1 is as follows:
[0080] By traversing each triangular patch in the STL model of the multi-directional steel joint of the complex metal part, and recording the x, y, and z coordinates of each vertex of each triangular patch in arrays A, B, and C respectively. First, sort array C, and then sort the x and y coordinates of the vertices with the same z coordinate in ascending order of numerical value to remove redundancy for each vertex of the triangular patch; Remove the redundant vertices and the edges formed by adjacent redundant vertices to remove redundancy for each edge of the triangular patch. Thus, reconstruct the topological relationship of the STL model of the multi-directional steel joint of the complex metal part;
[0081] Select the values of arrays A and B after redundancy removal, and obtain the following formula (1):
[0082] M = {(x m , y m ) | m = 1, 2,..., n} (1)
[0083] Where M is the coordinate set representing the projection of all vertex coordinates on the multi-directional steel nodes of complex metal parts onto the XOY plane, and x m It refers to the x-axis coordinate of the mth vertex on the XOY plane projected from all vertex coordinates on the multi-directional steel node of a complex metal part. m It refers to the y-axis coordinate of the mth vertex on the XOY plane projected from the coordinates of all vertices on the multi-directional steel node of the complex metal part, and n is the number of all vertices on the multi-directional steel node of the complex metal part;
[0084] Take the vertex coordinate with the smallest z coordinate among the vertex coordinates on the multi-directional steel node of the complex metal part that are projected onto the XOY plane to obtain its corresponding original vertex coordinates, as shown in the following formula 2:
[0085] N={(x m ,y m , z minm )|m=1,2,...,n} (2)
[0086] Where N is the coordinate set of the original vertices of the triangle patch on the bottom surface of the multi-directional steel node of the complex metal part, z minm To represent the condition that satisfies M={(x m ,y m )|m=1,2,...,n}, the smallest z coordinate value among all vertices.
[0087] Step 1.2 is as follows:
[0088] The base slice surface is automatically generated according to the bottom triangle patch information obtained in step 1.1. The projection area of this surface on the XOY plane is equivalent to the projection of the multi-directional steel node of the entire complex metal part on the XOY plane, so the base slice surface is used as the reference surface. For details, please refer to Figure 3 In the surface slicing software interface shown, select the intersection surface of the multi-directional steel node of the complex metal part.
[0089] Step 2 includes:
[0090] Step 2.1: Take the Z-axis direction as the forming direction, and perform non-equidistant divisions in the Z-axis direction of the multi-directional steel nodes of complex metal parts according to the requirements of different precisions;
[0091] Step 2.2: Perform non-equidistant offset on the reference surface according to the non-equidistant division in step 2.1 to determine the slice surface.
[0092] Step 2.1 is as follows:
[0093] Take the Z-axis direction as the forming direction, and divide the accuracy requirements of the Z-axis direction of the multi-directional steel joint of the complex metal part according to the standard tolerance International Tolerance. There are a total of 20 tolerance grades. The tolerance grade IT01 has the highest accuracy, and the tolerance grade IT18 has the lowest accuracy. Set the distance at the tolerance grade IT01 as the minimum distance d min , for each increase in the tolerance grade by one level, the distance increases by a minimum distance d min on the basis of min , as shown in the following formula 3:
[0094] D z,s =[k - (-1)]d min (3)
[0095] In the formula, D z,s represents the distance divided in the forming direction of the current s-th layer, k represents the tolerance grade ITk of the multi-directional steel joint of the complex metal part in the forming direction, and d min represents the distance at the tolerance grade IT01 of the multi-directional steel joint of the complex metal part in the forming direction;
[0096] According to the distance divided in the forming direction of each layer, the non-equidistant division of the multi-directional steel joint of the complex metal part in the forming direction is completed.
[0097] Step 2.2 is specifically as follows:
[0098] Offset the reference surface obtained in Step 1.2 upward in the forming direction according to the non-equidistant division distance obtained in Step 2.1. The calculation of the offset amount each time is as shown in the following formula 4:
[0099] Offset z,s =D z,s (4)
[0100] In the formula, Offset z,s represents the offset amount of the current s-th layer in the forming direction, and D z,s represents the distance divided in the forming direction of the current s-th layer;
[0101] Perform non-equidistant offset on the reference surface obtained in Step 1.2 according to the offset amount of each layer in the forming direction, so as to determine the sliced surface of the multi-directional steel joint of the complex metal part.
[0102] Step 3 includes:
[0103] Step 3.1: Perform irregular grid division on the sliced surface determined in Step 2;
[0104] Step 3.2: After performing irregular grid division on the sliced surface, combine it with the layer thickness of the current layer where the sliced surface is located to achieve irregular voxelization, so as to form an irregular voxel model with different shapes, sizes, and thicknesses.
[0105] Specifically, Step 3.1 is as follows:
[0106] Discretize the sliced surface determined in Step 2. First, change each layer of the sliced surface into a regular grid divided according to the highest precision of the current layer where the sliced surface is located, and calculate the grid side length, as shown in the following formula 5:
[0107] Length = P H (5)
[0108] In the formula, Length represents the side length of the regular grid, and P H is the highest precision of the current layer where the sliced surface is located;
[0109] Then, merge the partial grids with a precision requirement lower than the highest precision P H together, and merge the grids with the same precision requirement to obtain an irregular grid division.
[0110] In this step, obtain an irregular grid division diagram according to the precision requirement as Figure 5 shown.
[0111] Specifically, Step 3.2 is as follows:
[0112] Slice the STL format model layer by layer along the Z-axis direction from the minimum value Z min in the array C to the maximum value Z max in the array C, use the incremental method to calculate the precision information coordinates of adjacent voxels on the Z-direction scan line, and form a series of inner and outer contour rings after layer-by-layer slicing.
[0113] After Step 3, obtain an irregular voxel model of the intersection surface of the multi-directional steel node of the complex metal part as Figure 4 shown.
[0114] Step 4 includes:
[0115] Step 4.1: Use Boolean operations to quickly perform "intersection, union, and complement" operations on the sliced surface that has achieved irregular voxelization in Step 3 and the multi-directional steel node of the complex metal part;
[0116] Step 4.2: Judge whether the voxels at the same position belong to both the inside of the sliced surface and the inside of the multi-directional steel node of the complex metal part, and discard the part of the sliced surface that does not belong to the multi-directional steel node of the complex metal part to form each layered surface of the multi-directional steel node of the complex metal part;
[0117] Step 4.3: The surface structure can be adjusted by length, width, height, area, volume, and precision parameters, and a multi-layer surface slice file can be exported to accelerate the slicing speed of irregular voxelized surfaces, so as to improve the slicing efficiency and forming efficiency while ensuring high precision requirements.
[0118] Specifically, Step 4.1 is as follows:
[0119] Within each layer of the sliced surface, find the solid part within the inner and outer contour rings formed in Step 3.2 and mark it as "1", and mark the rest as "0".
[0120] Specifically, Step 4.2 is as follows:
[0121] Detect whether each surface voxel is "1". If it is "1", it is within the solid, and then keep the voxel. Otherwise, if it is not within the solid, set the voxel on the surface to an empty voxel.
[0122] Figure 6 This is the main interface of the slicing software provided in this embodiment. Figure 7 This is the system structure diagram of the surface slicing software. Refer to Figure 6 and Figure 7 , Step 5 includes:
[0123] Step 5.1: The surface slicing software is developed based on vb.net and uses the graphics software package OpenTK as the display tool for the model. The menu bar of the surface slicing software includes five menus: "Model", "Translation", "Scaling", "Rotation", and "Sectioning".
[0124] Step 5.2: Select the corresponding model file format under the "Model" menu in Step 5.1, and then perform the operations of opening, saving, and exiting the file. Under the "Translation" menu, translate the model in the X, Y, and Z directions. Under the "Scaling" menu, set the scaling parameters and perform the scaling operation on the model. Under the "Rotation" menu, set the rotation angle and the parameters of the central axis, and perform the model rotation. Under the "Sectioning" menu, slice the model, set the parameters for surface slicing of the model, and save the sliced data; the file type for saving the multi-layer surface slice file is the.slc file.
[0125] This embodiment also provides a surface slicing system, which includes a network interface, a memory, and a processor; among them, the network interface is used to receive and send signals during the process of communicating with other external network elements; the memory is used to store computer program instructions that can run on the processor; the processor is used to execute the steps of the above consensus method when running the computer program instructions.
[0126] This embodiment also provides a computer storage medium storing a computer program, which can implement the methods described above when executed by a processor. The computer-readable medium can be considered tangible and non-transitory. Non-limiting examples of non-transitory tangible computer-readable media include non-volatile memory circuits (such as flash memory circuits, erasable programmable read-only memory circuits, or mask read-only memory circuits), volatile memory circuits (such as static random access memory circuits or dynamic random access memory circuits), magnetic storage media (such as analog or digital magnetic tapes or hard disk drives), and optical storage media (such as CDs, DVDs, or Blu-ray discs), etc. The computer program includes processor-executable instructions stored on at least one non-transitory tangible computer-readable medium. The computer program may also include or rely on stored data. The computer program may include a basic input / output system (BIOS) that interacts with the hardware of a dedicated computer, device drivers that interact with specific devices of a dedicated computer, one or more operating systems, user applications, background services, background applications, etc.
[0127] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0129] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the specified functions in Figure 1 one flow or multiple flows and / or blocks Figure 1The functions specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 the steps of the functions specified in one box or more boxes.
Claims
1. A method for slicing the surface of complex parts based on irregular voxelization, characterized in that, it includes the following steps: S1: Input the STL model of the complex metal part into the slicing software, extract the bottom triangular facet information of the model, generate a base slicing surface according to the bottom triangular facet information, and use the generated base slicing surface as the reference surface; S2: Perform non-uniform offset on the reference surface to obtain the slicing surface; S3: Perform irregular grid division on the slicing surface, and then combine the layer thickness of the current layer where the slicing surface is located to achieve irregular voxelization, forming an irregular voxel model; S4: Use Boolean operation to quickly intersect the irregular voxel model with the complex metal part, and discard the part of the slicing surface that is not the complex metal part, forming each layer slicing surface of the complex metal part; S5: Write surface slicing software, perform surface slicing, and save the multi-layer surface slicing data file; Step S2 is specifically as follows: B1: Take the Z-axis direction as the forming direction, and perform non-uniform division on the Z-axis direction of the complex metal part according to different accuracy requirements; B2: Perform non-uniform offset on the reference surface according to the non-uniform division in step B1 to determine the slicing surface; Step B1 is specifically as follows: Take the Z-axis direction as the forming direction, and divide the accuracy requirements in the Z-axis direction of complex metal parts according to the standard tolerance. The tolerance grade IT01 has the highest accuracy, and the tolerance grade IT18 has the lowest accuracy. Set the distance at the tolerance grade IT01 as the minimum distance d min , for each increase in the tolerance grade, the distance increases by a minimum distance d min on the basis of min , as shown in the following formula (3): D z,s = [k - (-1)]d min (3) where D z,s represents the distance divided in the forming direction of the current s-th layer, k represents the tolerance grade ITk of the complex metal part in the forming direction, and d min represents the distance at the tolerance grade IT01 of the complex metal part in the forming direction; According to the distance divided in the forming direction of each layer, complete non-uniform division on the complex metal part in the forming direction; Step B2 is specifically as follows: Offset the obtained reference surface upward in the forming direction according to the distance of non-uniform division. The calculation of the offset amount each time is shown in the following formula (4): Offset z,s = D z,s (4) In the formula, Offset z,s represents the offset of the current s-th layer in the forming direction, and D z,s represents the distance divided by the current s-th layer in the forming direction; Perform non-uniform offset on the obtained reference surface according to the offset amount of each layer in the forming direction, so as to determine the slicing surface of the complex metal part; The method for performing irregular grid division on the slicing surface in step S3 is: Discretize the determined slicing surface. First, change each layer slicing surface into a regular grid divided according to the highest accuracy of the current layer where the slicing surface is located, and calculate the grid side length, as shown in the following formula (5): Length=P H (5) Wherein, Length refers to the side length of the grid of the rule, and P H is the highest precision of the layer where the current sliced surface is located; Then, the partial grids with a precision requirement lower than the highest precision P H are merged, and the grids with the same precision requirement are merged together to obtain an irregular grid division.
2. A method for slicing the surface of complex parts based on irregular voxelization according to claim 1, characterized in that, step S1 includes the following steps: A1: Reconstruct the topological relationship of the input STL model of the complex metal part, and automatically extract the bottom triangular facet information of the model; A2: Automatically generate a base slicing surface according to the bottom triangular facet information, and use the generated base slicing surface as the reference surface.
3. A method for slicing the surface of complex parts based on irregular voxelization according to claim 2, characterized in that, step A1 is specifically as follows: A1-1: Traverse each triangular facet in the STL model of the complex metal part, and record the x, y, and z coordinates of the vertices of each triangular facet in array A, array B, and array C respectively; A1-2: First sort array C, and then sort the x coordinates and y coordinates of the vertices with the same z coordinate in ascending order of numerical value to remove redundancy for each vertex of the triangular facet; Remove the edges formed by redundant vertices and adjacent redundant vertices to remove redundancy for each edge of the triangular facet; A1-3: Reconstruct the topological relationship of the STL model of complex metal parts; A1-4: Select the values of array A and array B after redundancy removal, and obtain the following formula (1): M = {(x m , y m ) | m = 1, 2, …, n} (1) Wherein, M represents the coordinate representation set of the projections of all vertex coordinates on a complex metal part onto the XOY plane, and x m represents the x-axis coordinate of the m-th vertex of the projections of all vertex coordinates on a complex metal part onto the XOY plane, and y m represents the y-axis coordinate of the m-th vertex of the projections of all vertex coordinates on a complex metal part onto the XOY plane, and n represents the number of all vertices on the complex metal part; Take the vertex coordinate with the smallest z coordinate among the vertex coordinates whose projections onto the XOY plane are equal on the complex metal part, and obtain its corresponding original vertex coordinate, as shown in the following formula (2): N = {(x m , y m , Z minm ) | m = 1, 2, …, n} (2) Where N represents the set of original vertex coordinate representations of the triangular patches on the bottom surface of complex metal parts, and z minm represents the minimum z coordinate value among all vertices that satisfy M = {(x m , y m ) | m = 1, 2,..., n}.
4. According to a method for slicing the surface of a complex part based on irregular voxelization as claimed in claim 2, wherein, the specific step A2 is as follows: Automatically generate a base slice surface according to the obtained bottom triangular patch information. The projection area of this surface on the XOY plane is equivalent to the projection of the entire complex metal part on the XOY plane, and use the base slice surface as the reference surface.
5. According to a method for slicing the surface of a complex part based on irregular voxelization as claimed in claim 3, wherein, the formation method of the irregular voxel model in step S3 is as follows: Slice the STL format model along the Z-axis direction from the minimum value of Z in array C min to the maximum value of Z in array C max Slice layer by layer, calculate the accuracy information coordinates of adjacent voxels on the Z-direction scan line using the incremental method, and form a series of inner and outer contour rings after layer-by-layer slicing.
6. According to a method for slicing the surface of a complex part based on irregular voxelization as claimed in claim 1, wherein, the specific step S4 is as follows: C1: Use Boolean operations to quickly perform "intersection, union, and complement" operations on the slice surface that realizes irregular voxelization and the complex metal part; C2: Judge whether the voxels at the same position belong to both the inside of the slice surface and the inside of the complex metal part at the same time, and discard the part of the slice surface that does not belong to the complex metal part to form each layered surface of the complex metal part; C3: Adjust the surface structure through length, width, height, area, volume, and precision parameters, and export a multi-layer surface slice file; The specific step C1 is as follows: In each layer of the slice surface, find the solid part within the inner and outer contour rings formed in step 3.2 and mark it as "1", and mark the rest as "0"; The specific step C2 is as follows: Detect whether each surface voxel is "1". If it is "1", it is inside the solid, then keep the voxel. Otherwise, if it is not inside the solid, set the voxel on the surface to an empty voxel.
7. According to a method for slicing the surface of a complex part based on irregular voxelization as claimed in claim 1, wherein, the specific step S5 is as follows: D1: The surface slice software is developed based on vb.net, and uses the graphics software package OpenTK as the display tool for the model. The menu bar of the surface slice software includes five menus: "Model", "Translation", "Scaling", "Rotation", and "Sectioning"; D2: Select the corresponding model file format under the "Model" menu in step D1, and then perform the operations of opening, saving, and exiting the file. Under the "Translation" menu, translate the model in the X, Y, and Z directions. Under the "Scaling" menu, set the scaling parameters and perform the scaling operation on the model. Under the "Rotation" menu, set the rotation angle and the parameters of the central axis, and perform the model rotation. Under the "Sectioning" menu, slice the model, set the parameters of the model surface slice, and perform the slicing, save the slice data, and the file type of the saved multi-layer surface slice file is a.slc file.
Citation Information
Patent Citations
Model area change rate-based adaptive hierarchical processing method
CN106202687A
3D printing method and system for complicated parts based on curved surface layering
CN107187056A