From 858b88250eb0c8edcab15354c87626de08ece957 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 23 Aug 2019 18:18:03 +0300 Subject: [PATCH] Issue #2957: Provide help page for Selection by filters --- src/CollectionPlugin/doc/groupFeature.rst | 37 +---- src/Config/Config_FeatureReader.cpp | 8 +- src/Config/plugins.xml.in | 2 +- src/FiltersPlugin/CMakeLists.txt | 6 +- src/FiltersPlugin/doc/FiltersPlugin.rst | 138 ++++++++++++++++++ .../doc/images/add.png | Bin .../doc/images/delete.png | Bin .../doc/images/reverce.png | Bin .../doc/images/selection_by_filters.png | Bin .../doc/images/selection_by_filters_added.png | Bin src/FiltersPlugin/plugin-Filters.xml | 3 +- 11 files changed, 152 insertions(+), 42 deletions(-) create mode 100644 src/FiltersPlugin/doc/FiltersPlugin.rst rename src/{CollectionPlugin => FiltersPlugin}/doc/images/add.png (100%) rename src/{CollectionPlugin => FiltersPlugin}/doc/images/delete.png (100%) rename src/{CollectionPlugin => FiltersPlugin}/doc/images/reverce.png (100%) rename src/{CollectionPlugin => FiltersPlugin}/doc/images/selection_by_filters.png (100%) rename src/{CollectionPlugin => FiltersPlugin}/doc/images/selection_by_filters_added.png (100%) diff --git a/src/CollectionPlugin/doc/groupFeature.rst b/src/CollectionPlugin/doc/groupFeature.rst index 1522bf7e0..436653e02 100644 --- a/src/CollectionPlugin/doc/groupFeature.rst +++ b/src/CollectionPlugin/doc/groupFeature.rst @@ -3,6 +3,8 @@ .. |minus.icon| image:: images/reverce.png .. |delete.icon| image:: images/delete.png +.. _groupPage: + Group ===== @@ -43,45 +45,12 @@ Input fields: - The list of selected entities of the given type. Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item. -- **Selection by filters** button opens "selection by filters" property panel and allows to select entities by set of selected filters. +- **Selection by filters** button opens "selection by filters" property panel and allows to select entities by set of selected filters. For details on filters see :ref:`filtersPlugin` - **Show only** button allows to hide all other objects and shapes and show only selected ones. - Control **Add elements that share the same topology** allows to add automatically all elements laying on the same topology that was selected and remove these elements if they have disappeared due to the parametrical update. They will be represented as one line in the list of selection and managed in the viewer as one object if this flag is enabled. If flag becomes disabled when such elements are already in the list, they will become divided in one line per one shape. -**Selection by filters** - -If user presses this button then following property panel appears. - -.. image:: images/selection_by_filters.png - :align: center - -.. centered:: - Selection by filters property panel - -In this panel: - -- **Filters** a panel for added filters. - -- **Add new filter** combo box. It contains accessible filters according to the selection mode defined in **Group** property panel. When user selects an item from this combo box a filter item appears in **Filters** panel like in the following example: - -.. image:: images/selection_by_filters_added.png - :align: center - -.. centered:: - Filters **Horizontal faces** and **On plane** added to the property panel. - -Each filter item can be deleted with help of |delete.icon| button. A filter can be reverced with help of toggle button |plus.icon|/|minus.icon|. Also a filter could have input fields in case -if the filter has arguments. - -- **Select** button traverces all objects of a current document and selects entities acceptable by currently defined set of filters. All selected entities will be shown in viewer 3d with -blue semi-transparent color. Any modification in filters clears current selection. - -- **Number of selected objects** shows number currently selected entities. - -- **Show only** check box lets to hide all non-selected objects. - -**Accept** button in the **Selection by filters** property panel reopens **Group** property panel again and transfers all selected entities to the corresponded list. **TUI Command**: diff --git a/src/Config/Config_FeatureReader.cpp b/src/Config/Config_FeatureReader.cpp index 16da267c6..072e61c01 100644 --- a/src/Config/Config_FeatureReader.cpp +++ b/src/Config/Config_FeatureReader.cpp @@ -174,6 +174,11 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode, bool isInternal = getBooleanAttribute(theFeatureNode, ATTR_INTERNAL, false); outFeatureMessage->setInternal(isInternal); + + std::string aHelpFile = getProperty(theFeatureNode, HELP_FILE); + if (!aHelpFile.empty()) + outFeatureMessage->setHelpFileName(myLibraryName + "/" + aHelpFile); + if (isInternal) { //Internal feature has no visual representation. return; @@ -188,9 +193,6 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode, //outFeatureMessage->setTooltip(aToolTip); outFeatureMessage->setIcon(getProperty(theFeatureNode, FEATURE_ICON)); outFeatureMessage->setKeysequence(getProperty(theFeatureNode, FEATURE_KEYSEQUENCE)); - std::string aHelpFile = getProperty(theFeatureNode, HELP_FILE); - if (!aHelpFile.empty()) - outFeatureMessage->setHelpFileName(myLibraryName + "/" + aHelpFile); std::string aGroupName = restoreAttribute(NODE_GROUP, _ID); std::string aWBNName = restoreAttribute(NODE_WORKBENCH, _ID); diff --git a/src/Config/plugins.xml.in b/src/Config/plugins.xml.in index 87476727f..77c60c23c 100644 --- a/src/Config/plugins.xml.in +++ b/src/Config/plugins.xml.in @@ -19,7 +19,7 @@ @ALL_SOLVERS@ --> - +