#include <SketchPlugin_ConstraintRadius.h>
#include <SketchPlugin_Constraint.h>
-#include <XGUI_ViewerPrs.h>
+#include <ModuleBase_ViewerPrs.h>
#include <V3d_View.hxx>
#include <gp_Pln.hxx>
FeaturePtr PartSet_Tools::nearestFeature(QPoint thePoint, Handle_V3d_View theView,
FeaturePtr theSketch,
- const std::list<XGUI_ViewerPrs>& theFeatures)
+ const std::list<ModuleBase_ViewerPrs>& theFeatures)
{
double aX, anY;
gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(thePoint, theView);
PartSet_Tools::convertTo2D(aPoint, theSketch, theView, aX, anY);
FeaturePtr aFeature;
- std::list<XGUI_ViewerPrs>::const_iterator anIt = theFeatures.begin(), aLast = theFeatures.end();
+ std::list<ModuleBase_ViewerPrs>::const_iterator anIt = theFeatures.begin(), aLast = theFeatures.end();
FeaturePtr aDeltaFeature;
double aMinDelta = -1;
- XGUI_ViewerPrs aPrs;
+ ModuleBase_ViewerPrs aPrs;
for (; anIt != aLast; anIt++) {
aPrs = *anIt;
- if (!aPrs.feature())
+ if (!aPrs.result())
continue;
boost::shared_ptr<SketchPlugin_Feature> aSketchFeature =
- boost::dynamic_pointer_cast<SketchPlugin_Feature>(aPrs.feature());
+ boost::dynamic_pointer_cast<SketchPlugin_Feature>(aPrs.result());
if (!aSketchFeature)
continue;
double aDelta = aSketchFeature->distanceToPoint(
boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, anY)));
if (aMinDelta < 0 || aMinDelta > aDelta) {
aMinDelta = aDelta;
- aDeltaFeature = aPrs.feature();
+ aDeltaFeature = aPrs.result();
}
}
return aDeltaFeature;