A Method and System for Calculating Physical Properties of 3D CAD Models Based on Adaptive Gaussian Integrals

By optimizing the calculation of physical properties of 3D CAD models using adaptive Gaussian integrals and big heap data structures, the problems of inaccurate error judgment and low computational efficiency in existing technologies are solved, and efficient and accurate physical property calculations are achieved.

CN118862487BActive Publication Date: 2025-11-14ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410972212.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-11-14
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

In the calculation of physical properties of 3D CAD models, the existing numerical integration method suffers from inaccurate error judgment, low computational efficiency, and serious redundant calculations, making it difficult to accurately calculate the physical properties of complex surfaces.

Method used

An adaptive Gaussian integration method is adopted, which combines axial parallel bounding boxes and max-heap data structures. The error is judged by the difference between the Gaussian integration results before and after subdivision, and the integration directions and lower bounds of the inner and outer layers are optimized to reduce the number of calculations and improve computational efficiency.

Benefits of technology

It achieves more accurate physical property calculation results, reduces computational redundancy, improves computational efficiency, and controls the error within 1e-12, meeting the accuracy requirements of CAE and CAM.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862487B_ABST
    Figure CN118862487B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for calculating the physical properties of a 3D CAD model based on adaptive Gaussian integrals, belonging to the field of computer-aided geometric design. The method involves inputting a solid model and calculating the axially parallel bounding box of the surface parameter domain for each surface of the solid model. Based on the axially parallel bounding box, the integration direction and lower bound of the inner integral for each pair of surface parameter curves are set. A coarse moment estimate is calculated for each pair of surface parameter curves based on the Gaussian quadrature formula, resulting in a coarse moment estimate of the solid model. Adaptive Gaussian integration is performed on the pair of surface parameter curves to obtain the adaptive Gaussian quadrature result for each pair. The adaptive Gaussian quadrature results for all pairs of surface parameter curves are summed to obtain the moment calculation result of the solid model. Finally, the physical property calculation result is obtained by converting the moment calculation result into a physical property calculation formula. This invention achieves an accurate and efficient method for calculating physical properties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer-aided geometric design, specifically relating to a method and system for calculating the physical properties of a three-dimensional CAD model based on adaptive Gaussian integral. Background Technology

[0002] Physical property calculation is a crucial function in 3D CAD (Computer-Aided Design) geometric modeling engines. It primarily studies how to accurately calculate the inherent physical properties of solid models, including volume, mass, center of mass, and inertia tensor. Accurate physical property calculation results provide essential auxiliary information for CAD. In CAE (Computer-Aided Engineering) physics-based simulations, accurate physical property calculation results are fundamental to correct simulation. Furthermore, CAM (Computer-Aided Manufacturing) analysis also relies on precise assessments of the solid's volume, mass, center of mass, and inertia tensor.

[0003] Solid models can be represented in various ways, and most mainstream 3D geometry modeling engines currently use boundary representation to express solid models. For solid models represented using boundary representation, numerical integration is generally used. Specifically, property calculation involves moment calculation. In physics, a moment represents the product of distance and a physical quantity. A moment usually requires a reference point to define the distance. If the reference point represents mass, the zeroth moment is the total mass, the first-order origin moment is the center of mass, and the second-order origin moment is the moment of inertia. The reference point for moments mentioned later is always mass. Essentially, it can be viewed as a volume integral over a subspace of 3D Euclidean space, i.e., a triple integral. For example, the zeroth moment is the volume integral of density, the first moment is the volume integral of 3D coordinate components multiplied by density, and the second moment is the volume integral of pairwise combinations of 3D coordinate components multiplied by density. In the process of property calculation based on numerical integration, density can be omitted and multiplied in the subsequent moment calculation results when converting to property calculation results. According to the divergence theorem, volume integrals can be transformed into surface integrals. Surface integrals can also be transformed into bivariate integrals over the surface parameter domain. If the parameter domain of the surface is a regular rectangle, then binary numerical integration can be used directly. However, the parameter domain of surfaces in solid models is often clipped, and generally cannot be directly calculated using binary numerical integration. It is necessary to use Green's theorem to transform it into an integral over the boundary curve of the parameter domain, where the integral term is the integral over a straight line in one parameter direction of the surface parameter domain. This allows us to first apply numerical integration to the outer integral to obtain the required integration points and weights. Using these integration points, the parameters of the inner integral can be calculated. Then, applying numerical integration to the inner integral yields the complete numerical integration result; essentially, the outer integral is an integration of the inner integral.

[0004] In methods for calculating physical properties using numerical integration, solid models often use free-form curves and surfaces as boundaries, leading to complex parameter regions and integration terms. The function to be integrated may contain multiple singularities and peaks. Therefore, adaptive numerical integration is needed to adaptively identify and subdivide the integration region near singularities or peaks. In the open-source 3D modeling engine Open CASCADE, the Gauss-Kronrod integration method is used for numerical integration. For error analysis, the difference between the Gauss-Kronrod integration result and the Gauss point integration result is used as the absolute error, divided by the integration result to obtain the relative error. Adaptive integration is performed for each integral term corresponding to each moment. In each iteration, a sub-interval with the largest relative error is found from the subdivision list. If this largest relative error is less than a set error limit, the iteration terminates; otherwise, it is divided into two smaller sub-intervals, and the integration results and errors for each sub-interval are calculated separately. This iterative subdivision continues until the set number of subdivisions is reached or the error limit is met.

