Salome HOME
Regression: do not rotate viewer if sketch plane is selected from a face of a shape
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ax3.cpp
index d7950b585126717c0e96d409e92ceb1a7d877d5c..7dd2632ce3d8dad238250dd6d5c6ec2fb87d54a5 100644 (file)
@@ -15,7 +15,7 @@
 #include <Precision.hxx>
 
 
-#define MY_AX3 static_cast<gp_Ax3*>(myImpl)
+#define MY_AX3 implPtr<gp_Ax3>()
 
 
 GeomAPI_Ax3::GeomAPI_Ax3()
@@ -25,13 +25,11 @@ GeomAPI_Ax3::GeomAPI_Ax3()
 
 GeomAPI_Ax3::GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
                          std::shared_ptr<GeomAPI_Dir> theDirX,
-                         std::shared_ptr<GeomAPI_Dir> theDirY,
                          std::shared_ptr<GeomAPI_Dir> theNorm)
 : GeomAPI_Interface(new gp_Ax3(theOrigin->impl<gp_Pnt>(), 
                                theNorm->impl<gp_Dir>(), 
                                theDirX->impl<gp_Dir>()))
  {
-   MY_AX3->SetYDirection(theDirY->impl<gp_Dir>());
  }
 
 void GeomAPI_Ax3::setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin)
@@ -69,14 +67,14 @@ std::shared_ptr<GeomAPI_Dir> GeomAPI_Ax3::dirY() const
   return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
 }
 
-void GeomAPI_Ax3::setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm)
+void GeomAPI_Ax3::setNormal(const std::shared_ptr<GeomAPI_Dir>& theNorm)
 {
   gp_Ax1 aAx1 = MY_AX3->Axis();
   aAx1.SetDirection(theNorm->impl<gp_Dir>());
   MY_AX3->SetAxis(aAx1);
 }
 
-std::shared_ptr<GeomAPI_Dir> GeomAPI_Ax3::norm() const
+std::shared_ptr<GeomAPI_Dir> GeomAPI_Ax3::normal() const
 {
   gp_Dir aDir = MY_AX3->Axis().Direction();
   return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(),aDir.Y(),aDir.Z()));
@@ -104,4 +102,4 @@ std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Ax3::to2D(double theX, double theY, doubl
   double aX = aVec.X() * aXDir.X() + aVec.Y() * aXDir.Y() + aVec.Z() * aXDir.Z();
   double aY = aVec.X() * aYDir.X() + aVec.Y() * aYDir.Y() + aVec.Z() * aYDir.Y();
   return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, aY));
-}
\ No newline at end of file
+}