]> OCCT Git - occt-copy.git/commitdiff
0029978: Data Exchange, macOS - the result of reading some entity from STEP looks odd
authorabv <abv@opencascade.com>
Thu, 26 Jul 2018 07:36:12 +0000 (10:36 +0300)
committeribs <ibs@opencascade.com>
Fri, 27 Jul 2018 11:21:41 +0000 (14:21 +0300)
Code is optimized manually to avoid bug of XCode 9.4 compiler optimizer

src/gp/gp_Trsf.cxx

index 1b116fda5679f5971f78baae22dd3505da3b6cda..5e5980e20b5e4686e2bd752b3b8fca98d48a072e 100644 (file)
@@ -157,11 +157,10 @@ void gp_Trsf::SetTransformation (const gp_Ax3& FromA1,
   shape = gp_CompoundTrsf;
   scale = 1.0;
   // matrix from XOY  ToA2 :
-  matrix.SetCol (1, ToA2.XDirection().XYZ());
-  matrix.SetCol (2, ToA2.YDirection().XYZ());
-  matrix.SetCol (3, ToA2.Direction().XYZ());
+  matrix.SetRows (ToA2.XDirection().XYZ(),
+                  ToA2.YDirection().XYZ(),
+                  ToA2. Direction().XYZ());
   loc = ToA2.Location().XYZ();
-  matrix.Transpose();
   loc.Multiply (matrix);
   loc.Reverse ();
 
@@ -183,11 +182,10 @@ void gp_Trsf::SetTransformation (const gp_Ax3& A3)
 {
   shape = gp_CompoundTrsf;
   scale = 1.0;
-  loc = A3.Location().XYZ();
-  matrix.SetCols (A3.XDirection().XYZ(),
+  matrix.SetRows (A3.XDirection().XYZ(),
                   A3.YDirection().XYZ(),
                   A3. Direction().XYZ());
-  matrix.Transpose();
+  loc = A3.Location().XYZ();
   loc.Multiply (matrix);
   loc.Reverse ();
 }