[0005] Current methods for calculating physical properties using numerical integration typically use the difference between the Kronrod extension and the Gaussian integral, or the difference between higher-order and lower-order numerical integrals, as the basis for the next subdivision. However, this method often fails to accurately reflect the quality of the subdivided region. Secondly, using a subdivision list as the data structure results in significant time spent searching for the next subdivision region, especially when the subdivision list contains many elements. Common methods generally fix the lower bound of the inner integral as the lower bound of the surface parameters. If the actual parameter curves enclose a small boundary while the surface parameter boundary is large, this leads to a large amount of redundant computation. Furthermore, known methods fix the integration directions of the outer and inner integrals. The quality of the outer adaptive integral depends on the correctness of the inner integral; therefore, a longer inner integral direction can affect the accuracy of the inner integral and thus the outer adaptive integral. Performing an adaptive integration process for each integral term also introduces computational redundancy and reduces efficiency. Summary of the Invention

[0006] To address the problems in the existing technology, this invention proposes a method and system for calculating the physical properties of three-dimensional CAD models based on adaptive Gaussian integrals.

[0007] The technical solution adopted in this invention is as follows:

[0008] In a first aspect, the present invention discloses a method for calculating the physical properties of a three-dimensional CAD model based on adaptive Gaussian integral, comprising the following steps:

[0009] 1) Input the solid model in 3D CAD and calculate the axial parallel bounding box of the surface parameter domain of each surface of the solid model. Then, set the integration direction and lower bound of the inner integral of each pair of surface parameter curves according to the axial parallel bounding box.

[0010] 2) Calculate the rough moment estimate of each surface parameter curve pair based on the Gaussian quadrature formula, and obtain the rough moment estimate of the solid model;

[0011] 3) Based on the results of steps 1) and 2), perform adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian integration result for each surface parameter curve pair;

[0012] 4) Accumulate the adaptive Gaussian quadrature results of all surface parameter curve pairs to obtain the moment calculation results of the solid model, and then obtain the physical property calculation results by converting the moment calculation results into the formula for physical property calculation results.

[0013] Further, step 1) specifically includes:

[0014] 1.1) Input a three-dimensional CAD solid model, which includes multiple parametric curves and multiple surfaces. For each surface, calculate and merge the axial parallel bounding boxes of all parametric curves in its parameter domain, and use the merged result as the axial parallel bounding box of the parameter domain of the surface.

[0015] 1.2) Set the direction of the axial parallel bounding box of the surface parameter domain of a surface with the smaller width as the direction of integration of the inner integral of all surface parameter curve pairs of the surface;

[0016] 1.3) Set the parameter value at the midpoint of the axial parallel bounding box of the surface parameter domain of a surface as the lower bound of the inner integral of all surface parameter curve pairs of the surface.

[0017] Further, step 2) specifically includes:

[0018] 2.1) For each surface parametric curve pair, set different Gaussian quadrature orders for different types of parametric curves and surfaces, and then use the Gaussian quadrature formula to calculate a rough moment estimate for each surface parametric curve pair.

[0019] 2.2) The coarse moment estimates of all surface parameter curve pairs are summed to obtain the coarse moment estimate of the solid model; the coarse moment estimate of the solid model is expressed as: in, It is the zeroth moment; For a first-order moment, The x-coordinate is the volume integral of the solid model. The volume integral of the y-coordinate on the solid model. The z-coordinate is the volume integral of the solid model; It is a second moment. Let x be the volume integral of the square of the x-coordinate on the solid model. Let y be the volume integral of the square of the y-coordinate on the solid model. Let z be the volume integral of the square of the z-coordinate on the solid model. This is the volume integral of the product of the x and y coordinates onto the solid model. This is the volume integral of the product of the x and z coordinates on the solid model. It is the volume integral of the product of the y-coordinate and the z-coordinate on the solid model.

[0020] Secondly, the present invention discloses a three-dimensional CAD model property calculation system for implementing the method, comprising:

[0021] The module for obtaining the integration direction and lower bound calculates the axial parallel bounding box of the surface parameter domain of each surface of the entity model based on the input entity model, and sets the integration direction and integration lower bound of the inner integral of each surface parameter curve pair according to the axial parallel bounding box.

[0022] The coarse moment estimation module calculates a coarse moment estimate for each pair of surface parameter curves based on the Gaussian quadrature formula, and obtains a coarse moment estimate for the solid model.

[0023] The adaptive Gaussian quadrature result calculation module performs adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian quadrature result for each surface parameter curve pair.

[0024] The physical property calculation result acquisition module accumulates the adaptive Gaussian quadrature results of all surface parameter curve pairs to obtain the moment calculation results of the solid model, and then obtains the physical property calculation results by converting the moment calculation results into physical property calculation result formulas.

[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0026] This invention, based on numerical integration and adaptive Gaussian integration in physical property calculations, uses the difference between the Gaussian quadrature results of the ten integral terms of moments before and after subdivision, divided by the largest term in the coarse moment estimate obtained from direct Gaussian quadrature based on the solid model, as the relative error term. This allows for more accurate selection of subdivided sub-regions, and only one adaptive step is needed to obtain the adaptive Gaussian quadrature results corresponding to the ten integral terms of moments. Using a max-heap-based data structure, the adaptive integral term with the largest relative error can be quickly found. Furthermore, the method based on the bounding box of the surface parameter domain yields more accurate inner-layer integration results, leading to better adaptive sub-region partitioning results for the outer-layer integration sub-regions. Attached Figure Description

[0027] Figure 1 This is a flowchart of a method for calculating the physical properties of a 3D CAD model based on adaptive Gaussian integral. Detailed Implementation

[0028] The present invention will be further described and illustrated below with reference to specific embodiments. The embodiments described are merely examples of the content of this disclosure and do not limit the scope of the invention. The technical features of each embodiment in the present invention can be combined accordingly, provided that there is no mutual conflict.

