Salome HOME
Merge branch 'Dev_2.1.0' of salome:modules/shaper into Dev_2.1.0
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_PointBuilder.cpp
index 096dc4a96bc01d45798762380b297aa7325a315d..dffcecce403d8ab1f74c70d577937e0e0a9edccf 100644 (file)
@@ -25,6 +25,16 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
   return aRes;
 }
 
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
+    const double theX, const double theY, const double theZ)
+{
+  const gp_Pnt aPnt(theX, theY, theZ);
+  BRepBuilderAPI_MakeVertex aMaker(aPnt);
+  TopoDS_Vertex aVertex = aMaker.Vertex();
+  std::shared_ptr<GeomAPI_Vertex> aRes(new GeomAPI_Vertex);
+  aRes->setImpl(new TopoDS_Shape(aVertex));
+  return aRes;
+}
 
 std::shared_ptr<GeomAPI_Pnt> GeomAlgoAPI_PointBuilder::point(std::shared_ptr<GeomAPI_Shape> theVertex)
 {