From: dish Date: Mon, 27 May 2024 12:37:57 +0000 (+0000) Subject: [bos #35153][EDF](2023-T1) Construction grid. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a12de15db6da2afc2da9a04e55366d23879302f;p=modules%2Fshaper.git [bos #35153][EDF](2023-T1) Construction grid. Add vertex snapping of already drawn sketch primitives. --- diff --git a/src/PartSet/PartSet_MouseProcessor.cpp b/src/PartSet/PartSet_MouseProcessor.cpp index 2a68166c4..5c8dbc57e 100644 --- a/src/PartSet/PartSet_MouseProcessor.cpp +++ b/src/PartSet/PartSet_MouseProcessor.cpp @@ -47,15 +47,16 @@ double slightlyChangeVal(double theVal) } -bool PartSet_MouseProcessor::convertPointToLocal( +/*static*/ bool PartSet_MouseProcessor::convertPointToLocal( ModuleBase_IWorkshop* theWorkshop, const std::shared_ptr& theSketch, ModuleBase_IViewWindow* theWindow, const QPoint& theEventPos, double& theX, double& theY, + bool theSnap, bool theHighlight, bool theAddOffset -) const { +) { ModuleBase_IViewer* const viewer = theWorkshop->viewer(); if (!viewer) return false; @@ -68,7 +69,7 @@ bool PartSet_MouseProcessor::convertPointToLocal( const Handle(V3d_View) view = theWindow->v3dView(); PartSet_PreviewSketchPlane* previewPlane = module->sketchMgr()->previewSketchPlane(); - if (!aV3dViewer || !aV3dViewer->Grid()->IsActive() || previewPlane->getGridSnappingMode() == PartSet_PreviewSketchPlane::GridSnappingMode::Off) { + if (!theSnap || !aV3dViewer || !aV3dViewer->Grid()->IsActive() || previewPlane->getGridSnappingMode() == PartSet_PreviewSketchPlane::GridSnappingMode::Off) { const gp_Pnt mousePoint = PartSet_Tools::convertClickToPoint(theEventPos, view); PartSet_Tools::convertTo2D(mousePoint, theSketch, view, theX, theY); return true; diff --git a/src/PartSet/PartSet_MouseProcessor.h b/src/PartSet/PartSet_MouseProcessor.h index 4f759249f..597ecb492 100644 --- a/src/PartSet/PartSet_MouseProcessor.h +++ b/src/PartSet/PartSet_MouseProcessor.h @@ -65,23 +65,24 @@ public: ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) {} - protected: /// \brief Converts position of mouse cursor to local coordinates on sketch plane. /// Snaps on-sketch-plane-coordinates to closest construction grid node. /// \param theEventPos is position of mouse cursor. /// \param theX and \param theY are local coordinates on sketch plane. + /// \param theSnap theX and theY are snapped to construction grid if both theSnap == true and snapping is enabled. /// \param theHighlight If point is snapped, hightlight grid point. /// \param theAddOffset If true, serves as a remedy for odd crash during drawing of a line on a sketch. - /// \return true on success. - virtual bool convertPointToLocal( + /// \returns true on success. + static bool convertPointToLocal( ModuleBase_IWorkshop* theWorkshop, const std::shared_ptr& theSketch, // Passing by reference is intentionally. ModuleBase_IViewWindow* theWindow, const QPoint& theEventPos, double& theX, double& theY, + bool theSnap = true, bool theHighlight = false, bool theAddOffset = false - ) const; + ); }; #endif diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 6b95b8a53..f4478d220 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -120,6 +120,8 @@ #include +#include + //#define DEBUG_DO_NOT_BY_ENTER //#define DEBUG_SKETCHER_ENTITIES //#define DEBUG_SKETCH_ENTITIES_ON_MOVE @@ -376,6 +378,8 @@ static bool MyMultiselectionState = true; void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) { + std::wcout << "PartSet_SketcherMgr::onMousePressed BEGIN" << std::endl; + MyModeByDrag = isDragModeCreation(); // Clear dragging mode @@ -384,11 +388,15 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE myMousePoint.setX(theEvent->x()); myMousePoint.setY(theEvent->y()); - if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent)) + if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent)) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END A" << std::endl; return; + } //get2dPoint(theWnd, theEvent, myClickedPoint); - if (!(theEvent->buttons() & Qt::LeftButton)) + if (!(theEvent->buttons() & Qt::LeftButton)) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END B" << std::endl; return; + } ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); ModuleBase_IViewer* aViewer = aWorkshop->viewer(); @@ -397,8 +405,10 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE ModuleBase_OperationFeature* aFOperation = dynamic_cast (getCurrentOperation()); - if (!aFOperation) + if (!aFOperation) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END C" << std::endl; return; + } bool isEditing = aFOperation->isEditOperation(); bool aCanDrag = aViewer->canDragByMouse(); @@ -412,21 +422,26 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE // If the current widget is a selector, do nothing, it processes the mouse press ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); if(anActiveWidget && anActiveWidget->isViewerSelector()) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END D" << std::endl; return; } } // Use only for sketch operations if (myCurrentSketch) { - if (!PartSet_Tools::sketchPlane(myCurrentSketch)) + if (!PartSet_Tools::sketchPlane(myCurrentSketch)) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END E" << std::endl; return; + } bool isSketcher = isSketchOperation(aFOperation); bool isSketchOpe = isNestedSketchOperation(aFOperation); // Avoid non-sketch operations - if ((!isSketchOpe) && (!isSketcher)) + if ((!isSketchOpe) && (!isSketcher)) { + std::wcout << "PartSet_SketcherMgr::onMousePressed END F" << std::endl; return; + } // Ignore creation sketch operation if ((!isSketcher) && (!isEditing)) { @@ -445,6 +460,7 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE aProcessor->mouseReleased(theWnd, theEvent); } } + std::wcout << "PartSet_SketcherMgr::onMousePressed END G" << std::endl; return; } bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier); @@ -455,6 +471,8 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE // commit previous operation if (!aFOperation->commit()) aFOperation->abort(); + + std::wcout << "PartSet_SketcherMgr::onMousePressed END H" << std::endl; return; } // Init flyout point for radius rotation @@ -523,6 +541,7 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE } } } + std::wcout << "PartSet_SketcherMgr::onMousePressed END LAST" << std::endl; } void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) @@ -645,6 +664,7 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) { + std::wcout << "PartSet_SketcherMgr::onMouseMoved START" << std::endl; #ifdef DEBUG_SKETCH_ENTITIES_ON_MOVE CompositeFeaturePtr aSketch = activeSketch(); if (aSketch.get()) { @@ -659,8 +679,10 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve } #endif - if (myModule->sketchReentranceMgr()->processMouseMoved(theWnd, theEvent)) + if (myModule->sketchReentranceMgr()->processMouseMoved(theWnd, theEvent)) { + std::wcout << "PartSet_SketcherMgr::onMouseMoved END A" << std::endl; return; + } ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); XGUI_ModuleConnector* aConnector = dynamic_cast(aWorkshop); @@ -707,9 +729,11 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve // deselected). This flag should be restored in the slot, processed the mouse release signal. ModuleBase_Operation* aCurrentOperation = getCurrentOperation(); if (!aCurrentOperation) { + std::wcout << "PartSet_SketcherMgr::onMouseMoved END B" << std::endl; return; } if (isSketchOperation(aCurrentOperation)) { + std::wcout << "PartSet_SketcherMgr::onMouseMoved END C" << std::endl; return; // No edit operation activated } @@ -720,12 +744,10 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve Handle(V3d_View) aView = theWnd->v3dView(); Point aMousePnt; - get2dPoint(theWnd, theEvent, aMousePnt); + get2dPoint(theWnd, theEvent, aMousePnt, true /*theSnap*/); - std::shared_ptr anOriginalPosition = std::shared_ptr( - new GeomAPI_Pnt2d(myCurrentPoint.myCurX, myCurrentPoint.myCurY)); - std::shared_ptr aCurrentPosition = std::shared_ptr( - new GeomAPI_Pnt2d(aMousePnt.myCurX, aMousePnt.myCurY)); + auto anOriginalPosition = std::shared_ptr(new GeomAPI_Pnt2d(myCurrentPoint.myCurX, myCurrentPoint.myCurY)); + auto aCurrentPosition = std::shared_ptr(new GeomAPI_Pnt2d(aMousePnt.myCurX, aMousePnt.myCurY)); // 3. the flag to disable the update viewer should be set in order to avoid blinking in the // viewer happens by deselect/select the modified objects. The flag should be restored after @@ -758,8 +780,7 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve aPoint->attributeType() == GeomDataAPI_Point2DArray::typeId()) { bool isImmutable = aPoint->setImmutable(true); - std::shared_ptr aMessage = std::shared_ptr - (new ModelAPI_ObjectMovedMessage(this)); + auto aMessage = std::shared_ptr(new ModelAPI_ObjectMovedMessage(this)); aMessage->setMovedAttribute(aPoint, anAttIt->second); aMessage->setOriginalPosition(anOriginalPosition); aMessage->setCurrentPosition(aCurrentPosition); @@ -773,11 +794,9 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve } else { // Process selection by feature - std::shared_ptr aSketchFeature = - std::dynamic_pointer_cast(aFeature); + auto aSketchFeature = std::dynamic_pointer_cast(aFeature); if (aSketchFeature) { - std::shared_ptr aMessage = std::shared_ptr - (new ModelAPI_ObjectMovedMessage(this)); + auto aMessage = std::shared_ptr(new ModelAPI_ObjectMovedMessage(this)); aMessage->setMovedObject(aFeature); aMessage->setOriginalPosition(anOriginalPosition); aMessage->setCurrentPosition(aCurrentPosition); @@ -806,8 +825,11 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve #endif myDragDone = true; + get2dPoint(theWnd, theEvent, aMousePnt, true /*theSnap*/); myCurrentPoint = aMousePnt; } + + std::wcout << "PartSet_SketcherMgr::onMouseMoved END LAST" << std::endl; } void PartSet_SketcherMgr::onMouseDoubleClick(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) @@ -892,14 +914,19 @@ void PartSet_SketcherMgr::onAfterContextMenu() myIsPopupMenuActive = false; } -void PartSet_SketcherMgr::get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, - Point& thePoint) +void PartSet_SketcherMgr::get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, Point& thePoint, bool theSnap) { - Handle(V3d_View) aView = theWnd->v3dView(); - gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), aView); - double aX, anY; - PartSet_Tools::convertTo2D(aPoint, myCurrentSketch, aView, aX, anY); - thePoint.setValue(aX, anY); + + double aX = 0, aY = 0; // Coords at sketch plane. + bool success = PartSet_MouseProcessor::convertPointToLocal(workshop()->moduleConnector(), myCurrentSketch, theWnd, theEvent->pos(), aX, aY, theSnap, true, true); + if (!success) + return; + + //Handle(V3d_View) aView = theWnd->v3dView(); + //gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), aView); + //double aX, anY; + //PartSet_Tools::convertTo2D(aPoint, myCurrentSketch, aView, aX, anY); + thePoint.setValue(aX, aY); } void PartSet_SketcherMgr::launchEditing() diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 312021601..9b4e8ac3c 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -427,8 +427,9 @@ private: /// Converts mouse position to 2d coordinates. /// Member myCurrentSketch has to be correctly defined + /// \param theSnap If true and snapping is enabled, snaps coordinates to the grid. void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, - Point& thePoint); + Point& thePoint, bool theSnap = true); /// Show distance value editor if it is a distance operation and all attribute references /// are filled by preseletion diff --git a/src/PartSet/PartSet_WidgetBSplinePoints.cpp b/src/PartSet/PartSet_WidgetBSplinePoints.cpp index 192078248..a05ad5d82 100644 --- a/src/PartSet/PartSet_WidgetBSplinePoints.cpp +++ b/src/PartSet/PartSet_WidgetBSplinePoints.cpp @@ -562,6 +562,7 @@ void PartSet_WidgetBSplinePoints::mouseMoved(ModuleBase_IViewWindow* theWindow, theWindow, theEvent->pos(), aX, aY, + true, true ); diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index dfaccf2ed..51d4dbf6e 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -82,6 +82,8 @@ #include #include +#include + const double MaxCoordinate = 1e12; static QStringList MyFeaturesForCoincedence; @@ -134,6 +136,8 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, bool PartSet_WidgetPoint2D::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue) { + std::wcout << "PartSet_WidgetPoint2D::isValidSelectionCustom BEGIN" << std::endl; + PartSet_Module* aModule = dynamic_cast(myWorkshop->module()); if (aModule->sketchReentranceMgr()->isInternalEditActive()) return true; /// when internal edit is started a new feature is created. I has not results, AIS @@ -189,6 +193,8 @@ bool PartSet_WidgetPoint2D::isValidSelectionForAttribute_( const ModuleBase_ViewerPrsPtr& theValue, const AttributePtr& theAttribute) { + std::wcout << "PartSet_WidgetPoint2D::isValidSelectionForAttribute_ BEGIN" << std::endl; + bool aValid = false; // stores the current values of the widget attribute @@ -216,6 +222,8 @@ bool PartSet_WidgetPoint2D::isValidSelectionForAttribute_( bool PartSet_WidgetPoint2D::setSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue) { + std::wcout << "PartSet_WidgetPoint2D::setSelectionCustom BEGIN" << std::endl; + bool isDone = false; GeomShapePtr aShape = theValue->shape(); if (aShape.get() && !aShape->isNull()) { @@ -236,6 +244,8 @@ bool PartSet_WidgetPoint2D::setSelectionCustom(const ModuleBase_ViewerPrsPtr& th bool PartSet_WidgetPoint2D::resetCustom() { + std::wcout << "PartSet_WidgetPoint2D::resetCustom BEGIN" << std::endl; + bool aDone = false; if (!isUseReset() || isComputedDefault() /*|| myXSpin->hasVariable() || myYSpin->hasVariable()*/) { @@ -273,6 +283,8 @@ PartSet_WidgetPoint2D::~PartSet_WidgetPoint2D() bool PartSet_WidgetPoint2D::setSelection(QList& theValues, const bool theToValidate) { + std::wcout << "PartSet_WidgetPoint2D::setSelection BEGIN" << std::endl; + bool isDone = false; if (theValues.empty()) return isDone; @@ -304,6 +316,8 @@ bool PartSet_WidgetPoint2D::setSelection(QList& theValu bool PartSet_WidgetPoint2D::setPoint(double theX, double theY) { + std::wcout << "PartSet_WidgetPoint2D::setPoint BEGIN" << std::endl; + if (fabs(theX) >= MaxCoordinate) return false; if (fabs(theY) >= MaxCoordinate) @@ -321,6 +335,8 @@ bool PartSet_WidgetPoint2D::setPoint(double theX, double theY) bool PartSet_WidgetPoint2D::storeValueCustom() { + std::wcout << "PartSet_WidgetPoint2D::storeValueCustom BEGIN" << std::endl; + std::shared_ptr aData = myFeature->data(); if (!aData || !aData->isValid()) // can be on abort of sketcher element return false; @@ -363,11 +379,15 @@ bool PartSet_WidgetPoint2D::storeValueCustom() bool PartSet_WidgetPoint2D::restoreValueCustom() { + std::wcout << "PartSet_WidgetPoint2D::restoreValueCustom BEGIN" << std::endl; + std::shared_ptr aData = myFeature->data(); AttributePoint2DPtr aPoint = std::dynamic_pointer_cast( aData->attribute(attributeID())); + double aValueX = aPoint->isInitialized() ? aPoint->x() : 0.; double aValueY = aPoint->isInitialized() ? aPoint->y() : 0.; + myXSpin->setValue(aValueX); myYSpin->setValue(aValueY); @@ -376,6 +396,8 @@ bool PartSet_WidgetPoint2D::restoreValueCustom() void PartSet_WidgetPoint2D::storeCurentValue() { + std::wcout << "PartSet_WidgetPoint2D::storeCurentValue BEGIN" << std::endl; + // do not use cash if a variable is used //if (myXSpin->hasVariable() || myYSpin->hasVariable()) // return; @@ -389,6 +411,8 @@ void PartSet_WidgetPoint2D::storeCurentValue() bool PartSet_WidgetPoint2D::restoreCurentValue() { + std::wcout << "PartSet_WidgetPoint2D::restoreCurentValue BEGIN" << std::endl; + bool aRestoredAndHidden = true; bool isVisible = myIsFeatureVisibleInCash; @@ -415,6 +439,8 @@ bool PartSet_WidgetPoint2D::restoreCurentValue() QList PartSet_WidgetPoint2D::getControls() const { + std::wcout << "PartSet_WidgetPoint2D::getControls BEGIN" << std::endl; + QList aControls; aControls.append(myXSpin); aControls.append(myYSpin); @@ -424,6 +450,8 @@ QList PartSet_WidgetPoint2D::getControls() const //******************************************************************** void PartSet_WidgetPoint2D::selectionModes(int& theModuleSelectionModes, QIntList& theModes) { + std::wcout << "PartSet_WidgetPoint2D::selectionModes BEGIN" << std::endl; + theModuleSelectionModes = -1; theModes << TopAbs_VERTEX; theModes << TopAbs_EDGE; @@ -432,6 +460,8 @@ void PartSet_WidgetPoint2D::selectionModes(int& theModuleSelectionModes, QIntLis //******************************************************************** void PartSet_WidgetPoint2D::activateCustom() { + std::wcout << "PartSet_WidgetPoint2D::activateCustom BEGIN" << std::endl; + if (!isEditingMode()) { FeaturePtr aFeature = feature(); if (aFeature.get() && aFeature->getKind() == SketchPlugin_Point::ID()) @@ -445,6 +475,8 @@ void PartSet_WidgetPoint2D::setHighlighted(bool isHighlighted) void PartSet_WidgetPoint2D::deactivate() { + std::wcout << "PartSet_WidgetPoint2D::deactivate BEGIN" << std::endl; + // the value of the control should be stored to model if it was not // initialized yet. It is important when we leave this control by Tab key. // It should not be performed by the widget activation as the preview @@ -459,6 +491,8 @@ void PartSet_WidgetPoint2D::deactivate() bool PartSet_WidgetPoint2D::setConstraintToPoint(double theClickedX, double theClickedY, const std::shared_ptr& theValue) { + std::wcout << "PartSet_WidgetPoint2D::setConstraintToPoint BEGIN" << std::endl; + AttributeRefAttrPtr aRefAttr = attributeRefAttr(); if (aRefAttr.get()) fillRefAttribute(theClickedX, theClickedY, theValue); @@ -499,6 +533,8 @@ bool PartSet_WidgetPoint2D::setConstraintToPoint(double theClickedX, double theC bool PartSet_WidgetPoint2D::setConstraintToObject(const ObjectPtr& theObject) { + std::wcout << "PartSet_WidgetPoint2D::setConstraintToObject BEGIN" << std::endl; + AttributeRefAttrPtr aRefAttr = attributeRefAttr(); if (aRefAttr.get()) { fillRefAttribute(theObject); @@ -571,7 +607,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo } } if (!aHasPoint) { - bool success = convertPointToLocal(myWorkshop, mySketch, theWindow, theEvent->pos(), aX, aY, false); + bool success = PartSet_MouseProcessor::convertPointToLocal(myWorkshop, mySketch, theWindow, theEvent->pos(), aX, aY, true, false); if (!success) return; } @@ -581,6 +617,8 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo void PartSet_WidgetPoint2D::processSelection(const ModuleBase_ViewerPrsPtr& theValue, double theX, double theY) { + std::wcout << "PartSet_WidgetPoint2D::processSelection BEGIN" << std::endl; + if (!setPoint(theX, theY)) return; // if we have selection and use it @@ -723,6 +761,8 @@ void PartSet_WidgetPoint2D::setPreSelection( ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) { + std::wcout << "PartSet_WidgetPoint2D::setPreSelection BEGIN" << std::endl; + myPreSelected = thePreSelected; mouseReleased(theWnd, theEvent); } @@ -736,13 +776,17 @@ void PartSet_WidgetPoint2D::getGeomSelection_(const std::shared_ptr(myWorkshop->module()); - if (isEditingMode() || aModule->sketchReentranceMgr()->isInternalEditActive()) + if (isEditingMode() || aModule->sketchReentranceMgr()->isInternalEditActive()) { + std::wcout << "PartSet_WidgetPoint2D:::mouseMoved if (isEditingMode() || aModule->sketchReentranceMgr()->isInternalEditActive()) BEGIN" << std::endl; return; + } double aX = 0, aY = 0; // Coords at sketch plane. - bool success = convertPointToLocal(myWorkshop, mySketch, theWindow, theEvent->pos(), aX, aY, true, true); + bool success = PartSet_MouseProcessor::convertPointToLocal(myWorkshop, mySketch, theWindow, theEvent->pos(), aX, aY, true, true, true); if (!success) return; @@ -769,6 +813,8 @@ double PartSet_WidgetPoint2D::y() const bool PartSet_WidgetPoint2D::isFeatureContainsPoint(const FeaturePtr& theFeature, double theX, double theY) { + std::wcout << "PartSet_WidgetPoint2D:::isFeatureContainsPoint BEGIN" << std::endl; + bool aPointIsFound = false; if (feature()->getKind() != SketchPlugin_Line::ID())