[0029] This invention addresses the shortcomings of existing technologies by providing a method for calculating the physical properties of 3D CAD models based on adaptive Gaussian integration. This method combines numerical integration with adaptive integration in physical property calculation, proposing a more accurate approach to determine which sub-region to subdivide. It also uses a max-heap as the data structure to quickly find the sub-region with the largest error. Furthermore, it performs adaptive integration only once for the ten integral terms of moments (including one integral term of the zeroth moment, three integral terms of the first moment, and six integral terms of the second moment), reducing the number of calculations. In addition, to set a more reasonable relative error limit and obtain more accurate inner-layer integration results, this invention proposes an integration parameter setting method based on an axially parallel bounding box.

[0030] like Figure 1 As shown, the method for calculating the physical properties of a 3D CAD model based on adaptive Gaussian integral, implemented in this invention, includes the following steps:

[0031] 1) Input entity model R, which contains n parametric curves c i (t) and m surfaces s j (u,v), with density ρ; where c i (t) is the i-th parameter curve with parameter t, i∈(1,n); s j (u,v) is the surface with parameter (u,v) of the jth type, j∈(1,m).

[0032] Calculate the axially parallel bounding box of each surface parameter domain, and set the integration direction and lower bound of the inner integral of the surface parameter curve pairs based on the axially parallel bounding box. The upper bound of the inner integral of each surface parameter curve pair is known. A surface has a unique axially parallel bounding box of its surface parameter domain, and a surface has multiple surface parameter curve pairs. Therefore, the parameter direction with the smaller width of the axially parallel bounding box of a surface's surface parameter domain is set as the integration direction of the inner integral of all surface parameter curve pairs of that surface. The parameter value at the midpoint of the axially parallel bounding box of a surface's surface parameter domain is set as the lower bound of the inner integral of all surface parameter curve pairs of that surface. This includes the following sub-steps:

[0033] 1.1) Calculate s for each surface j Each parameter curve c of (u,v) i (t) axial parallel bounding box ij The parametric curve c is represented by the points at the lower left and upper right corners of the axially parallel bounding box. i (t) axial parallel bounding box in, Let be the value of the minimum coordinate point in the u direction of the axial parallel bounding box of the i-th parametric curve of the j-th surface; Let v be the value of the minimum coordinate point of the axial parallel bounding box of the i-th parametric curve of the j-th surface in the v direction; Let be the value of the maximum coordinate point of the axial parallel bounding box of the i-th parametric curve of the j-th surface in the u direction; Let v be the value of the maximum coordinate point of the axial parallel bounding box of the i-th parametric curve of the j-th surface in the v direction.

[0034] Merging the axially parallel bounding boxes of all parametric curves of a surface yields the axially parallel bounding box of the surface's parametric domain. j The point at the lower left corner of the axial parallel bounding box of the surface parameter domain is in, The minimum coordinates of the axial parallel bounding box of the surface parameter domain of the j-th surface are in the u-direction. Let be the minimum coordinates of the axially bounding box of the surface parameter domain of the j-th surface in the v direction; the point at the upper right corner of the axially bounding box of the surface parameter domain is . in, Let be the value of the maximum coordinate point of the axial parallel bounding box of the surface parameter domain of the j-th surface in the u direction; Let v be the maximum coordinate of the axial parallel bounding box of the surface parameter domain of the j-th surface in the v direction.

[0035] Then the axial parallel bounding box of the surface parameter domain of the j-th surface can be represented as: The width of the axial parallel bounding box of the surface parameter domain in the u-parameter direction is The width of the axial parallel bounding box of the surface parameter domain in the v-parameter direction is The coordinates of the midpoint of the axially parallel bounding box of the surface parameter domain are

[0036] 1.2) Set the parameter direction argmin with a smaller width of the axial parallel bounding box of the surface parameter domain. u,v (w u ,w v The integration direction d is the inner integral of the surface parameter curve pair.

[0037] 1.3) Set the parameter value at the midpoint of the narrower parameter direction within the axial parallel bounding box of the surface parameter domain to the lower bound C of the inner integral of the surface parameter curve pair, i.e., C = d. mid Assuming the direction of the smaller width parameter is v, then

[0038] 2) Calculate the coarse moment estimate of the entity model R. Including zeroth moment Represents the volume integral of 1 on the solid model; first moment The volume integral of the x-coordinate on the solid model; The volume integral of the y-coordinate on the solid model; The volume integral of the z-coordinate on the solid model; second moment The volume integral of the square of the x-coordinate on the solid model; The volume integral of the square of the y-coordinate on the solid model; The volume integral of the square of the z-coordinate on the solid model; The volume integral of the product of the x and y coordinates on the solid model; This is the volume integral of the product of the x and z coordinates on the solid model; It is the volume integral of the product of the y-coordinate and the z-coordinate on the solid model.

[0039] Includes the following sub-steps:

[0040] 2.1) For each surface parametric curve pair cs ij =(c i (t), s j (u,v)), set the Gaussian integral order m of the corresponding outer integral. q The order n of the Gaussian integral of the inner integral q If the parameter curve c i If (t) is a simple curve such as a straight line or a circle, then m q =3; if the parameter curve c i If (t) is a B-spline curve or a NURBS curve, then Here This represents a B-spline curve or NURBS curve. i The order of (t). If the surface s j If (u,v) is a simple curved surface such as a plane or a sphere, then n q =9; if surface s j If (u,v) is a B-spline surface or a NURBS surface, then n q= α × β, where α and β represent B-spline surface or NURBS surface s, respectively. j (u,v) represents the order in the u-parameter direction and the v-parameter direction.

[0041] Applying the divergence theorem, the general volume integral ∫∫∫f(x,y,z)dV can be transformed into a surface integral, i.e. Here, f(x,y,z) represents the integral term in the three-dimensional coordinate representation of the volume integral, and is used as the initial integral term; Let this represent the unit normal vector of the surface. Then, transform the surface integral into an integral over the surface parameter domain. Here, n represents the normal vector of the surface. Let f(u,v)·n = g(u,v), then the integral over the surface parameter domain can be transformed into the following form using Green's theorem. g(u(t),s) represents the integral term represented by the parameter; the integration range [t0,t1] is the parameter range of the parameter curve of parameter t; u(t) represents the u-direction parameter corresponding to parameter t; v(t) represents the v-direction parameter corresponding to parameter t.

