X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_PointBuilder.cpp;h=dffcecce403d8ab1f74c70d577937e0e0a9edccf;hb=3205d0f18200948632155bbe7b640bc1e482243d;hp=f57605c8c4fe2ee37f078ab46f0ea545f8d7d5e5;hpb=a3cd8f27f76183cfc2d0728e6388696ab9dce1b8;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp index f57605c8c..dffcecce4 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -19,11 +20,21 @@ std::shared_ptr GeomAlgoAPI_PointBuilder::point( const gp_Pnt& aPnt = thePoint->impl(); BRepBuilderAPI_MakeVertex aMaker(aPnt); TopoDS_Vertex aVertex = aMaker.Vertex(); - std::shared_ptr aRes(new GeomAPI_Shape); + std::shared_ptr aRes(new GeomAPI_Vertex); aRes->setImpl(new TopoDS_Shape(aVertex)); return aRes; } +std::shared_ptr 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 aRes(new GeomAPI_Vertex); + aRes->setImpl(new TopoDS_Shape(aVertex)); + return aRes; +} std::shared_ptr GeomAlgoAPI_PointBuilder::point(std::shared_ptr theVertex) {