1 // File: GeomAlgoAPI_PointBuilder.cpp
2 // Created: 02 Jun 2014
3 // Author: Mikhail PONIKAROV
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>
11 boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
12 boost::shared_ptr<GeomAPI_Pnt> thePoint)
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));