[0042] For each surface parameter curve pair cs ij =(c i (t), s j (u,v) is transformed into a numerical integral approximation using the Gaussian quadrature formula.

[0043] denoted as I(m) q ,n q ,cs,t0,t1,C,f(x,y,z)) ij Among them, here and Let t represent the set of Gaussian points and the set of weights of the one-dimensional Gaussian quadrature formula for the outer integral, respectively. μ The Gaussian point (i.e., t) is the formula for the one-dimensional Gaussian quadrature of the outer integral. μ (The Gaussian point corresponding to the current inner integral in the set of Gaussian points of the outer integral); m q ω is the order of the one-dimensional Gaussian quadrature formula for the outer integral; μ is the number of terms in the outer Gaussian quadrature formula; μ The weights (i.e., ω) of the one-dimensional Gaussian quadrature formula for the outer integral. μ (The Gaussian quadrature weights corresponding to the current inner integral in the set of Gaussian quadrature weights for the outer integral); n q The order of the one-dimensional Gaussian quadrature formula for the inner integral; w σ σ represents the weights of the one-dimensional Gaussian quadrature formula for the inner integral; σ is the number of terms in the inner integral; g(u(t) μ ),sσ ) represents the transformed integral term; s σ The Gaussian point for the one-dimensional Gaussian quadrature formula of the inner integral; and Let w' represent the set of Gaussian points and the set of weights of the one-dimensional Gaussian quadrature formula for the inner integral, respectively; μ,σ The median value.

[0044] Therefore, the calculation of a rough moment estimate involves replacing the initial integral term f(x,y,z) with the corresponding initial integral term of the moment, such as a term of the second moment. Its initial integration term is then replaced as follows: f(x,y,z) = xz, and f(x,y,z) can have many choices, such as...

[0045] 2.2) Based on the method in step 2.1), calculate the coarse moment estimate of each surface parameter curve pair, and then add the coarse moment estimates of all surface parameter curve pairs to obtain the coarse moment estimate of the solid model.

[0046] 3) Based on the results of steps 1) and 2), perform adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian integration result for each surface parameter curve pair;

[0047] In a specific embodiment of the present invention, the process of adaptive Gaussian integration is as follows:

[0048] For each surface parameter curve pair cs ij =(c i (t), s j Execute (u,v) respectively:

[0049] 3.1) Construct the first adaptive term E1, which includes the following steps:

[0050] a. Calculate the complete parameter range [t] 0 ,t 1 The Gaussian quadrature of the outer integrals corresponding to the ten integral terms of the moments is used to obtain the Gaussian quadrature result M before subdivision. 0 .

[0051] b. Calculate the two sub-regions [t] l ,t m ] and [t m ,t r The Gaussian quadrature result of the outer integral, where t l =t 0 , t r =t 1 The Gaussian quadrature results of the two sub-regions are obtained. Adding them together yields the subdivided Gaussian quadrature result.

[0052] c. Based on the Gaussian quadrature results before and after subdivision, obtain the absolute error vector ΔM for this subdivision. a =M 1 -M 0 Divide by the coarse moment estimate M of the entity model obtained in step 2). R This yields the subdivided relative error vector. Select the term with the largest absolute value and use the absolute value of the term with the largest absolute value as the error term ΔM of the adaptive term.

[0053] d. Construct the first adaptive term The subdivisions are then placed into a max-heap, which is sorted by the error term ΔM as the comparison element, and the subdivision count C is initialized. div =1.

[0054] 3.2) Extract the adaptive term E at the top of the max-heap. top Adaptive terms Two sub-regions are obtained, among which, For the adaptive term E top The Gaussian quadrature result of the left subregion, For the adaptive term E top Gaussian quadrature result of the right subregion; ΔM top For the adaptive term E top The relative error term; For the adaptive term E top The parameter value of the left boundary of the integration region; For the adaptive term E top The parameter value at the middle position of the integration region; For the adaptive term E top The parameter values ​​of the right boundary of the integration region; for each of the two sub-regions. and Following the method in step 3.1), two subdivided adaptive terms can be obtained.

[0055] Determine their respective error terms Is it greater than the preset upper limit of relative error ΔM? tol If the value is greater than the maximum, add it to the max-heap; otherwise, update the current surface parameter curve pair cs. ij Adaptive Gaussian quadrature results M at the initial moment ij =0;

[0056] in, For the adaptive term Etop The Gaussian quadrature result of the left half of the subdivided left subregion; For the adaptive term E top The Gaussian quadrature result of the right half of the subdivided left subregion; For the adaptive term E top The relative error term of the left sub-region; For the adaptive term E top The left boundary parameter value of the integration region of the left subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the left subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the left subregion; For the adaptive term E top The Gaussian quadrature result of the left half of the right subregion after subdivision; For the adaptive term E top The Gaussian quadrature result of the right half of the right subregion after subdivision; For the adaptive term E top The relative error term of the right subregion; For the adaptive term E top The left boundary parameter value of the integration region of the right subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the right subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the right subregion.

[0057] 3.3) Update the subdivided number C' div =C div +2, if C' at this time div >C tol Or the max-heap is empty, C tol If the maximum number of subdivisions is set, end the adaptive iteration; otherwise, jump to step 3.2) to continue the adaptive iteration.

[0058] 3.4) If the number of adaptive terms in the max-heap is k, and k > 0, then add all adaptive terms... Remove from the max heap and update the current surface parameter curve pair cs. ij Adaptive Gaussian quadrature results Among them, E δ Let δ be the number of adaptive terms.

