]> OCCT Git - occt.git/commitdiff
0022117: Wrong calculation in gp_Dir::Mirror(const gp_Ax2&)
authorJGV <>
Thu, 8 Dec 2011 11:46:41 +0000 (11:46 +0000)
committerbugmaster <bugmaster@opencascade.com>
Mon, 5 Mar 2012 15:31:22 +0000 (19:31 +0400)
src/gp/gp_Dir.cxx

index b1e8e3ff5086c14b03903eb027ca63d150268f99..8a8e1bb97dffeda35ef01b794e300d1ab9acafc7 100755 (executable)
@@ -3,6 +3,7 @@
 
 #include <gp_Dir.ixx>
 
+
 Standard_Real gp_Dir::Angle (const gp_Dir& Other) const
 {
   //    Commentaires :
@@ -77,15 +78,9 @@ void gp_Dir::Mirror (const gp_Ax1& A1)
 
 void gp_Dir::Mirror (const gp_Ax2& A2)
 {
-  gp_XYZ Z = A2.Direction().XYZ();
-  gp_XYZ MirXYZ = Z.Crossed (coord);
-  if (MirXYZ.Modulus() <= gp::Resolution())
-    { coord.Reverse(); }
-  else {
-    Z.Cross (MirXYZ);
-    gp_Dir  MirDirection (MirXYZ);
-    Mirror (MirDirection);
-  }
+  const gp_Dir& Vz = A2.Direction();
+  Mirror(Vz);
+  Reverse();
 }
 
 void gp_Dir::Transform (const gp_Trsf& T)