Salome HOME
Issue #1369: Added "Create Face" feature.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pln.cpp
index 347e994f4d4a98d3c1735678f5dc8d11e518c779..8dcce0a701aca40d6bc7748a6b3404dddcaecccf 100644 (file)
@@ -43,6 +43,12 @@ std::shared_ptr<GeomAPI_Dir> GeomAPI_Pln::direction() const
   return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
 }
 
+std::shared_ptr<GeomAPI_Dir> GeomAPI_Pln::xDirection() const
+{
+  const gp_Dir& aDir = impl<gp_Pln>().XAxis().Direction();
+  return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
+}
+
 void GeomAPI_Pln::coefficients(double& theA, double& theB, double& theC, double& theD)
 {
   impl<gp_Pln>().Coefficients(theA, theB, theC, theD);