[0059] The above sub-steps only apply to the outer integral. For Gaussian quadrature in the outer integral, the corresponding inner integral result needs to be calculated. The adaptive process of the inner integral is the same as the sub-steps of the outer integral, except that the integration domain is a parameter direction of the defined surface parameter domain.

[0060] Therefore, the Gaussian quadrature of the outer integral in the above sub-steps is calculated in the following way:

[0061] The Gaussian quadrature of the outer integral, when the outer Gaussian quadrature points are determined, can be expressed as: For the Gaussian quadrature formula with parameters in the range [v0, v1] and inner integral, it can be written as: At this time ω μ and t μ It is known. An adaptive approach is used to segment the inner integral, and Gaussian quadrature is performed on each segment. Where c div This indicates the number of subdivisions in the inner integral, with each segment having a parameter range of [v]. k ,v k+1 ], k represents the segment number, and its adaptive process is as follows:

[0062] 3.1.1) Construct the first adaptive term e1, which includes the following steps:

[0063] 1a) Calculate the complete parameter range [v] 0 ,v 1 Gaussian quadrature results of the inner integrals corresponding to the ten integral terms of the moments under given conditions. The Gaussian quadrature result m of the inner integral before subdivision is obtained. 0 .

[0064] 1b) Calculate the two subregions [v l ,v m ] and [v m ,v r The Gaussian quadrature result of the inner integral of ], where v l =v 0 , t r =t 1 The Gaussian quadrature results of the inner integrals of the two subdivided subregions are obtained. Adding them together yields the Gaussian quadrature result of the inner integral after subdivision.

[0065] 1c) Based on the Gaussian quadrature results of the inner integrals before and after subdivision, obtain the absolute error vector Δm of this subdivision. a =m 1 -m 0 Divide by the coarse moment estimate M obtained in step 2). R Divide by Get m R The relative error vector for this subdivision is calculated using the error scaling factor for the inner integral. From the relative error vector Δm r Select the term with the largest absolute value, and use the absolute value of the term with the largest absolute value as the error term Δm of the adaptive term;

[0066] 1d) Construct the first adaptive term The data is then placed into a max-heap, which is sorted by the error term Δm as the comparison element. The subdivision count c is initialized. div =1.

[0067] 3.1.2) Extract the adaptive term e at the top of the max-heap. top Adaptive terms Two sub-regions are obtained, among which, For the adaptive term e top The Gaussian quadrature result of the left subregion, For the adaptive term e top The Gaussian quadrature result of the right subregion; Δm top For the adaptive term e top The relative error term; For the adaptive term e top The parameter value of the left boundary of the integration region; For the adaptive term e top The parameter value at the middle position of the integration region; For the adaptive term e top The parameter values ​​of the right boundary of the integration region; for each of the two sub-regions. and The two subdivided adaptive terms can be obtained using the method in 3.1.1).

[0068] Determine their respective error terms Is it greater than the preset upper limit of relative error Δm? tol If the result is greater than the given value, it is added to a max-heap; otherwise, the adaptive Gaussian quadrature result of the current inner integral is updated. m at the initial moment ij =0;

[0069] in, For the adaptive term w top The Gaussian quadrature result of the left half of the subdivided left subregion; For the adaptive term e top The Gaussian quadrature result of the right half of the subdivided left subregion; For the adaptive term f top The relative error term of the left sub-region; For the adaptive term e top The left boundary parameter value of the integration region of the left subregion; For the adaptive term e top The parameter value at the middle position of the integration region of the left subregion; For the adaptive term e top The parameter value of the right boundary of the integration region of the left subregion; For the adaptive term e top The Gaussian quadrature result of the left half of the right subregion after subdivision; For the adaptive term e top The Gaussian quadrature result of the right half of the right subregion after subdivision; For the adaptive term e top The relative error term in the right region; For the adaptive term e top The left boundary parameter value of the integration region of the right subregion; For the adaptive term e top The parameter value at the middle position of the integration region of the right subregion; For the adaptive term e top The parameter value of the right boundary of the integration region of the right subregion.

[0070] 3.1.3) Update the subdivided count c' div =c div +2, if c' at this time div >c tol Or the max-heap is empty, c tol If the maximum number of subdivisions is set, end the adaptive iteration; otherwise, jump to step 3.1.2) to continue the adaptive iteration.

[0071] 3.1.4) If the number of adaptive terms in the max-heap is K, and K > 0, then add all adaptive terms... Remove from the max-heap and simultaneously update the adaptive Gaussian quadrature result of the current inner integral. Among them, e θ Let θ be the adaptive term of the inner integral adaptive method, and θ be the number of adaptive terms of the inner integral adaptive method.

[0072] 4) Pair the parametric curves of each surface with cs ij The calculated adaptive Gaussian quadrature result By summing the results, we obtain the final moment calculation results for the solid model. Finally, based on the formula for converting the moment calculation results into the physical property calculation results, the volume, center of mass, mass, and inertia tensors are obtained, which can be done as follows:

[0073] (1) Calculate the volume

[0074] (2) Calculate the mass M = Vρ;

[0075] (3) Calculate the centroid Among them, C x Let C be the x-axis coordinate of the centroid. y Let C be the y-coordinate of the centroid. z The z-axis coordinate of the centroid;

[0076] (4) Calculate the second moment relative to the centroid:

[0077]

[0078] Calculate the inertia tensor

[0079] Among them, I xx I yy and I zz I is the moment of inertia. yx I zx I xy I zy I xz and I yz It is the inertial product.

