+ /// Converts mouse position to 2d coordinates.
+ /// Member myCurrentSketch has to be correctly defined
+ void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent,
+ Point& thePoint);
+
+ typedef QList<AttributePtr> AttributeList;
+ typedef QMap<FeaturePtr, AttributeList> FeatureToAttributesMap;
+ typedef std::map<FeaturePtr, std::pair<std::set<AttributePtr>, std::set<ResultPtr> > >
+ FeatureToSelectionMap;
+ /// Obtains the current selection of the object in the workshop viewer by a map of feature to attributes
+ /// It calls the next method for each feature
+ /// \param theFeatureToAttributes a map of feature to attributes
+ /// \param theSketch a current sketch feature
+ /// \param theWorkshop a workshop to have an access to AIS context and displayer
+ /// \param theSelection a container for the selection, to save results and attributres for a feature
+ static void getCurrentSelection(const FeatureToAttributesMap& theFeatureToAttributes,
+ const FeaturePtr& theSketch,
+ ModuleBase_IWorkshop* theWorkshop,
+ FeatureToSelectionMap& theSelection);
+
+ /// Obtains the current selection of the object in the workshop viewer
+ /// It includes the selection in all modes of activation, even local context - vertices, edges
+ /// It gets all results of the feature, find an AIS object in the viewer and takes all BRep
+ /// selection owners. If the owner is vertex, the corresponded attribute is seached in
+ /// the feature, if the owner is edge, the current result is added to the container of results.
+ /// \param theFeature a feature or result object
+ /// \param theSketch a current sketch feature
+ /// \param theWorkshop a workshop to have an access to AIS context and displayer
+ /// \param theSelection a container for the selection, to save results and attributres for a feature
+ static void getCurrentSelection(const FeaturePtr& theFeature,
+ const FeaturePtr& theSketch,
+ ModuleBase_IWorkshop* theWorkshop,
+ FeatureToSelectionMap& theSelection);
+
+ /// Applyes the current selection to the object in the workshop viewer
+ /// It includes the selection in all modes of activation, even local context - vertexes, edges
+ /// It gets all results of the feature, find an AIS object in the viewer and takes all BRep
+ /// selection owners. If the owner is vertex, the corresponded attribute is seached in
+ /// the feature and if it is in the container of selected attributes, the owner is put in the
+ /// out container. If the owner is edge and the current result is in the container of selected
+ /// results, the owner is put in the out container.
+ /// \param theFeature a feature or result object
+ /// \param theSketch a current sketch feature
+ /// \param theWorkshop a workshop to have an access to AIS context and displayer
+ /// \param theSelection a container of the selection, it has results and attributres for a feature
+ /// \param theOwnersToSelect an out container of found owners
+ static void getSelectionOwners(const FeaturePtr& theFeature,
+ const FeaturePtr& theSketch,
+ ModuleBase_IWorkshop* theWorkshop,
+ const FeatureToSelectionMap& theSelection,
+ SelectMgr_IndexedMapOfOwner& anOwnersToSelect);