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