[0080] This invention obtains a more reasonable relative error term by dividing the difference between the Gaussian quadrature results of the ten integral terms of the moments before and after subdivision by the coarse moment estimate obtained from direct Gaussian quadrature, through coarse moment estimation of the moments using a solid model and a bounding box based on the surface parameter domain. Furthermore, it obtains better inner-layer integration directions and lower bounds, leading to superior outer-layer adaptive sub-region partitioning results. In addition, based on a max-heap data structure, the adaptive term for the next iteration of subdivision can be quickly found. Simultaneously, the Gaussian quadrature results corresponding to the ten integral terms of the moments can be calculated at once, without needing to perform adaptive integration for each integral term to obtain accurate results. Table 1 shows C. tol =c tol =128; ΔM tol =1e -8 ;ΔM tol =1e -9 The experimental results all showed errors less than 1e. -12 This demonstrates the accuracy of the physical property calculation results of the present invention.

[0081] Table 1

[0082]

[0083] This embodiment also provides a three-dimensional CAD model property calculation system based on adaptive Gaussian integral, including:

[0084] The module for obtaining the integration direction and lower bound calculates the axial parallel bounding box of the surface parameter domain of each surface of the entity model based on the input entity model, and sets the integration direction and integration lower bound of the inner integral of each surface parameter curve pair according to the axial bounding box.

[0085] The coarse moment estimation module calculates a coarse moment estimate for each pair of surface parameter curves based on the Gaussian quadrature formula, and obtains a coarse moment estimate for the solid model.

[0086] The adaptive Gaussian quadrature result calculation module performs adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian quadrature result for each surface parameter curve pair.

[0087] The physical property calculation result acquisition module accumulates the adaptive Gaussian quadrature results of all surface parameter curve pairs to obtain the moment calculation results of the solid model, and then obtains the physical property calculation results by converting the moment calculation results into physical property calculation result formulas.

[0088] For the system embodiments, since they basically correspond to the method embodiments, relevant details can be found in the descriptions of the method embodiments; the implementation methods of the remaining modules will not be repeated here. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0089] The system embodiments of the present invention can be applied to any device with data processing capabilities, such as a computer or other similar device. The system embodiments can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution.

[0090] Obviously, the embodiments and accompanying drawings described above are merely some examples of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application. Several modifications and improvements can be made without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A method for calculating the physical properties of a three-dimensional CAD model based on adaptive Gaussian integral, characterized in that, Includes the following steps: 1) Input a 3D CAD solid model and calculate the axial parallel bounding box of the surface parameter domain of each surface of the solid model. Based on the axial parallel bounding box, set the integration direction and lower bound of the inner integral of each surface parameter curve pair. 2) Calculate the rough moment estimate of each surface parameter curve pair based on the Gaussian quadrature formula, and obtain the rough moment estimate of the solid model; 3) Based on the results of steps 1) and 2), perform adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian integration result for each surface parameter curve pair; 4) Sum the adaptive Gaussian quadrature results of all surface parameter curve pairs to obtain the moment calculation results of the solid model, and then obtain the physical property calculation results according to the formula for converting the moment calculation results into physical property calculation results. Step 3) specifically refers to: For each pair of surface parametric curves, perform the following steps: 3.1) Construct the first adaptive term E1 and put it into a max-heap. The max-heap is sorted by the error term ΔM obtained based on the first adaptive term E1 as the comparison element; and initialize the subdivision number C. div =1; 3.2) Extract the adaptive term E at the top of the max-heap. top Adaptive terms Adaptive term E top It includes two sub-regions, among which, For the adaptive term E top The Gaussian quadrature result of the left subregion, For the adaptive term E top Gaussian quadrature result of the right subregion; ΔM pop For the adaptive term E top The relative error term; For the adaptive term E top The parameter value of the left boundary of the integration region; For the adaptive term E top The parameter value at the middle position of the integration region; For the adaptive term E top The parameter values ​​of the right boundary of the integration region; for each of the two sub-regions. and The subdivision is performed to obtain two subdivided adaptive terms. and Determine their respective error terms Is it greater than the preset upper limit of relative error ΔM? tol If the result is greater than the given value, add it to the max-heap; otherwise, update the adaptive Gaussian quadrature result of the current surface parameter curve pair. M at the initial moment ij =0; in, For the adaptive term E top The Gaussian quadrature result of the left half of the subdivided left subregion; For the adaptive term E top The Gaussian quadrature result of the right half of the subdivided left subregion; For the adaptive term E top The relative error term of the left sub-region; For the adaptive term E top The parameter value of the left boundary of the integration region of the left subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the left subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the left subregion; For the adaptive term E top The Gaussian quadrature result of the left half of the right subregion after subdivision; For the adaptive term E top The Gaussian quadrature result of the right half of the right subregion after subdivision; For the adaptive term E top The relative error term of the right subregion; For the adaptive term E top The parameter value of the left boundary of the integration region of the right subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the right subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the right subregion; 3.3) Update the subdivided number C' div =C div +2, if C' at this time div >C tol If the max-heap is empty, the adaptive iteration ends; otherwise, jump to step 3.2) to continue the adaptive iteration; where C tol This is the preset maximum number of subdivisions; 3.4) If the number of adaptive terms in the max-heap is k when the adaptive iteration ends, and k > 0, then all adaptive terms... Remove from the max heap and simultaneously update the adaptive Gaussian quadrature result of the current surface parameter curve pair. Among them, E δ Let δ be the number of adaptive terms.

2. The method according to claim 1, characterized in that, Step 1) specifically refers to: 1.1) Input a three-dimensional CAD solid model, which includes multiple parametric curves and multiple surfaces. For each surface, calculate and merge the axial parallel bounding boxes of all parametric curves in its parameter domain, and use the merged result as the axial parallel bounding box of the parameter domain of the surface. 1.2) Set the direction of the axial parallel bounding box of the surface parameter domain of a surface with the smaller width as the direction of integration of the inner integral of all surface parameter curve pairs of the surface; 1.3) Set the parameter value at the midpoint of the axial parallel bounding box of the surface parameter domain of a surface as the lower bound of the inner integral of all surface parameter curve pairs of the surface.

