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