+ std::shared_ptr<GeomAPI_Shape> aShape = SketcherPrs_Tools::getShape(theShape);
+ gp_Pnt aP; // Central point
+ gp_Vec aVec1; // main vector
+ if (aShape->isEdge()) {
+ std::shared_ptr<GeomAPI_Curve> aCurve = std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(aShape));
+ std::shared_ptr<GeomAPI_Pnt> aPnt1; // Start point of main vector
+ std::shared_ptr<GeomAPI_Pnt> aPnt2; // End point of main vector
+ if (aCurve->isLine()) {
+ std::shared_ptr<GeomAPI_Edge> aEdge =
+ std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aShape));
+
+ aPnt1 = aEdge->firstPoint();
+ aPnt2 = aEdge->lastPoint();
+
+ // Find the middle point
+ aP = gp_Pnt((aPnt1->x() + aPnt2->x())/2.,
+ (aPnt1->y() + aPnt2->y())/2.,
+ (aPnt1->z() + aPnt2->z())/2.);