View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023361 | Community | OCCT:Foundation Classes | public | 2012-07-27 16:25 | 2013-04-29 15:21 |
Reporter | Dan8 | Assigned To | |||
Priority | normal | Severity | major | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Product Version | 6.5.3 | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023361: Bug in gp_Trsf::Multiply | ||||
Description | gp_Trsf::Multiply creates incorrect transformation in some cases (see step to reproduce). This can be fixed in file gp_Trsf.cxx, method void gp_Trsf::Multiply(const gp_Trsf& T): replace code: else if (shape == gp_Rotation && T.shape == gp_Rotation) { if (loc.X() != 0.0 || loc.Y() != 0.0 || loc.Z() != 0.0) { loc.Add (T.loc.Multiplied (matrix)); } by code: else if (shape == gp_Rotation && T.shape == gp_Rotation) { if (T.loc.X() != 0.0 || T.loc.Y() != 0.0 || T.loc.Z() != 0.0) { loc.Add (T.loc.Multiplied (matrix)); } I hope this helps. | ||||
Steps To Reproduce | gp_Pnt p(0, 0, 2); gp_Trsf t1; t1.SetRotation(gp_Ax1(p, gp_Dir(0, 1, 0)), -0.49328285294022267); Base::Trsf t2; t2.SetRotation(gp_Ax1(p, gp_Dir(0, 0, 1)), 0.87538474718473880); // From the help: // Computes the transformation composed with T and <me>. // In a C++ implementation you can also write Tcomposed = <me> * T. // Example : // Trsf T1, T2, Tcomp; ............... // Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) // Pnt P1(10.,3.,4.); // Pnt P2 = P1.Transformed(Tcomp); //using Tcomp // Pnt P3 = P1.Transformed(T1); //using T1 then T2 // P3.Transform(T2); // P3 = P2 !!! gp_Trsf tComp = t2 * t1; gp_Pnt p1(10, 3, 4); gp_Pnt p2 = p1.Transformed(tComp); gp_Pnt p3 = p1.Transformed(t1); p3.Transform(t2); CPPUNIT_ASSERT(p2.isEqual(p3, 1e-6)); | ||||
Tags | No tags attached. | ||||
Test case number | bugs fclasses bug23361 | ||||
|
Add branch CR23361, with bug fix, please check it |
|
Please add a test case (tests/bugs/fclasses/CR23361) and check that it works as expected both with fix (OK) and without it (fail) |
|
Reviewed with minor corrections: unused local variable removed, function is made to always return 0 (error is flagged by a message instead). Please test |
|
Dear BugMaster, Branch CR23361_2 (and products from GIT master) was compiled on Linux and Windows platforms and tested. Regression: Not detected Improvements: Not detected Testing case: bugs fclasses bug23361 - OK |
occt: master f6f03db9 2012-11-15 09:23:11
|
0023361: Bug in gp_Trsf::Multiply Bug in gp_Trsf::Multiply fixed. If we multiply 2 gp_Trsf objects (shape == gp_Rotation), for example, t1 * t2, and t2.loc = 0 (t2.loc.x == 0 and t2.loc.y == 0 and t2.loc.z == 0) then t1.loc will not change (you can verify it from the matrix multiplication) Adding test case |
Affected Issues 0023361 |
|
mod - src/gp/gp_Trsf.cxx | Diff File | ||
mod - src/QABugs/QABugs_19.cxx | Diff File | ||
add - tests/bugs/fclasses/bug23361 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-27 16:25 | Dan8 | New Issue | |
2012-07-27 16:25 | Dan8 | Assigned To | => abv |
2012-08-30 19:50 |
|
Status | new => resolved |
2012-10-03 08:28 |
|
Assigned To | abv => ilv |
2012-10-10 18:45 |
|
Assigned To | ilv => oan |
2012-10-10 18:46 |
|
Note Added: 0021712 | |
2012-10-11 01:29 |
|
Note Added: 0021714 | |
2012-10-11 01:29 |
|
Assigned To | oan => ilv |
2012-10-11 01:29 |
|
Status | resolved => assigned |
2012-10-19 15:38 |
|
Assigned To | ilv => abv |
2012-10-19 15:38 |
|
Status | assigned => resolved |
2012-10-23 06:44 |
|
Note Added: 0021886 | |
2012-10-23 06:44 |
|
Assigned To | abv => bugmaster |
2012-10-23 06:44 |
|
Status | resolved => reviewed |
2012-10-23 16:39 |
|
Assigned To | bugmaster => mkv |
2012-10-24 15:46 |
|
Target Version | => 6.6.0 |
2012-11-01 14:28 | apn | Note Added: 0022056 | |
2012-11-01 14:29 | apn | Note Edited: 0022056 | |
2012-11-01 14:29 | apn | Test case number | => bugs fclasses bug23361 |
2012-11-01 14:29 | apn | Assigned To | mkv => bugmaster |
2012-11-01 14:29 | apn | Status | reviewed => tested |
2012-11-16 13:03 |
|
Changeset attached | => occt master f6f03db9 |
2012-11-16 13:03 |
|
Assigned To | bugmaster => ilv |
2012-11-16 13:03 |
|
Status | tested => verified |
2012-11-16 13:03 |
|
Resolution | open => fixed |
2012-12-10 17:16 |
|
Changeset attached | => occt master f6f03db9 |
2013-04-23 13:36 |
|
Status | verified => closed |
2013-04-29 15:21 |
|
Fixed in Version | => 6.6.0 |