]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_Vertex.cpp
Salome HOME
Issue #1114: Provide selection of origin and axis of trihedron with reference to...
[modules/shaper.git] / src / GeomAPI / GeomAPI_Vertex.cpp
index b917837a09cfcaa4e9589598625f7a4d4f63765e..27060572ce1ab6de8ac8b49ba15bfc027be5b683 100644 (file)
@@ -12,6 +12,7 @@
 #include <TopoDS.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <BRep_Tool.hxx>
+#include <BRep_Builder.hxx>
 #include <gp_Pnt.hxx>
 #include <Precision.hxx>
 
@@ -27,6 +28,14 @@ GeomAPI_Vertex::GeomAPI_Vertex(const std::shared_ptr<GeomAPI_Shape>& theShape)
   }
 }
 
+GeomAPI_Vertex::GeomAPI_Vertex(double theX, double theY, double theZ)
+{
+  TopoDS_Vertex aVertex;
+  BRep_Builder aBuilder;
+  aBuilder.MakeVertex(aVertex, gp_Pnt(theX, theY, theZ), Precision::Confusion());
+  setImpl(new TopoDS_Shape(aVertex));
+}
+
 std::shared_ptr<GeomAPI_Pnt> GeomAPI_Vertex::point()
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Vertex*>(this)->impl<TopoDS_Shape>();