3. The method according to claim 1, characterized in that, Step 2) specifically refers to: 2.1) For each surface parametric curve pair, set different Gaussian quadrature orders for different types of parametric curves and surfaces, and then use the Gaussian quadrature formula to calculate a rough moment estimate for each surface parametric curve pair. 2.2) The coarse moment estimates of all surface parameter curve pairs are summed to obtain the coarse moment estimate of the solid model; the coarse moment estimate of the solid model is expressed as: in, It is the zeroth moment; For a first-order moment, The x-coordinate is the volume integral of the solid model. The volume integral of the y-coordinate on the solid model. The z-coordinate is the volume integral of the solid model; It is a second moment. Let x be the volume integral of the square of the x-coordinate on the solid model. Let y be the volume integral of the square of the y-coordinate on the solid model. Let z be the volume integral of the square of the z-coordinate on the solid model. This is the volume integral of the product of the x and y coordinates onto the solid model. This is the volume integral of the product of the x and z coordinates on the solid model. It is the volume integral of the product of the y-coordinate and the z-coordinate on the solid model.

4. The method according to claim 1, characterized in that, Step 3.1) specifically refers to: a) Calculate the complete parameter range [t] 0 ,t 1 The Gaussian quadrature of the outer integrals corresponding to the ten integral terms of the moments under the given conditions yields the Gaussian quadrature result M before subdivision. 0 ; b) Calculate the two subregions [t] l ,t m ] and [t m ,t r The Gaussian quadrature result of the outer integral, where t l =t 0 , t r =t 1 The Gaussian quadrature results of the two sub-regions are obtained. Adding them together yields the subdivided Gaussian quadrature result. c) Based on the Gaussian quadrature results before and after subdivision, obtain the absolute error vector ΔM for this subdivision. a =M 1 -M 0 Then, the relative error vector for this subdivision is calculated. From the relative error vector ΔM r Select the term with the largest absolute value, and use the absolute value of the term with the largest absolute value as the error term ΔM of the adaptive term; d) Construct the first adaptive term The subdivisions are then placed into a max-heap, which is sorted by the error term ΔM as the comparison element, and the subdivision count C is initialized. div =1.

5. The method according to claim 4, characterized in that, In step 3.2), the two sub-regions are respectively... and Based on the method in step 3.1), two subdivided adaptive terms are obtained. and 6. The method according to claim 4, characterized in that, In step 3.1), before calculating the Gaussian quadrature result of the outer integral, it is necessary to first perform an adaptive Gaussian integration of the inner integral corresponding to the Gaussian quadrature point of the outer integral. The method for the adaptive Gaussian integration of the inner integral is as follows: 3.1.1) Construct the first adaptive term e1 and put it into a max-heap. The max-heap is sorted by the error term Δm obtained based on the first adaptive term e1 as the comparison element; and initialize the subdivision number c. fiv =1; 3.1.2) Extract the adaptive term e at the top of the max-heap. top Adaptive terms Adaptive term e top It includes two sub-regions, among which, For the adaptive term e top The Gaussian quadrature result of the left subregion, For the adaptive term e top The Gaussian quadrature result of the right subregion; Δm top For the adaptive term e top The relative error term; For the adaptive term e top The parameter value of the left boundary of the integration region; For the adaptive term e top The parameter value at the middle position of the integration region; For the adaptive term e top The parameter values ​​of the right boundary of the integration region; for each of the two sub-regions. and The subdivision is performed to obtain two subdivided adaptive terms. and Determine their respective error terms Is it greater than the preset upper limit of relative error Δm? tol If the result is greater than the given value, add it to the max-heap; otherwise, update the adaptive Gaussian quadrature result of the current inner integral. m at the initial moment ij =0; in, For the adaptive term e top The Gaussian quadrature result of the left half of the subdivided left subregion; For the adaptive term e top The Gaussian quadrature result of the right half of the subdivided left subregion; For the adaptive term e top The relative error term of the left sub-region; For the adaptive term e top The parameter value of the left boundary of the integration region of the left subregion; For the adaptive term e top The parameter value at the middle position of the integration region of the left subregion; For the adaptive term e top The parameter value of the right boundary of the integration region of the left subregion; For the adaptive term e top The Gaussian quadrature result of the left half of the right subregion after subdivision; For the adaptive term e top The Gaussian quadrature result of the right half of the right subregion after subdivision; For the adaptive term e top The relative error term of the right subregion; For the adaptive term e top The parameter value of the left boundary of the integration region of the right subregion; For the adaptive term e top The parameter value at the middle position of the integration region of the right subregion; For the adaptive term e top The parameter value of the right boundary of the integration region of the right subregion; 3.1.3) Update the subdivided count c' div =c div +2, if c' at this time div >c tol If the max-heap is empty, the adaptive iteration ends; otherwise, jump to step 3.1.2) to continue the adaptive iteration; where c tol The upper limit of the number of subdivisions is preset for the inner integral adaptive method; 3.4) If the number of adaptive terms in the max-heap is K when the adaptive iteration ends, and K > 0, then all adaptive terms... Remove from the max-heap and simultaneously update the adaptive Gaussian quadrature result of the current inner integral. Among them, e θ Let θ be the adaptive term of the inner integral adaptive method, and θ be the number of adaptive terms of the inner integral adaptive method.

