Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into SketchSolver
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_PointBuilder.cpp
1 // File:        GeomAlgoAPI_PointBuilder.cpp
2 // Created:     02 Jun 2014
3 // Author:      Mikhail PONIKAROV
4
5
6
7 #include <GeomAlgoAPI_PointBuilder.h>
8 #include <GeomAPI_Pnt.h>
9 #include <GeomAPI_Shape.h>
10 #include <BRepBuilderAPI_MakeVertex.hxx>
11 #include <TopoDS_Vertex.hxx>
12
13 boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
14     boost::shared_ptr<GeomAPI_Pnt> thePoint)
15 {
16   const gp_Pnt& aPnt = thePoint->impl<gp_Pnt>();
17   BRepBuilderAPI_MakeVertex aMaker(aPnt);
18   TopoDS_Vertex aVertex = aMaker.Vertex();
19   boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
20   aRes->setImpl(new TopoDS_Shape(aVertex));
21   return aRes;
22 }