MantisBT - Community View Issue Details ID Project Category View Status Date Submitted Last Update 0023361 Community [OCCT] OCCT:Foundation Classes public 2012-07-27 16:25 2013-04-29 15:21 Reporter Dan8 Assigned To ilv Priority normal Severity major Status closed Resolution fixed Platform A OS L OS Version L Product Version [OCCT] 6.5.3 Target Version [OCCT] 6.6.0 Fixed in Version [OCCT] 6.6.0 Test case number bugs fclasses bug23361 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 .     // In a C++ implementation you can also write Tcomposed = * 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)); Additional informationand documentation updates Tags No tags attached. Relationships Attached Files Issue History 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 abv Status new => resolved 2012-09-24 19:23 abv Relationship added related to 0020523 2012-10-03 08:28 abv Assigned To abv => ilv 2012-10-10 18:45 ilv Assigned To ilv => oan 2012-10-10 18:46 ilv Note Added: 0021712 2012-10-11 01:29 abv Note Added: 0021714 2012-10-11 01:29 abv Assigned To oan => ilv 2012-10-11 01:29 abv Status resolved => assigned 2012-10-19 15:38 abv Assigned To ilv => abv 2012-10-19 15:38 abv Status assigned => resolved 2012-10-23 06:44 abv Note Added: 0021886 2012-10-23 06:44 abv Assigned To abv => bugmaster 2012-10-23 06:44 abv Status resolved => reviewed 2012-10-23 16:39 mkv Assigned To bugmaster => mkv 2012-10-24 15:46 abv Target Version => 6.6.0 2012-11-01 14:28 apn Note Added: 0022056 2012-11-01 14:29 apn Note Edited: 0022056 bug_revision_view_page.php?bugnote_id=22056#r4467 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 ilv Changeset attached => occt master f6f03db9 2012-11-16 13:03 ilv Assigned To bugmaster => ilv 2012-11-16 13:03 ilv Status tested => verified 2012-11-16 13:03 ilv Resolution open => fixed 2012-12-10 17:16 ilv Changeset attached => occt master f6f03db9 2013-04-23 13:36 aiv Status verified => closed 2013-04-29 15:21 aiv Fixed in Version => 6.6.0

Notes
 (0021712) ilv 2012-10-10 18:46