7. The method according to claim 6, characterized in that, Step 3.1.1) specifically refers to: 1a) Calculate the complete parameter range [v] 0 ,v 1 The Gaussian quadrature of the inner integrals corresponding to the ten integral terms of the moments under the given conditions yields the Gaussian quadrature of the inner integrals before subdivision, m. 0 ; 1b) Calculate the two subregions [v l ,v m ] and [v m ,v r The Gaussian quadrature result of the inner integral of ], where v l =v 0 , t r =t 1 The Gaussian quadrature results of the inner integrals of the two subdivided subregions are obtained. Adding them together yields the Gaussian quadrature result of the inner integral after subdivision. 1c) Based on the Gaussian quadrature results of the inner integrals before and after subdivision, the absolute error vector Δm of this subdivision is obtained. a =m 1 -m 0 The coarse moment estimate M obtained in step 2) R Divide by Obtain the error scaling factor m of the inner integral. R Calculate the relative error vector for this subdivision. From the relative error vector ΔM r Select the term with the largest absolute value, and use the absolute value of the term with the largest absolute value as the error term Δm of the adaptive term; where ω μ The Gaussian quadrature weights of the outer integral are the Gaussian quadrature weights corresponding to the current inner integral; t μ The Gaussian point corresponding to the current inner integral in the set of Gaussian points of the outer integral; u(t) μ ) represents the parameter t μ The corresponding u-direction parameters; 1d) Construct the first adaptive term The data is then placed into a max-heap, which is sorted by the error term Δm as the comparison element, and the subdivision count c is initialized. div =1.

8. The method according to claim 1, characterized in that, Step 4) specifically involves: The adaptive Gaussian quadrature results of each pair of surface parameter curves are summed to obtain the moment calculation results of the solid model. in, Finally, based on the formula for converting the moment calculation results into physical property calculation results, the volume, center of mass, mass, and inertia tensors are obtained, where volume... Mass M = Vρ; Center of mass C x Let C be the x-axis coordinate of the centroid. y Let C be the y-coordinate of the centroid. z Let be the z-coordinate of the centroid; where ρ is the density of the solid model; and ρ is the second moment relative to the centroid. Inertia tensor I xx I yy and I yy I is the moment of inertia. yx I zx I xy I zy I xz and I yz It is the inertial product.

9. A system for calculating the physical properties of a three-dimensional CAD model for implementing the method of claim 1, characterized in that, include: The module for obtaining the integration direction and lower bound calculates the axial parallel bounding box of the surface parameter domain of each surface of the entity model based on the input entity model, and sets the integration direction and integration lower bound of the inner integral of each surface parameter curve pair according to the axial parallel bounding box. The coarse moment estimation module calculates a coarse moment estimate for each pair of surface parameter curves based on the Gaussian quadrature formula, and obtains a coarse moment estimate for the solid model. The adaptive Gaussian quadrature result calculation module performs adaptive Gaussian integration on the surface parameter curve pairs to obtain the adaptive Gaussian quadrature result for each surface parameter curve pair. The physical property calculation result acquisition module accumulates the adaptive Gaussian quadrature results of all surface parameter curve pairs to obtain the moment calculation results of the solid model, and then obtains the physical property calculation results by converting the moment calculation results into physical property calculation result formulas. The adaptive Gaussian quadrature result calculation module obtains the adaptive Gaussian quadrature result for each pair of surface parameter curves, specifically: For each pair of surface parametric curves, perform the following steps: 3.1) Construct the first adaptive term E1 and put it into a max-heap. The max-heap is sorted by the error term ΔM obtained based on the first adaptive term E1 as the comparison element; and initialize the subdivision number C. div =1; 3.2) Extract the adaptive term E at the top of the max-heap. top Adaptive terms Adaptive term E top It includes two sub-regions, among which, For the adaptive term E top The Gaussian quadrature result of the left subregion, For the adaptive term E top Gaussian quadrature result of the right subregion; ΔM top For the adaptive term E top The relative error term; For the adaptive term E top The parameter value of the left boundary of the integration region; For the adaptive term E top The parameter value at the middle position of the integration region; For the adaptive term E top The parameter values ​​of the right boundary of the integration region; for each of the two sub-regions. and The subdivision is performed to obtain two subdivided adaptive terms. and Determine their respective error terms Is it greater than the preset upper limit of relative error ΔM? tol If the result is greater than the given value, add it to the max-heap; otherwise, update the adaptive Gaussian quadrature result of the current surface parameter curve pair. M at the initial moment ij =0; in, For the adaptive term E top The Gaussian quadrature result of the left half of the subdivided left subregion; For the adaptive term E top The Gaussian quadrature result of the right half of the subdivided left subregion; For the adaptive term E top The relative error term of the left sub-region; For the adaptive term E top The parameter value of the left boundary of the integration region of the left subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the left subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the left subregion; For the adaptive term E top The Gaussian quadrature result of the left half of the right subregion after subdivision; For the adaptive term E top The Gaussian quadrature result of the right half of the right subregion after subdivision; For the adaptive term E top The relative error term of the right subregion; For the adaptive term E top The parameter value of the left boundary of the integration region of the right subregion; For the adaptive term E top The parameter value at the middle position of the integration region of the right subregion; For the adaptive term E top The parameter value of the right boundary of the integration region of the right subregion; 3.3) Update the subdivided number C' div =C div +2, if C' at this time div >C tol If the max-heap is empty, the adaptive iteration ends; otherwise, jump to step 3.2) to continue the adaptive iteration; where C tol This is the preset maximum number of subdivisions; 3.4) If the number of adaptive terms in the max-heap is k when the adaptive iteration ends, and k > 0, then all adaptive terms... Remove from the max heap and simultaneously update the adaptive Gaussian quadrature result of the current surface parameter curve pair. Among them, E δ Let δ be the number of adaptive terms.

Citation Information

Patent Citations

  • Integrated circuit electromagnetic simulation method and system based on Bessel function piecewise integration

    CN114417769A

  • Mass property calculation device for three-dimensional shape, mass property calculation method for three- dimensional shape, program and storage medium

    JP2003150654A