You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two different functions to calculate the volume properties in the BRepGProp (GProp_GProps, GProp_PrincipalProps) class:
VolumeProperties
VolumePropertiesGK
Both calculate the shape volume correctly. However, when calculating the inertia properties of the system, it seems that the former produces the correct results but the latter does not.
For a box and a cylinder:
Principal moments of inertia
Cylinder
Volume: 196349.54084936203
Ixx, Iyy, Izz: (194317337.4428578, 194291128.82151097, 61359231.51543226)
Cylinder GK
Volume: 196349.5408493644
Ixx, Iyy, Izz: (6.122366410532748e-40, -2.2351741790771484e-07, -3.5762786865234375e-07)
Box
Volume: 124999.99999999999
Ixx, Iyy, Izz: (52083333.33333338, 52083333.33333331, 52083333.333333276)
Box GK
Volume: 124999.99999999999
Ixx, Iyy, Izz: (1.6326310428087332e-40, -8.940696716308594e-08, -8.940696716308594e-08)
The text was updated successfully, but these errors were encountered:
Both methods use different algorithms. GK means Gauss-Kronrod integration. To be rigourous, each algorithm results should be compared to the theoretical solution for volume/Ixx/Iyy/Izz.
For a cylinder (r = 25, h = 100), Izz = 0.5mr^2, and m = Pir^2h (density = 1).
This gives Izz = 61359231.5154 which is the same as the result given by the VolumeProperties function. The result given by the VolumePropertiesGK function is way off, probably it gives something close to zero.
There are two different functions to calculate the volume properties in the BRepGProp (GProp_GProps, GProp_PrincipalProps) class:
Both calculate the shape volume correctly. However, when calculating the inertia properties of the system, it seems that the former produces the correct results but the latter does not.
For a box and a cylinder:
Principal moments of inertia
Cylinder
Volume: 196349.54084936203
Ixx, Iyy, Izz: (194317337.4428578, 194291128.82151097, 61359231.51543226)
Cylinder GK
Volume: 196349.5408493644
Ixx, Iyy, Izz: (6.122366410532748e-40, -2.2351741790771484e-07, -3.5762786865234375e-07)
Box
Volume: 124999.99999999999
Ixx, Iyy, Izz: (52083333.33333338, 52083333.33333331, 52083333.333333276)
Box GK
Volume: 124999.99999999999
Ixx, Iyy, Izz: (1.6326310428087332e-40, -8.940696716308594e-08, -8.940696716308594e-08)
The text was updated successfully, but these errors were encountered: