View Issue Details

IDProjectCategoryView StatusLast Update
0027837CommunityOCCT:Modeling Algorithmspublic2016-12-09 16:41
ReporterRoman Lygin Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027837: Wrong computation of inertia axes for equal sided box
DescriptionInertia axes are incorrectly computed for the box with equal sides. At the same time computation is correct if the difference exists and is tiny (e.g. 1e-4mm with length of 200mm).

Perhaps there is some instability or round-off error, etc. Anyway the skewed result is very different from the expected - instead of being directed along XYZ axes the wrong axes are directed along quadrant diagonals - see screenshots.
Steps To Reproducebox b 200.0001 200 200
vprops b #OK (1e-4)

box b 200 200 200
vprops b #wrong

box b 200.00001 200 200
vprops b #wrong (1e-5)
TagsNo tags attached.
Test case numberNor requared

Attached Files

Activities

Roman Lygin

2016-09-04 09:24

developer  

screenshot_ok.png (26,349 bytes)   

Roman Lygin

2016-09-04 09:24

developer  

screenshot_wrong.png (31,317 bytes)   

msv

2016-09-05 15:20

developer   ~0057461

The cube has a center of symmetry (as an opposite to a box having different sides). So, any axis passing through the center is a principal axis.

See the following article, which confirms this statement:
http://physics.stackexchange.com/questions/153277/why-are-the-principal-axes-about-the-center-of-mass-of-a-cube-perpendicular-to-i

Different results for the same cube with different "epsilon" parameter of "vprops", or different results of the cubes having different scale are explained by numerical computation errors.

msv

2016-09-05 15:23

developer   ~0057462

Dear Roman, do you have some idea how to select the main principal axis of a body, if any axis gives the same moment of inertia?

Roman Lygin

2016-09-05 16:05

developer   ~0057463

Dear Mikhail,

I am not a physics so cannot comment with full confidence.
My assumption is that inertia axes should be aligned with eigenvectors of the inertia matrix. Thus, given that inertia matrix is diagonal for the box with equal sides my expectation was that the inertia axes should be aligned with XYZ vectors.

Hope this helps.
Roman

msv

2016-09-05 16:10

developer   ~0057464

The matter is that the matrix is identity, thus every vector is an eigenvector of the identity matrix.

msv

2016-09-05 16:24

developer   ~0057468

If you rotate the box, you will probably expect that principal axes follow the rotation of the box. But this is not true. The inertia matrix will be the same, and also the property will remain that every vector will be eigenvector of this matrix.

msv

2016-09-05 16:31

developer   ~0057469

In the last post, I meant the "cube".
If you rotate a box with different sides, the inertia matrix will be different for every rotation angle.

Roman Lygin

2016-09-12 11:05

developer   ~0057670

Dear Mikhail,

Not sure if I have any further constructive input.
My original objective was to compute the minimum bounding box (not necessarily axis-aligned). The algorithm based on using inertia axes works just fine unless we encountered this equal sided box case.

Please feel free to treat this issue report as you deem appropriate.
Take care,
Roman

msv

2016-09-12 11:29

developer   ~0057671

The principal axes can be used to identify coordinate system for an optimal bounding box only in case if the body has no point of symmetry. This case can be recognized by the fact that the matrix of inertia has identity form (with some scaling). Or, all the 3 moments of inertia have the same value.
In such case, it is needed to invent some alternative approach to compute bounding box.

msv

2016-09-12 11:30

developer   ~0057672

Dear bugmaster, please close this bug.

Issue History

Date Modified Username Field Change
2016-09-04 09:24 Roman Lygin New Issue
2016-09-04 09:24 Roman Lygin Assigned To => msv
2016-09-04 09:24 Roman Lygin File Added: screenshot_ok.png
2016-09-04 09:24 Roman Lygin File Added: screenshot_wrong.png
2016-09-05 11:07 msv Summary Wrong computation of intertia axes for equal sided box => Wrong computation of inertia axes for equal sided box
2016-09-05 15:20 msv Note Added: 0057461
2016-09-05 15:23 msv Note Added: 0057462
2016-09-05 15:23 msv Assigned To msv => Roman Lygin
2016-09-05 15:23 msv Status new => feedback
2016-09-05 16:05 Roman Lygin Note Added: 0057463
2016-09-05 16:05 Roman Lygin Assigned To Roman Lygin => msv
2016-09-05 16:05 Roman Lygin Status feedback => assigned
2016-09-05 16:10 msv Note Added: 0057464
2016-09-05 16:10 msv Assigned To msv => Roman Lygin
2016-09-05 16:10 msv Status assigned => feedback
2016-09-05 16:24 msv Note Added: 0057468
2016-09-05 16:31 msv Note Added: 0057469
2016-09-12 11:05 Roman Lygin Note Added: 0057670
2016-09-12 11:29 msv Note Added: 0057671
2016-09-12 11:30 msv Note Added: 0057672
2016-09-12 11:30 msv Assigned To Roman Lygin => bugmaster
2016-09-12 11:30 msv Resolution open => no change required
2016-09-13 10:15 bugmaster Test case number => Nor requared
2016-09-13 10:15 bugmaster Status feedback => closed
2016-12-09 16:41 aiv Fixed in Version => 7.1.0