A model size compensation scaling method, device, equipment and storage medium
Patent Information
- Application Number
- CN202410237285.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2044-03-01
AI Technical Summary
[0004]有鉴于此,本发明提供了一种模型的尺寸补偿缩放方法、装置、设备及存储介质,以解决现有方法虽然可以有效地改善工件的尺寸精度但是会导致stl文件缩放后大幅变形,加工后在工件规则平面上产生大量的台阶层纹,影响工件外观的问题
[0007]本发明提供的模型的尺寸补偿缩放方法,对待补偿工件stl模型进行尺寸补偿缩放时设定单独的缩放补偿基准中心点,并结合预设尺寸补偿函数和待补偿工件stl模型的每个三角面顶点在成型空间坐标系中的初始坐标值可以实现对待补偿工件stl模型的缩放,进一步,结合预设修正基准点的坐标值可以计算出每个三角面顶点的修正距离值,最后,根据修正距离值可以对补偿缩放后的每个三角面顶点的坐标值进行距离校正并得到校正后的目标工件stl模型。因此,通过实施本发明,在改善整个成型空间中所有位置的所有工件的尺寸精度的同时改善了待补偿工件stl模型的外观。
Smart Images

Figure CN117863562B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D printing technology, specifically to a method, apparatus, device, and storage medium for compensating for and scaling the size of a model. Background Technology
[0002] In selective laser sintering (SLS), a specific amount of powder is first precisely fed onto the worktable using a powder feeding device. Then, a powder spreading roller evenly spreads the powder material onto the surface of the powder bed of the pre-formed part. Next, a heating device heats the powder to a preset temperature. At this point, a galvanometer system controls the laser to precisely scan the solid powder layer according to its cross-sectional profile, melting the powder and ensuring a firm bond between the powder and the pre-formed portion below. After one cross-section is sintered, the worktable descends with a precise thickness, and the powder spreading roller again evenly covers a dense layer of powder for scanning and sintering a new cross-section. This process of repeated scanning and stacking continues until the entire part is manufactured.
[0003] Throughout the entire processing, the shrinkage differences of the workpiece at different positions in the forming cylinder will lead to accuracy errors. To address this issue, the forming data processing software uses a dimensional compensation function to scale the workpiece STL drawing before processing. However, because the pressure and temperature of the workpiece at different positions in the forming cylinder vary, and the time spent in these environments also differs, the dimensional compensation function used is non-linear. Although it can effectively improve the dimensional accuracy of the workpiece, when scaling the workpiece STL model based on a fixed scaling center, the calculated scaling coefficients for individual workpieces far from the scaling center with small spans on one coordinate axis but large spans on the other two coordinate axes differ significantly. This results in substantial deformation of the STL file after scaling, producing numerous step-like textures on the regular plane of the workpiece after processing, affecting the workpiece's appearance. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, device and storage medium for size compensation scaling of a model, in order to solve the problem that although the existing methods can effectively improve the dimensional accuracy of the workpiece, they will cause large deformation of the STL file after scaling, and generate a large number of step textures on the regular plane of the workpiece after processing, which will affect the appearance of the workpiece.
[0005] In a first aspect, the present invention provides a method for size compensation and scaling of a model, the method comprising:
[0006] The process involves obtaining a preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each triangular face vertex in the forming space coordinate system. The preset size compensation function represents any form of function that outputs the first scaling factor along the corresponding coordinate axis of each vertex of the triangular face of the STL model of the workpiece to be compensated. The forming space coordinate system represents a Cartesian coordinate system established in the forming space determined by the forming chamber hardware used to form the workpiece in the forming equipment, with the origin of the coordinate system located at any point in the forming space. The process also involves obtaining the preset scaling compensation reference center point coordinates of the STL model of the workpiece to be compensated; scaling the STL model of the workpiece to be compensated based on each initial coordinate value, the preset scaling compensation reference center point coordinates, and the preset size compensation function to obtain the scaled coordinates of each triangular face vertex; calculating the correction distance value of each triangular face vertex using a preset calculation method based on each initial coordinate value, the preset correction reference point coordinates, the preset scaling compensation reference center point coordinates, and the preset size compensation function; and finally, determining the target workpiece STL model based on the scaled coordinates of each triangular face vertex and the correction distance value of each triangular face vertex.
[0007] The size compensation and scaling method for the model provided by this invention sets a separate scaling compensation reference center point when scaling the STL model of the workpiece to be compensated. By combining a preset size compensation function with the initial coordinate values of each triangular facet vertex of the STL model in the forming space coordinate system, scaling of the STL model can be achieved. Furthermore, by combining the coordinate values of the preset correction reference point, the correction distance value of each triangular facet vertex can be calculated. Finally, based on the correction distance value, the coordinate values of each triangular facet vertex after compensation and scaling can be corrected to obtain the corrected target workpiece STL model. Therefore, by implementing this invention, the dimensional accuracy of all workpieces at all positions in the entire forming space is improved, while simultaneously improving the appearance of the STL model of the workpiece to be compensated.
[0008] In one optional implementation, based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each scaled vertex of the triangular face, including:
[0009] Based on each initial coordinate value and the preset size compensation function, calculate the first scaling factor for each triangle vertex; based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and each first scaling factor, determine the coordinate value of each triangle vertex after scaling.
[0010] According to the preset size compensation function, the present invention can calculate the first scaling factor corresponding to the initial coordinate value of each triangle vertex of the STL model of the workpiece to be compensated in the forming space coordinate system. Furthermore, the first scaling factor can be used to calculate the coordinate value of each triangle vertex after scaling, providing data support for subsequent distance correction.
[0011] In one optional implementation, the coordinate values of each scaled vertex of a triangle are determined based on each initial coordinate value, the coordinate values of a preset scaling compensation reference center point, and each first scaling factor, including:
[0012] Based on each initial coordinate value and the coordinate value of the preset scaling compensation reference center point, calculate the distance between each triangle vertex and the preset scaling compensation reference center point; based on each initial coordinate value, each first scaling factor, and the distance value, determine the coordinate value of each triangle vertex after scaling.
[0013] In one optional implementation, based on each initial coordinate value, a preset correction reference point coordinate value, a preset scaling compensation reference center point coordinate value, and a preset size compensation function, a preset calculation method is used to calculate the correction distance value of each triangle vertex, including:
[0014] Based on each initial coordinate value and a preset size compensation function, calculate the first scaling factor for each triangle vertex; based on each initial coordinate value and the coordinates of the preset scaling compensation reference center point, calculate the coordinates of the corresponding projection point for each triangle vertex; based on each projection point coordinate value and the preset size compensation function, calculate the second scaling factor for each projection point coordinate value; based on each first scaling factor, each second scaling factor, the coordinates of the preset correction reference point, and the coordinates of the preset scaling compensation reference center point, calculate the correction distance for each triangle vertex.
[0015] This invention calculates the first scaling factor of each triangle vertex and the second scaling factor of each projection point coordinate value, and combines them with the preset correction reference point coordinate value and the preset scaling compensation reference center point coordinate value to calculate the correction distance value of each triangle vertex, providing data support for subsequent distance correction.
[0016] In one optional implementation, based on each first scaling factor, each second scaling factor, a preset correction reference point coordinate value, and a preset scaling compensation reference center point coordinate value, the correction distance value for each triangle vertex is calculated, including:
[0017] Calculate the first difference between each second scaling factor and each first scaling factor; calculate the second difference between the coordinates of the preset correction reference point and the coordinates of the preset scaling compensation reference center point; and calculate the correction distance value for each triangle vertex based on each first and second difference.
[0018] In an optional implementation, the method further includes: when there are multiple workpiece STL models to be compensated, returning to the step of obtaining the coordinate values of the preset scaling compensation reference center point of the workpiece STL model to be compensated, and iterating repeatedly to obtain the target workpiece STL model corresponding to each workpiece STL model to be compensated.
[0019] In an alternative implementation, the method further includes processing each target workpiece STL model using selective laser sintering (SLS).
[0020] Secondly, the present invention provides a size compensation and scaling device for a model, the device comprising:
[0021] The first acquisition module is used to acquire a preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each vertex of the triangular face in the forming space coordinate system. The preset size compensation function represents an arbitrary form of the first scaling factor in the coordinate direction of the corresponding coordinate axis at each vertex of the triangular face of the STL model of the workpiece to be compensated. The forming space coordinate system represents a Cartesian coordinate system established in the forming space determined by the forming chamber hardware used to form the workpiece in the forming equipment, with the origin of the coordinate system located at any point in the forming space. The second acquisition module is used to acquire the preset scaling of the STL model of the workpiece to be compensated. The system comprises the following modules: a compensation reference center point coordinate value; a scaling module, used to scale the STL model of the workpiece to be compensated based on each initial coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, to obtain the coordinate values of each triangle vertex after scaling; a calculation module, used to calculate the correction distance value of each triangle vertex based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, using a preset calculation method; and a determination module, used to determine the target workpiece STL model based on the scaled coordinate values of each triangle vertex and the correction distance value of each triangle vertex.
[0022] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the size compensation scaling method of the model described in the first aspect or any corresponding embodiment thereof.
[0023] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the size compensation scaling method of the model described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1A This is a top view of multiple STL workpieces at multiple positions within the molding space according to an embodiment of the present invention, and a workpiece STL with a large span on the y-axis and a small span on the z-axis, located far from the fixed scaling reference point;
[0026] Figure 1B This is a right view of multiple STL workpieces at multiple positions within the molding space according to an embodiment of the present invention, and a workpiece STL with a large span on the y-axis and a small span on the z-axis, located away from the fixed scaling reference point.
[0027] Figure 2 This is a right view of a workpiece STL file that has undergone significant deformation due to scaling the file using a nonlinear z-direction dimension compensation function based on a fixed scaling reference point, resulting in a large span in the y-axis coordinate direction and a small span in the z-axis direction, according to an embodiment of the present invention.
[0028] Figure 3 This is a flowchart illustrating the size compensation and scaling method for a model according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the minimum axis alignment bounding box according to an embodiment of the present invention;
[0030] Figure 5 This is a flowchart illustrating a size compensation scaling method for another model according to an embodiment of the present invention;
[0031] Figure 6 This is a flowchart illustrating another model size compensation and scaling method according to an embodiment of the present invention;
[0032] Figure 7 This is a flowchart illustrating a method for size compensation and scaling of a part data model according to an embodiment of the present invention.
[0033] Figure 8AThis is a top view of 46 workpieces stl being compensated and scaled within the molding space according to an embodiment of the present invention;
[0034] Figure 8B This is a right view of 46 workpieces stl with compensated scaling within the molding space according to an embodiment of the present invention;
[0035] Figure 9 This is a schematic diagram showing the midpoint of the center line of the vertical horizontal plane of the axis-aligned bounding box of the molding space geometry determined by the molding chamber hardware according to an embodiment of the present invention.
[0036] Figure 10 The above is a right view of the workpiece STL after deformation, based on the center point of its minimum axis aligned bounding box as the reference point, using a nonlinear z-direction size compensation function to scale and correct the STL file. The workpiece STL has a large span in the y-axis coordinate direction and a small span in the z-axis direction.
[0037] Figure 11 This is a structural block diagram of the size compensation and scaling device for a model according to an embodiment of the present invention;
[0038] Figure 12 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] During the entire selective laser sintering (SLS) process, the shrinkage differences of workpieces at different positions in the forming cylinder can lead to accuracy errors. To address this issue, the forming data processing software performs scaling calculations on the workpiece STL drawing before processing using a dimensional compensation function. Specifically, it calculates the scaling factor for a single coordinate axis based on the coordinate values of the triangle vertices in the forming space coordinate system and the dimensional compensation function. Then, it recalculates the coordinates of the triangle vertices based on a fixed scaling center and outputs the STL file. The scaled STL file is then used for processing to compensate for the dimensional errors caused by shrinkage differences. However, since the pressure and temperature of the workpieces at different positions in the forming cylinder vary, and the time spent in these environments also differs, the dimensional compensation function used is non-linear. Although this can effectively improve the dimensional accuracy of the workpiece, when scaling the workpiece STL model based on a fixed scaling center, the scaling factor calculated for a single coordinate axis varies greatly for individual workpieces that are far from the scaling center and have a small span in this coordinate axis but a large span in the other two coordinate axes. This results in significant deformation of the STL file after scaling, producing numerous step-like textures on the regular plane of the workpiece after processing, affecting the workpiece's appearance.
[0041] like Figure 1A and Figure 1B The images shown are the top and right views of multiple STL workpieces at multiple locations within the forming space, and a workpiece STL with a large span on the y-axis and a small span on the z-axis, located far from the fixed scaling reference point.
[0042] Furthermore, based on a fixed scaling reference point, after scaling the STL file using a nonlinear z-direction dimension compensation function, the actual dimensional errors of the measured distances for multiple STL workpieces at multiple locations within the forming space after machining are within the range of ±0.3mm, as shown in Table 1 below:
[0043] Table 1. Dimensional errors of various test distances at multiple locations within the forming space after scaling the STL file using a nonlinear z-direction dimensional compensation function based on a fixed scaling reference point.
[0044]
[0045]
[0046] Furthermore, scaling the STL file using a nonlinear z-direction dimension compensation function based on a fixed scaling reference point results in significant deformation of the workpiece STL with a large span in the y-axis coordinate direction and a small span in the z-axis direction. The corresponding right view is shown below. Figure 2 As shown.
[0047] Furthermore, scaling the STL file using a nonlinear z-direction dimension compensation function based on a fixed scaling reference point causes significant deformation of the workpiece STL with a large span in the y-axis and a small span in the z-axis, resulting in a large number of step-like textures after actual processing.
[0048] According to an embodiment of the present invention, a method for size compensation scaling of a model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0049] This embodiment provides a method for compensating for and scaling the size of a model. Figure 3 This is a flowchart of a model size compensation and scaling method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0050] Step S301: Obtain the preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each triangle vertex in the forming space coordinate system.
[0051] The preset size compensation function represents an arbitrary form of the first scaling factor in the direction of the corresponding coordinate axis at each vertex of the triangular face of the STL model of the workpiece to be compensated.
[0052] Furthermore, this preset size compensation function is obtained based on a fixed scaling center point.
[0053] The fixed scaling center point can be the scaling reference point selected when obtaining the size compensation function.
[0054] Preferably, the fixed scaling center point is located on the center line of the vertical horizontal plane of the bounding box of the molding space geometry determined by the molding chamber hardware.
[0055] Optimal, the fixed scaling center point is located at the midpoint of the center line of the vertical horizontal plane of the bounding box of the molding space geometry determined by the molding chamber hardware.
[0056] Furthermore, the preset correction reference point coordinate value represents the coordinate value of the preset correction reference point in the forming space coordinate system.
[0057] Furthermore, the correction reference coordinate points set in the calculation of the three coordinate axes can be different coordinate points.
[0058] Ideally, the correction reference point set in the calculation of the three coordinate axes is the same coordinate point.
[0059] Furthermore, when calculating the correction reference coordinate point in a single coordinate axis direction, the distance between the correction reference point in this coordinate axis direction and the fixed scaling center set by the size compensation function in this direction is ≤100mm.
[0060] Ideally, the correction reference coordinate point set during the single-axis direction correction calculation is the same as the fixed scaling center set when obtaining the size compensation function in this direction.
[0061] Furthermore, the forming space coordinate system refers to a Cartesian coordinate system established within the forming space defined by the forming chamber hardware used for forming the workpiece in the forming equipment, with the origin of the coordinate system located at any point within the forming space. Here, the forming space refers to the space within the forming equipment chamber used for forming the workpiece in selective laser sintering (SLS) technology.
[0062] Preferably, the origin of the coordinate system is located on the center line of the vertical horizontal plane of the bounding box of the molding space geometry determined by the molding chamber hardware.
[0063] Optimal, the origin of the coordinate system is located at the intersection of the center line of the vertical horizontal plane of the axis-aligned bounding box of the forming space geometry determined by the forming chamber hardware and the lowest horizontal plane of the space in the forming chamber used to form the workpiece.
[0064] Step S302: Obtain the coordinates of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated.
[0065] Specifically, the preset scaling compensation reference center point coordinates are the coordinates of the reference center point of a single workpiece STL model to be compensated for size scaling compensation in the forming space coordinate system.
[0066] The reference center point can be any point in the spatial forming coordinate system of the STL model of the workpiece to be compensated.
[0067] Preferably, the reference center point can be any point within the bounding box of the STL model of the workpiece to be compensated.
[0068] Optimally, the reference center point can be the center point of the bounding box of the STL model of the workpiece to be compensated.
[0069] The bounding box of the STL model of the workpiece to be compensated can be the smallest bounding box in the forming space that can enclose the STL model, or it can be the smallest axis-aligned bounding box in the forming space that can enclose the STL model, such as... Figure 4 As shown.
[0070] Step S303: Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each triangle vertex after scaling.
[0071] Specifically, by combining the coordinates of the preset scaling compensation reference center point and the preset size compensation function, the scaling of each initial coordinate value of the STL model of the workpiece to be compensated can be achieved, thereby obtaining the coordinate values of each scaled vertex of each triangle face.
[0072] Step S304: Based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, the correction distance value of each triangle vertex is calculated using a preset calculation method.
[0073] Specifically, based on the obtained initial coordinate values, the coordinate values of the preset scaling compensation reference center point, and the preset size compensation function, combined with the coordinate values of the preset correction reference point, the correction distance value of each triangle vertex can be calculated.
[0074] Step S305: Determine the target workpiece STL model based on the scaled coordinate values of each triangle vertex and the corrected distance value of each triangle vertex.
[0075] Specifically, the final coordinate values of each triangle vertex can be calculated using the following relationship (1), thereby determining the final target workpiece STL model:
[0076] c″=c′+D correct (1)
[0077] In the formula: c″ represents the final coordinate value of each triangle vertex along a single coordinate axis; c′ represents the coordinate value of each triangle vertex after conventional compensation along the corresponding coordinate axis direction, calculated according to the corresponding coordinate axis direction size compensation function, i.e., the scaled coordinate value of each triangle vertex; D correct This represents the corrected distance value of each triangle vertex in the corresponding coordinate axis direction.
[0078] The size compensation and scaling method for the model provided in this embodiment sets a separate scaling compensation reference center point when scaling the STL model of the workpiece to be compensated. Combined with a preset size compensation function and the initial coordinate values of each triangle vertex of the STL model in the forming space coordinate system, scaling of the STL model can be achieved. Furthermore, by combining the coordinate values of the preset correction reference point, the correction distance value of each triangle vertex can be calculated. Finally, based on the correction distance value, the coordinate values of each triangle vertex after compensation and scaling can be corrected to obtain the corrected target workpiece STL model. Therefore, by implementing this invention, the dimensional accuracy of all workpieces at all positions in the entire forming space is improved, while simultaneously improving the appearance of the STL model of the workpiece to be compensated.
[0079] This embodiment provides a method for compensating for and scaling the size of a model. Figure 5 This is a flowchart of a model size compensation and scaling method according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:
[0080] Step S501: Obtain the preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each triangular vertex in the forming space coordinate system. For details, please refer to [link to relevant documentation]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.
[0081] Step S502: Obtain the coordinates of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated. For details, please refer to [link to relevant documentation]. Figure 3 Step S302 of the illustrated embodiment will not be described again here.
[0082] Step S503: Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each triangle vertex after scaling.
[0083] Specifically, step S503 includes:
[0084] Step S5031: Calculate the first scaling factor for each triangle vertex based on each initial coordinate value and the preset size compensation function.
[0085] Specifically, the preset size compensation function is shown in the following relationship (2). By combining each initial coordinate value, the corresponding first scaling factor can be calculated:
[0086]
[0087] In the formula: x ori y ori , z ori This represents the initial coordinate values of the triangle vertices of the STL model of the workpiece to be compensated in the forming space coordinate system. This indicates that the initial coordinate value in the forming space coordinate system is x. ori y ori , z ori The scaling factor at the vertices of the triangle face of the STL model of the workpiece to be compensated, along the corresponding coordinate axis direction, is the first scaling factor; f(x ori ,y ori ,z ori ) represents the independent variable x ori y ori , z ori The functional relationship between the scaling factor and the scaling factor.
[0088] Step S5032: Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and each first scaling ratio coefficient, determine the coordinate value of each scaled vertex of the triangle face.
[0089] Specifically, by combining the calculated first scaling factor, the scaling of each initial coordinate value of the STL model of the workpiece to be compensated can be achieved, thereby obtaining the coordinate values of each scaled vertex of the triangle face.
[0090] In some optional implementations, step S5032 above includes:
[0091] Step a1: Based on each initial coordinate value and the coordinate value of the preset scaling compensation reference center point, calculate the distance between each triangle vertex and the preset scaling compensation reference center point.
[0092] Step a2: Based on each initial coordinate value, each first scaling factor, and the distance value, determine the coordinate values of each scaled vertex of the triangle face.
[0093] Specifically, the coordinate value c′ of each scaled triangle vertex is calculated using the following relation (3):
[0094]
[0095] In the formula: c orisbase This represents the coordinate values of the reference center point set in the corresponding coordinate axis direction when performing dimensional scaling compensation on the STL model of the workpiece to be compensated; that is, the coordinate values of the preset scaling compensation reference center point in the corresponding coordinate axis direction. ori This represents the coordinate values of the vertices of the triangle face of the STL model of the workpiece to be compensated in the corresponding coordinate axis direction, that is, the initial coordinate values in the corresponding coordinate axis direction; c ori -c orisbase This represents the distance between the vertex of the triangle and the center point of the preset scaling compensation reference in the corresponding coordinate axis direction.
[0096] Step S504: Based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, the correction distance value of each triangle vertex is calculated using a preset calculation method. For details, please refer to [link to relevant documentation]. Figure 3 Step S304 of the illustrated embodiment will not be described again here.
[0097] Step S505: Based on the scaled coordinates of each triangle vertex and the corrected distance value of each triangle vertex, determine the target workpiece STL model. See details below. Figure 3 Step S305 of the illustrated embodiment will not be described again here.
[0098] Step S506: When there are multiple STL models of workpieces to be compensated, return to the step of obtaining the coordinate values of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated, and iterate repeatedly to obtain the target workpiece STL model corresponding to each STL model of the workpiece to be compensated.
[0099] Specifically, when there are multiple STL models of workpieces to be compensated, repeating steps S602 to S606 can yield the target workpiece STL model corresponding to each STL model of workpieces to be compensated.
[0100] Step S507: Selective laser sintering (SLS) is used to process each target workpiece STL model.
[0101] Specifically, selective laser sintering (SLS) technology is used to process each target workpiece STL model, improving the dimensional accuracy of all workpieces at all locations in the entire forming space while also improving the appearance of the workpieces.
[0102] The size compensation and scaling method for the model provided in this embodiment first calculates a first scaling factor corresponding to the initial coordinate values of each triangular vertex of the workpiece STL model to be compensated in the forming space coordinate system based on a preset size compensation function. Further, the scaled coordinate values of each triangular vertex are calculated using this first scaling factor. Then, when performing size compensation and scaling on the workpiece STL model, a separate scaling compensation reference center point is set, and the scaling of the workpiece STL model is achieved by combining the obtained initial coordinate values of each triangular vertex. Further, the correction distance value of each triangular vertex is calculated by combining the coordinate values of a preset correction reference point. Finally, the coordinate values of each triangular vertex after compensation and scaling are corrected based on the correction distance value to obtain the corrected target workpiece STL model. Therefore, by implementing this invention, the dimensional accuracy of all workpieces at all positions in the entire forming space is improved, while the appearance of the workpiece STL model to be compensated is also improved.
[0103] This embodiment provides a method for compensating for and scaling the size of a model. Figure 6 This is a flowchart of a model size compensation and scaling method according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:
[0104] Step S601: Obtain the preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each triangular vertex in the forming space coordinate system. For details, please refer to [link to relevant documentation]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.
[0105] Step S602: Obtain the coordinates of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated. For details, please refer to [link to relevant documentation]. Figure 3 Step S302 of the illustrated embodiment will not be described again here.
[0106] Step S603: Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each scaled vertex of the triangle face. For details, please refer to [link to details]. Figure 5 Step S503 of the illustrated embodiment will not be described again here.
[0107] Step S604: Based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, the correction distance value of each triangle vertex is calculated using a preset calculation method.
[0108] Specifically, step S604 includes:
[0109] Step S6041: Calculate the first scaling factor for each triangle vertex based on each initial coordinate value and the preset size compensation function.
[0110] The specific calculation process is described in step S5031 above and will not be repeated here.
[0111] Step S6042: Based on each initial coordinate value and the coordinate value of the preset scaling compensation reference center point, calculate the coordinate value of the projection point corresponding to each triangle vertex.
[0112] Specifically, based on the initial coordinate values of each triangle vertex of the STL model of the workpiece to be compensated, the coordinates of the projection point of each triangle vertex on the plane perpendicular to the corresponding coordinate axis direction of the reference center point set when compensating the STL model of the workpiece to be compensated can be calculated, as shown in the following relationship (4):
[0113]
[0114] In the formula: (x ori ,y ori ,z ori ) project Indicates the coordinates of the projection point; x orisbase y orisbase z orisbase This represents the coordinate value of the reference center point set when compensating a single workpiece STL model, i.e., the preset correction reference point coordinate value.
[0115] Step S6043: Calculate the second scaling factor for each projection point coordinate value based on the coordinate values of each projection point and the preset size compensation function.
[0116] Specifically, the calculation of the second scaling factor is described in the above step S5031 using the first scaling factor calculated by formula (2), and will not be repeated here.
[0117] Step S6044: Calculate the correction distance value for each triangle vertex based on each first scaling factor, each second scaling factor, the preset correction reference point coordinate value, and the preset scaling compensation reference center point coordinate value.
[0118] Specifically, based on the known coordinates of the preset correction reference point and the preset scaling compensation reference center point, and combined with the obtained first scaling factor and second scaling factor, the correction distance value of each triangle vertex can be calculated.
[0119] In some optional implementations, step S6044 above includes:
[0120] Step b1: Calculate the first difference between each second scaling factor and each first scaling factor.
[0121] Step b2: Calculate the second difference between the preset correction reference point coordinates and the preset scaling compensation reference center point coordinates.
[0122] Step b3: Calculate the corrected distance value for each triangle vertex based on each first difference and second difference.
[0123] Specifically, the corrected distance value D of each triangle vertex is calculated using the following relation (5). correct :D correct =[f((x) ori ,y ori ,z ori ) project )-f(x ori ,y ori ,z ori )]*(c correct -c orisbase ) (5)
[0125] In the formula: f() represents the size compensation function relationship between the coordinate point of the independent variable and the scaling factor; f((x ori ,y ori ,z ori ) project ) represents the second scaling factor; f(x) ori ,y ori ,z ori ) represents the first scaling factor; c correctThis indicates the coordinate value of the set correction reference point in the corresponding coordinate axis direction, i.e., the coordinate value of the preset correction reference point in the corresponding coordinate axis direction; c orisbase This indicates the coordinate value of the reference center point set separately in the corresponding coordinate axis direction when compensating the STL model of the workpiece to be compensated, that is, the coordinate value of the preset scaling compensation reference center point in the corresponding coordinate axis direction.
[0126] Step S605: Based on the scaled coordinates of each triangle vertex and the corrected distance value of each triangle vertex, determine the target workpiece STL model. See details below. Figure 3 Step S305 of the illustrated embodiment will not be described again here.
[0127] The size compensation and scaling method for the model provided in this embodiment sets a separate scaling compensation reference center point when scaling the STL model of the workpiece to be compensated. Combined with a preset size compensation function and the initial coordinate values of each triangular face vertex of the STL model in the forming space coordinate system, scaling of the STL model can be achieved. Further, by calculating a first scaling factor for each triangular face vertex and a second scaling factor for each projection point coordinate value, and combining the preset correction reference point coordinate values and the preset scaling compensation reference center point coordinate values, the correction distance value for each triangular face vertex can be calculated. Finally, based on the correction distance value, the coordinate values of each triangular face vertex after compensation and scaling can be corrected to obtain the corrected target workpiece STL model. Therefore, by implementing this invention, the dimensional accuracy of all workpieces at all positions in the entire forming space is improved, while simultaneously improving the appearance of the STL model of the workpiece to be compensated.
[0128] In one instance, such as Figure 7 As shown, a method for dimensional compensation scaling of a part data model is provided, including:
[0129] Step 01: Read the initial coordinate values of all triangle face vertices in the shaping space coordinate system for the STL to be compensated and scaled;
[0130] Step 02: Read the size compensation function;
[0131] Step 03: Set the correction reference coordinate point;
[0132] Step 04: Set the reference center point for dimensional scaling compensation of a single workpiece;
[0133] Step 05: Scale each individual STL based on its individual reference center using a size compensation function;
[0134] Step 06: Calculate the corrected distance values for all vertices of a single STL triangle;
[0135] Step 07: Perform distance correction on the vertex coordinates of a single STL after scaling based on a separate reference center point according to the size compensation function, and re-output the STL;
[0136] Step 08: Repeat steps 04 to 07 to calculate all the STLs that will be compensated for scaling read in step 01, and process them using the final output STLs.
[0137] The method for size compensation scaling of part data models provided in this example sets a separate reference center point when performing size scaling compensation on a single workpiece, and calculates the difference between the size compensation position based on the separate reference center point of a single workpiece and the position based on a fixed scaling center point. Based on the difference, the distance of the compensated coordinate points is corrected, thereby improving the dimensional accuracy of all workpieces at all positions in the entire forming space while improving the appearance of the workpiece.
[0138] Furthermore, based on the method for dimensional compensation and scaling of the part data model provided in the above examples, a specific embodiment is provided, including:
[0139] Step 01: Read the initial coordinate values of all triangle vertices of the 46 scaled and compensated STLs in the forming space coordinate system. The dimensions of the bounding box of the forming space geometry, determined by the forming chamber hardware, are 350mm*350mm*430mm. The origin of the Cartesian coordinate system established in the forming space is located at the intersection of the center line of the vertical horizontal plane of the bounding box of the forming space geometry determined by the forming chamber hardware and the lowest horizontal plane of the space used by the forming chamber for forming the workpiece. Store the coordinate values of all triangle vertices of a single STL in a multi-row, 3-column array. The first column of the array is the initial x-coordinate of the triangle vertex, the second column is the initial y-coordinate of the triangle vertex, and the third column is the initial z-coordinate of the triangle vertex. The top and right views of the 46 scaled and compensated workpiece STLs in the forming space are shown below. Figure 8A and Figure 8B As shown.
[0140] Step 02: Read the z-axis dimension compensation function. The z-axis dimension compensation function is obtained based on the fixed scaling center point. The fixed scaling center is located at the midpoint of the center line of the vertical horizontal plane of the bounding box of the molding space geometry determined by the molding cabin hardware, with coordinates (0, 0, 215).
[0141] Among them, the midpoint of the center line of the vertical horizontal plane of the bounding box of the axis-aligned bounding box, as determined by the hardware of the molding chamber, is as follows: Figure 9 As shown.
[0142] Furthermore, the dimension compensation function in the z-axis direction is shown in the following equation (6):
[0143]
[0144] Step 03: Set the z-axis direction correction reference coordinate point to be the same as the fixed scaling center point coordinates used when obtaining the z-axis size compensation function, with coordinate values of (0, 0, 215).
[0145] Step 04: Calculate the center coordinates of the minimum axis-aligned bounding box of a single workpiece STL, which will serve as the reference center point for dimensional scaling compensation of the single workpiece.
[0146] Specifically, the maximum and minimum values of each column of the array of all triangle vertices of a single STL are calculated, and the average of the maximum and minimum values is the center coordinate value of the minimum axis-aligned bounding box.
[0147] Step 05: Calculate the distance from the coordinate position of each point on the triangular face of a single STL file in the forming space coordinate system to the center point of the minimum axis-aligned bounding box of the STL file in the z-axis direction. The product of the distance and the scaling factor calculated by the z-direction size compensation function of the corresponding point, plus the z-axis coordinate value of the center point of the minimum axis-aligned bounding box, is stored as the new vertex coordinate z-coordinate value in a multi-row, 1-column array. The calculation formula is shown in the following relation (7):
[0148]
[0149] In the formula: z′ represents the z-coordinate value of the triangle vertex in the STL file, calculated based on the center point of the bounding box aligned with the minimum axis of the STL file as the scaling center, and after compensation according to the z-coordinate axis dimension compensation function; z oribc This represents the coordinate value along the z-axis of the center point of the bounding box aligned with the minimum axis of the workpiece's stl.
[0150] Step 06: Calculate the coordinates of the projection point of each vertex of a single STL model onto the plane perpendicular to the z-axis direction, where the center point of the minimum axis-aligned bounding box of the STL model is located, as shown in the following relationship (8):
[0151] (x ori ,y ori ,z ori ) project =(x ori ,y ori ,z oribc (8)
[0152] In the formula: (x ori ,y ori ,z ori ) project Represents the vertex (x) ori ,y ori ,zori The coordinates of the projection point along the z-axis direction on the plane perpendicular to the z-axis direction, where the center point of the minimum axis-aligned bounding box of the STL model to which it belongs is located.
[0153] Furthermore, the scaling factor calculated by the z-size compensation function for the coordinates of the projected point is subtracted from the scaling factor calculated by the z-size compensation function for the original coordinates of the point to obtain the difference. The coordinates of the corrected reference point on the z-axis, 215, are subtracted from the coordinates of the center point of the minimum axis aligned bounding box of the STL model on the z-axis to obtain the difference. The two differences are multiplied to obtain the corrected distance value for scaling compensation of the point in the z-axis direction. The corrected value is saved in a multi-row, 1-column array. The calculation formula is shown in the following relational expression (9):
[0154]
[0155] In the formula: z oribc D represents the z-coordinate of the center point of the minimum axis-aligned bounding box in the STL model. correct This represents the calculated corrected distance value for a single vertex.
[0156] Step 07: For a single STL, take the center point of the bounding box with minimum axis alignment based on the STL model calculated in Step 05 as the reference point, and add the z-coordinate value of the triangle vertex after scaling according to the z-size compensation function to the corresponding z-coordinate value corrected distance value calculated in Step 06. Store the calculated corrected z-coordinate value in a multi-row, 1-column array. The calculation formula is shown in the following relational expression (10):
[0157] z″=z′+D correct (10)
[0158] In the formula: z″ represents the final output z-coordinate value of a single triangle vertex in the z-axis direction; z′ represents the compensated z-coordinate value of the triangle vertex in the z-coordinate direction after calculation according to the z-coordinate direction size compensation function; D correct This represents the corrected distance value of the vertex of the triangle in the z-coordinate direction.
[0159] Furthermore, the first and second columns of the array of all triangle vertex coordinates of a single STL file read in step 01 are recombined with the corrected z-coordinate values into a multi-row, 3-column array, which serves as the coordinates of all triangle vertices of a single STL file after compensation and distance correction, and the STL file is re-output.
[0160] Step 08: Repeat steps 04 to 07 to calculate all the STLs that will be compensated for scaling read in step 01, and process them using the final output STLs.
[0161] Through the above steps, based on the center point of its minimum axis-aligned bounding box as the reference point, and after scaling and correcting the STL file using a nonlinear z-direction dimension compensation function, the actual dimensional errors of each test distance for multiple STL workpieces at multiple locations within the forming space after processing are shown in Table 2 below:
[0162] Table 2. After scaling and correcting the STL file using a nonlinear z-direction dimensional compensation function, based on the center point of the bounding box of a single workpiece aligned to its minimum axis as the reference point, the dimensional errors of each test distance after actual machining of multiple STL workpieces at multiple locations within the forming space are shown in Table 2.
[0163]
[0164]
[0165] As shown in the table above, the error between the actual workpiece dimensions and the drawing dimensions for a total of 46 workpieces at multiple locations within the forming space remains within ±0.3mm.
[0166] Furthermore, the STL file for a single workpiece is scaled and corrected using a nonlinear z-direction dimension compensation function, with the center point of its minimum axis-aligned bounding box as the reference point. Workpieces with a large y-axis span and a small z-axis span exhibit smaller STL deformation. Figure 10 As shown.
[0167] Furthermore, the STL file for a single workpiece is scaled and corrected using a nonlinear z-direction dimension compensation function based on the center point of its own minimum axis-aligned bounding box. For workpieces with a large span in the y-axis coordinate direction and a small span in the z-axis direction, the STL deformation amplitude is small, resulting in improved surface quality after actual processing.
[0168] This embodiment also provides a model size compensation and scaling device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0169] This embodiment provides a model size compensation and scaling device, such as... Figure 11 As shown, it includes:
[0170] The first acquisition module 801 is used to acquire a preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each vertex of the triangular face in the forming space coordinate system. The preset size compensation function represents an arbitrary form of the first scaling factor in the direction of the corresponding coordinate axis at each vertex of the triangular face of the STL model of the workpiece to be compensated. The forming space coordinate system represents a Cartesian coordinate system established in the forming space determined by the forming chamber hardware used to form the workpiece in the forming equipment. The origin of the coordinate system is located at any point in the forming space.
[0171] The second acquisition module 802 is used to acquire the coordinate values of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated.
[0172] The scaling module 803 is used to scale the STL model of the workpiece to be compensated based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, so as to obtain the coordinate value of each triangle vertex after scaling.
[0173] The calculation module 804 is used to calculate the correction distance value of each triangle vertex based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, using a preset calculation method.
[0174] The determination module 805 is used to determine the target workpiece STL model based on the scaled coordinate values of each triangle vertex and the corrected distance value of each triangle vertex.
[0175] In some alternative implementations, the scaling module 803 includes:
[0176] The first calculation submodule is used to calculate the first scaling factor of each triangle vertex based on each initial coordinate value and a preset size compensation function.
[0177] The determination submodule is used to determine the coordinate values of each triangle vertex after scaling, based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and each first scaling ratio coefficient.
[0178] In some alternative implementations, determining the submodule includes:
[0179] The calculation unit is used to calculate the distance between each vertex of the triangle and the preset scaling compensation reference center point based on each initial coordinate value and the coordinate value of the preset scaling compensation reference center point.
[0180] A determining unit is used to determine the coordinate values of each scaled vertex of a triangle based on each initial coordinate value, each first scaling factor, and a distance value.
[0181] In some alternative implementations, the computing module 804 includes:
[0182] The second calculation submodule is used to calculate the first scaling factor of each triangle vertex based on each initial coordinate value and a preset size compensation function.
[0183] The third calculation submodule is used to calculate the projection point coordinates of each triangle vertex based on each initial coordinate value and the coordinates of the preset scaling compensation reference center point.
[0184] The fourth calculation submodule is used to calculate the second scaling factor for each projection point coordinate value based on the coordinate value of each projection point and the preset size compensation function.
[0185] The fifth calculation submodule is used to calculate the correction distance value of each triangle vertex based on each first scaling factor, each second scaling factor, the preset correction reference point coordinate value, and the preset scaling compensation reference center point coordinate value.
[0186] In some alternative implementations, the fifth computational submodule includes:
[0187] The first calculation unit is used to calculate the first difference between each second scaling factor and each first scaling factor.
[0188] The second calculation unit is used to calculate the second difference between the preset correction reference point coordinate value and the preset scaling compensation reference center point coordinate value.
[0189] The third calculation unit is used to calculate the corrected distance value for each vertex of the triangle face based on each first difference and second difference.
[0190] In some alternative embodiments, the device further includes:
[0191] The iteration module is used to return the steps of obtaining the coordinate values of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated when there are multiple STL models of the workpiece to be compensated. The steps are repeated to obtain the target workpiece STL model corresponding to each STL model of the workpiece to be compensated.
[0192] In some alternative embodiments, the device further includes:
[0193] The machining module is used to machine each target workpiece STL model using selective laser sintering (SLS) technology.
[0194] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0195] In this embodiment, the size compensation and scaling device of the model is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0196] This invention also provides a computer device having the above-described features. Figure 11 The model shown is equipped with a size compensation scaling device.
[0197] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 12 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 12 Take a processor 10 as an example.
[0198] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0199] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0200] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0201] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0202] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0203] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0204] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for size compensation scaling of a model, characterized in that, The method includes: The preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each vertex of the triangular face in the forming space coordinate system are obtained. The preset size compensation function represents any form of function whose output is the first scaling factor in the direction of the corresponding coordinate axis at each vertex of the triangular face of the STL model of the workpiece to be compensated. The forming space coordinate system represents a Cartesian coordinate system established in the forming space determined by the forming chamber hardware used to form the workpiece in the forming equipment. The origin of the coordinate system is located at any point in the forming space. Obtain the coordinates of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated; Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each triangle vertex after scaling. Based on each of the initial coordinate values, the preset correction reference point coordinate values, the preset scaling compensation reference center point coordinate values, and the preset size compensation function, the correction distance value of each triangle vertex is calculated using a preset calculation method. Based on the scaled coordinate values of each triangle vertex and the corrected distance value of each triangle vertex, the target workpiece STL model is determined; Specifically, based on each initial coordinate value, the preset correction reference point coordinate value, the preset scaling compensation reference center point coordinate value, and the preset size compensation function, a preset calculation method is used to calculate the correction distance value for each triangle vertex, including: Based on each initial coordinate value and the preset size compensation function, calculate a first scaling factor for each triangle vertex; based on each initial coordinate value and the preset scaling compensation reference center point coordinate value, calculate the projection point coordinate value corresponding to each triangle vertex; based on each projection point coordinate value and the preset size compensation function, calculate a second scaling factor for each projection point coordinate value; based on each first scaling factor, each second scaling factor, the preset correction reference point coordinate value, and the preset scaling compensation reference center point coordinate value, calculate the correction distance value for each triangle vertex. Based on each of the first scaling factor, each of the second scaling factor, the coordinates of the preset correction reference point, and the coordinates of the preset scaling compensation reference center point, the correction distance value of each triangle vertex is calculated, including: Calculate the first difference between each of the second scaling factor and each of the first scaling factors; calculate the second difference between the coordinates of the preset correction reference point and the coordinates of the center point of the preset scaling compensation reference point; and calculate the correction distance value for each vertex of the triangle based on each of the first and second differences.
2. The method according to claim 1, characterized in that, Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, the STL model of the workpiece to be compensated is scaled to obtain the coordinate values of each vertex of the scaled triangle, including: Based on each of the initial coordinate values and the preset size compensation function, calculate the first scaling factor for each triangle vertex; Based on each of the initial coordinate values, the coordinate values of the preset scaling compensation reference center point, and each of the first scaling ratio coefficients, the coordinate values of each triangle vertex after scaling are determined.
3. The method according to claim 2, characterized in that, Based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and each of the first scaling ratios, the coordinate values of each scaled vertex of the triangle are determined, including: Based on each of the initial coordinate values and the coordinate values of the preset scaling compensation reference center point, calculate the distance between each triangle vertex and the preset scaling compensation reference center point; Based on each of the initial coordinate values, each of the first scaling factors, and the distance value, the coordinate values of each scaled vertex of the triangle are determined.
4. The method according to claim 1, characterized in that, The method further includes: When there are multiple STL models of the workpiece to be compensated, the step of obtaining the coordinate values of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated is returned, and the process is repeated to obtain the target workpiece STL model corresponding to each STL model of the workpiece to be compensated.
5. The method according to claim 4, characterized in that, The method further includes: Each target workpiece STL model is processed using selective laser sintering (SLS).
6. A size compensation scaling device for a model, characterized in that, The device includes: The first acquisition module is used to acquire a preset size compensation function, the preset correction reference point coordinates of the STL model of the workpiece to be compensated, and the initial coordinates of each vertex of the triangular face in the forming space coordinate system. The preset size compensation function represents any form of function whose output is the first scaling factor in the direction of the corresponding coordinate axis at each vertex of the triangular face of the STL model of the workpiece to be compensated. The forming space coordinate system represents a Cartesian coordinate system established in the forming space determined by the forming chamber hardware used to form the workpiece in the forming equipment. The origin of the coordinate system is located at any point in the forming space. The second acquisition module is used to acquire the coordinate values of the preset scaling compensation reference center point of the STL model of the workpiece to be compensated; The scaling module is used to scale the STL model of the workpiece to be compensated based on each initial coordinate value, the coordinate value of the preset scaling compensation reference center point, and the preset size compensation function, so as to obtain the coordinate value of each triangle vertex after scaling. The calculation module is used to calculate the correction distance value of each triangle vertex based on each of the initial coordinate values, the preset correction reference point coordinate values, the preset scaling compensation reference center point coordinate values, and the preset size compensation function, using a preset calculation method. The determination module is used to determine the target workpiece STL model based on the coordinate values of each scaled vertex of the triangle and the corrected distance value of each vertex of the triangle; The calculation module includes: The second calculation submodule is used to calculate a first scaling factor for each triangle vertex based on each initial coordinate value and the preset size compensation function; the third calculation submodule is used to calculate the projection point coordinate value corresponding to each triangle vertex based on each initial coordinate value and the preset scaling compensation reference center point coordinate value; the fourth calculation submodule is used to calculate a second scaling factor for each projection point coordinate value based on each projection point coordinate value and the preset size compensation function; the fifth calculation submodule is used to calculate the correction distance value for each triangle vertex based on each first scaling factor, each second scaling factor, the preset correction reference point coordinate value, and the preset scaling compensation reference center point coordinate value. The fifth calculation submodule includes: The first calculation unit is used to calculate a first difference between each of the second scaling factor and each of the first scaling factor; the second calculation unit is used to calculate a second difference between the coordinate value of the preset correction reference point and the coordinate value of the center point of the preset scaling compensation reference point; the third calculation unit is used to calculate the correction distance value of each triangle vertex based on each of the first difference and the second difference.
7. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the size compensation scaling method of the model according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the size compensation scaling method of the model according to any one of claims 1 to 5.
Citation Information
Patent Citations
Compensating for shrinking of objects in 3D printing
CN110446609A
STL model penetration error comprehensive compensation method in 3DP process
CN112036041A