]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_Dir.cpp
Salome HOME
Added new geometrical objects
[modules/shaper.git] / src / GeomAPI / GeomAPI_Dir.cpp
index 6e8ea2429f790687cc5047a80efe94f2742e310a..c3ad12fb97a2421cee00f8ce53f44045cfbd1146 100644 (file)
@@ -7,12 +7,16 @@
 
 #include <gp_Dir.hxx>
 
-#define MY_DIR static_cast<gp_Pnt*>(myImpl)
+#define MY_DIR static_cast<gp_Dir*>(myImpl)
 
 GeomAPI_Dir::GeomAPI_Dir(const double theX, const double theY, const double theZ)
   : GeomAPI_Interface(new gp_Dir(theX, theY, theZ))
 {}
 
+GeomAPI_Dir::GeomAPI_Dir(const boost::shared_ptr<GeomAPI_XYZ>& theCoords)
+  : GeomAPI_Interface(new gp_Dir(theCoords->x(), theCoords->y(), theCoords->z()))
+{}
+
 double GeomAPI_Dir::x() const
 {
   return MY_DIR->X();