View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024813 | Community | OCCT:Foundation Classes | public | 2014-04-09 13:27 | 2014-10-29 15:26 |
Reporter | spamkiller | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | won't fix | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 6.7.0 | ||||
Target Version | 6.8.0 | ||||
Summary | 0024813: gp_Quaternion::SetEulerAngles and quiet NaNs | ||||
Description | If you call gp_Quaternion::SetQuaternion() with quiet NaN doubles (NaN: "not a number"), gp_Quaternion::GetQuaternion() returns "0" for "a" instead of "NaN". | ||||
Steps To Reproduce | Code example: double a = std::numeric_limits<double>::quiet_NaN(); double b = std::numeric_limits<double>::quiet_NaN(); double c = std::numeric_limits<double>::quiet_NaN(); gp_Quaternion q; q.SetEulerAngles(gp_Intrinsic_XYZ, a, b, c); double a2 = 0; double b2 = 0; double c2 = 0; q.GetEulerAngles(gp_Intrinsic_XYZ, a2, b2, c2); printout(QString("a, b, c : %0 | %1 | %2").arg(a).arg(b).arg(c)); printout(QString("a2, b2, c2 : %0 | %1 | %2").arg(a2).arg(b2).arg(c2)); Output: a, b, c : nan | nan | nan a2, b2, c2 : 0 | nan | nan But it should be: a, b, c : nan | nan | nan a2, b2, c2 : nan | nan | nan | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Alexander, could you please check the issue? |
|
Dear abv, General approach of OCCT algorithms is to work correctly under correct input data, but this data is invalid. There is no reason to handle such situations in low-level algorithms like this, because it will lead to bad performance. |
|
I agree: Euler angles are not stored in quaternion directly, but used to construct it by some algorithm. Hence, when Euler angles are requested back from quaternion, they are recomputed from quaternion definition. In general case this calculation can produce different valid answers, and there should be no expectation to get the same values as used on input. Neither quaternion is designed to work with NANs, and there is no requirement to return all NANs in the described case. Thus I close the issue as not relevant. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-04-09 13:27 | spamkiller | New Issue | |
2014-04-09 13:27 | spamkiller | Assigned To | => abv |
2014-09-12 14:25 |
|
Target Version | => 6.8.0 |
2014-10-29 13:53 |
|
Note Added: 0033820 | |
2014-10-29 13:53 |
|
Assigned To | abv => aml |
2014-10-29 13:53 |
|
Status | new => assigned |
2014-10-29 15:03 |
|
Note Added: 0033831 | |
2014-10-29 15:04 |
|
Assigned To | aml => abv |
2014-10-29 15:26 |
|
Note Added: 0033835 | |
2014-10-29 15:26 |
|
Status | assigned => closed |
2014-10-29 15:26 |
|
Resolution | open => won't fix |