View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031221 | Open CASCADE | OCCT:Visualization | public | 2019-12-05 10:52 | 2020-12-02 17:12 |
Reporter | nds | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031221: Visualization - selection filter in context should provide AND option | ||||
Description | AIS_InteractiveContext has the root filter is "Or", but we need in application use "And" combination of filters. To provide "And" combination, we need to add into context auxilliary "And" filter above all our filters and work with it, not context. It seems to be more convenient to change root filter in context for it as we need not "Or" combination at all. At the same time, the root "Or" filter of context has some code for hidden object, that works like "And" filter indeed. | ||||
Tags | No tags attached. | ||||
Test case number | bugs/vis/bug31221 | ||||
|
Branch CR31221 has been created by nds. SHA-1: 16f4a95907234a9b062cb26a00882beaa2f75645 Detailed log of new commits: Author: nds Date: Fri Dec 13 10:55:35 2019 +0300 0031221: Visualization - selection filter in context |
|
Branch CR31221_1 has been created by nds. SHA-1: 0ef1e0394c44f7cb1753634f53e6ef0e8cda86ad Detailed log of new commits: Author: nds Date: Sun Dec 8 18:57:34 2019 +0300 0031221: Visualization - selection filter in context |
|
Branch CR31221_2 has been created by nds. SHA-1: 3174da6d89ae1646c8a3b9c05db68ab98933488e Detailed log of new commits: Author: sshutina Date: Fri Dec 13 16:27:51 2019 +0300 0031221: Visualization - selection filter in context |
|
Dear Svetlana could you please take care about the issue. Please, provide some visual image with a scheme of the previous and the current filters architecture. The current branch is CR31221_2. Thank you in advance, Natalia |
|
Branch CR31221_3 has been created by sshutina. SHA-1: 61754b77f34ab59b76e2f7a057b53ca099ae8672 Detailed log of new commits: Author: sshutina Date: Wed Sep 9 14:13:16 2020 +0300 0031221: Visualization - selection filter in context |
|
Dear Kirill, could you please review CR31221_3. Thank you in advance, Svetlana. |
|
+ SelectMgr_FilterReaction_Highlight = 0x0001, //!< the reaction to highlght presentation (MoveTo) + SelectMgr_FilterReaction_Select = 0x0002, //!< the reaction to highlght presentation (Select) Please move out this change to dedicated patch (or reject). |
|
Branch CR31221_3 has been updated by sshutina. SHA-1: f37a27a0fa8081d348a7df603cedb017c8811de9 Detailed log of new commits: Author: sshutina Date: Wed Sep 9 22:53:11 2020 +0300 0031221: Visualization - selection filter in context |
|
Branch CR31221_3 has been updated by sshutina. SHA-1: 25257d8da5f1ff30275393d5f9b47b65e3864141 Detailed log of new commits: Author: sshutina Date: Thu Sep 10 07:37:01 2020 +0300 0031221: Visualization - selection filter in context - Added the new selection filter type - SelectMgr_AndFilter to provide "And" combination for two or more types of entity - To use SelectMgr_AndFilter it's necessary to call context->SetFilter (new SelectMgr_AndFilter) - SelectMgr_OrFilter - default filter - Added class SelectMgr_DisabledObjectsFilter to provide the disabling selection of the specified objects - Added the test |
|
Branch CR31221_4 has been created by sshutina. SHA-1: adf7cdf130661f5d75005d0c80ef8d1be7b2300a Detailed log of new commits: Author: sshutina Date: Thu Sep 10 09:03:22 2020 +0300 0031221: Visualization - selection filter in context - Added the parent composition filter which consists the active filters - To use SelectMgr_AndFilter it's necessary to call context->SetFilter (new SelectMgr_AndFilter) - SelectMgr_OrFilter - default filter - Added class SelectMgr_DisabledObjectsFilter to provide the disabling selection of the specified objects - Added the root filter (SelectMgr_AndFilter) which consists the list of the non-selectable objects and the parent composition filter. - Added the test (cherry picked from commit 25257d8da5f1ff30275393d5f9b47b65e3864141) |
|
Dear Kirill, could you please review CR31221_4. Thank you in advance, Svetlana. |
|
Branch CR31221_4 has been updated by sshutina. SHA-1: 48d1657eeda2d1208a49123f2c57cd5e650e6f6f Detailed log of new commits: Author: sshutina Date: Thu Sep 10 13:22:49 2020 +0300 0031221: Visualization - selection filter in context - Added the parent composition filter which consists the active filters - To use SelectMgr_AndFilter it's necessary to call context->SetFilter (new SelectMgr_AndFilter) - SelectMgr_OrFilter - default filter - Added class SelectMgr_DisabledObjectsFilter to provide the disabling selection of the specified objects - Added the root filter (SelectMgr_AndFilter) which consists the list of the non-selectable objects and the parent composition filter. - Added the test |
|
SelectMgr_OrFilter, SelectMgr_AndFilter, SelectMgr_CompositionFilter AIS_InteractiveContext::SetCompositionFilter() As far as I understand the main issue of the bug is that it is wanted using And instead of Or as a composition filter in AIS_InteractiveContext. Wouldn't it be simpler defining SelectMgr_AndOrFilter which behavior could be switched by a Boolean flag and propagate it to AIS_InteractiveContext? Or there is indeed some scenarios, where application would like to put a custom composition filter? + //! It is impossible to nullify the default context filter, do nothing in this case. + Standard_EXPORT void SetCompositionFilter (const Handle(SelectMgr_CompositionFilter)& theFilter); I think it will be more clear raising an exception on attempt to set a NULL filter here. |
|
Branch CR31221_5 has been created by sshutina. SHA-1: a3c2208daddb93b8272c774ec8c318b96b0c4e77 Detailed log of new commits: Author: sshutina Date: Thu Sep 10 13:47:36 2020 +0300 0031221: Visualization - selection filter in context - Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used. - To choose the context filter set SetUseOrFilter in the AIS_InteractiveContext - Added the test - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter |
|
Testing: http://jenkins-test-12.nnov.opencascade.com/view/CR31221_5-master-sshutina/view/ALL/ |
|
+ Standard_Boolean myIsUseOrFilter; //!< flag to use OR selection filter. Please use an enumeration instead of a Boolean flag - such flag is very confusing in case of and/or pair. + Standard_EXPORT void SetUseOrFilter (const Standard_Boolean theUseOrFilter) { myIsUseOrFilter = theUseOrFilter; } Please remove redundant Standard_EXPORT from this and other inline methods. + //! Constructs an empty or selection filter. + Standard_EXPORT SelectMgr_AndOrFilter(); Please define constructor taking and/or parameter. +#include <Standard_Boolean.hxx> +#include <SelectMgr_CompositionFilter.hxx> + +class SelectMgr_EntityOwner; +class SelectMgr_CompositionFilter; +class SelectMgr_AndOrFilter; These forward declarations look redundant. +++ b/src/SelectMgr/SelectMgr_AndOrFilter.hxx @@ -0,0 +1,65 @@ +// +// This file is part of Open CASCADE Technology software library. Copyright date is missing for new file. + TCollection_AsciiString aVal (theArgv[++anArgIter]); + if (aVal == "AND") + { + aContext->SetUseOrFilter (Standard_False); + } + else + { + aContext->SetUseOrFilter (Standard_True); + } Please use case-insensitive check here and do not tolerate errors in "OR" option - print a syntax error in this case. + "\n use value AND. (OR by default)" Brackets normally come before the dot closing a sentence. +if { $aNbSelected != 0 } { puts "Error: combined filter("AND" filter) was not applied" } Do unescaped nested quotes really works in Tcl script? + //! Selection aren't applyied for this objects. selection is not applied to these objects. + SelectMgr_ListIteratorOfListOfFilter anIter(myFilters); + for ( ; anIter.More();anIter.Next()) Please put iterator variable into for(;;) header. - //! Returns the list of filters active in a local context. Standard_EXPORT const SelectMgr_ListOfFilter& Filters() const; Please provide description for this method. +#include <SelectMgr_AndOrFilter.hxx> -class SelectMgr_OrFilter; +class SelectMgr_AndOrFilter; Either forward declaration or include should be removed. |
|
Branch CR31221_5 has been updated by sshutina. SHA-1: b9db12539617fff73c6b1d5a3bf72a8d6c265f05 Detailed log of new commits: Author: sshutina Date: Thu Sep 10 21:32:07 2020 +0300 #correct remarks - Added the enumeration SelectMgr_FilterType provides filter types - To define behavior SelectMgr_AndOrFilter use SetFilterType in AIS_InteractiveContext |
|
Branch CR31221_6 has been created by sshutina. SHA-1: eca00616454f8c71034082ab735eba1442fabbc2 Detailed log of new commits: Author: sshutina Date: Thu Sep 10 21:45:20 2020 +0300 0031221: Visualization - selection filter in context - Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used - Added the enumeration SelectMgr_FilterType provides filter types - To define behavior SelectMgr_AndOrFilter use SetFilterType in AIS_InteractiveContext - Added the test - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter |
|
http://jenkins-test-12.nnov.opencascade.com/view/CR31221_6-master-sshutina/view/ALL/ |
|
+SelectMgr_AndOrFilter::SelectMgr_AndOrFilter(): +myFilterType (SelectMgr_FilterType_OR) Please remove ambiguous and useless constructor. + Standard_EXPORT Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE; Please add "virtual" and rename anobj -> theOwner. + //! Selection isn't applyied for this objects. Misprint is still there. |
|
Branch CR31221_6 has been updated by sshutina. SHA-1: 1d791821f97215e1470302f14ef64513fa53b8ea Detailed log of new commits: Author: sshutina Date: Fri Sep 11 11:53:38 2020 +0300 #fix remarks |
|
Branch CR31221_7 has been created by sshutina. SHA-1: 7f2997653983eb800f4bde5076ae3653b282fe87 Detailed log of new commits: Author: sshutina Date: Fri Sep 11 12:14:58 2020 +0300 0031221: Visualization - selection filter in context - Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used - Added the enumeration SelectMgr_FilterType provides filter types - To define behavior SelectMgr_AndOrFilter use SetFilterType in AIS_InteractiveContext - Added the test - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter |
|
Branch CR31221_7 has been updated forcibly by sshutina. SHA-1: 08f41809421bbce4a3ec439a34ffaa152ddd0e49 |
|
Please raise the patch - OCCT branch: CR31221_7. |
|
Combination - OCCT branch : IR-2020-09-11 master SHA - d1b25684e9402d995dafec22fb98f83957d5fb76 a206de37fbfa0bf71bd534ae47192bbec23b8522 Products branch : IR-2020-09-11 SHA - a7e55a291cf6642cb4af945a999deeeb5f91272a was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17333.360000000142 / 17325.800000000123 [+0.04%] Products Total CPU difference: 12056.720000000096 / 12079.64000000011 [-0.19%] Windows-64-VC14: OCCT Total CPU difference: 18817.921875 / 18792.46875 [+0.14%] Products Total CPU difference: 13294.09375 / 13274.75 [+0.15%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR31221_7 has been deleted by inv. SHA-1: 08f41809421bbce4a3ec439a34ffaa152ddd0e49 |
|
Branch CR31221_6 has been deleted by inv. SHA-1: 1d791821f97215e1470302f14ef64513fa53b8ea |
|
Branch CR31221_5 has been deleted by inv. SHA-1: b9db12539617fff73c6b1d5a3bf72a8d6c265f05 |
|
Branch CR31221_4 has been deleted by inv. SHA-1: 48d1657eeda2d1208a49123f2c57cd5e650e6f6f |
|
Branch CR31221_3 has been deleted by inv. SHA-1: 25257d8da5f1ff30275393d5f9b47b65e3864141 |
|
Branch CR31221_2 has been deleted by inv. SHA-1: 3174da6d89ae1646c8a3b9c05db68ab98933488e |
|
Branch CR31221_1 has been deleted by inv. SHA-1: 0ef1e0394c44f7cb1753634f53e6ef0e8cda86ad |
|
Branch CR31221 has been deleted by inv. SHA-1: 16f4a95907234a9b062cb26a00882beaa2f75645 |
occt: master 897aeb20 2020-09-11 09:14:58
Committer: abv Details Diff |
0031221: Visualization - selection filter in context - Added the new filter SelectMgr_AndOrFilter which allows to define the context filter. By default OR selection filter is used - Added the enumeration SelectMgr_FilterType provides filter types - To define behavior SelectMgr_AndOrFilter use SetFilterType in AIS_InteractiveContext - Added the test - SelectMgr_OrFilter don't store the disabled objects, it's stored in SelectMgr_AndOrFilter |
Affected Issues 0031221 |
|
mod - src/AIS/AIS_InteractiveContext.cxx | Diff File | ||
mod - src/AIS/AIS_InteractiveContext.hxx | Diff File | ||
mod - src/AIS/AIS_InteractiveContext_3.cxx | Diff File | ||
mod - src/SelectMgr/FILES | Diff File | ||
add - src/SelectMgr/SelectMgr_AndOrFilter.cxx | Diff File | ||
add - src/SelectMgr/SelectMgr_AndOrFilter.hxx | Diff File | ||
add - src/SelectMgr/SelectMgr_FilterType.hxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_OrFilter.cxx | Diff File | ||
mod - src/SelectMgr/SelectMgr_OrFilter.hxx | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
add - tests/bugs/vis/bug31221 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-05 10:52 | nds | New Issue | |
2019-12-05 10:52 | nds | Assigned To | => nds |
2019-12-13 10:57 | git | Note Added: 0089487 | |
2020-02-13 01:10 | git | Note Added: 0090506 | |
2020-03-18 09:57 | git | Note Added: 0091004 | |
2020-03-18 10:25 | nds | Note Added: 0091008 | |
2020-03-18 10:25 | nds | Assigned To | nds => sshutina |
2020-09-09 14:13 | git | Note Added: 0094296 | |
2020-09-09 14:15 | sshutina | Note Added: 0094297 | |
2020-09-09 14:15 | sshutina | Assigned To | sshutina => nds |
2020-09-09 14:15 | sshutina | Assigned To | nds => sshutina |
2020-09-09 14:17 | sshutina | Assigned To | sshutina => kgv |
2020-09-09 14:18 | sshutina | Note Edited: 0094297 | |
2020-09-09 14:18 | sshutina | Status | new => resolved |
2020-09-09 17:14 | kgv | Assigned To | kgv => sshutina |
2020-09-09 17:14 | kgv | Status | resolved => assigned |
2020-09-09 17:24 | kgv | Note Added: 0094314 | |
2020-09-10 00:02 | git | Note Added: 0094332 | |
2020-09-10 08:45 | git | Note Added: 0094340 | |
2020-09-10 09:00 | git | Note Added: 0094341 | |
2020-09-10 09:06 | sshutina | Note Added: 0094344 | |
2020-09-10 09:07 | sshutina | Assigned To | sshutina => kgv |
2020-09-10 09:07 | sshutina | Status | assigned => resolved |
2020-09-10 13:35 | git | Note Added: 0094373 | |
2020-09-10 14:19 | kgv | Note Added: 0094375 | |
2020-09-10 14:26 | kgv | Assigned To | kgv => sshutina |
2020-09-10 14:26 | kgv | Status | resolved => feedback |
2020-09-10 17:45 | git | Note Added: 0094396 | |
2020-09-10 17:46 | sshutina | Assigned To | sshutina => kgv |
2020-09-10 17:46 | sshutina | Status | feedback => resolved |
2020-09-10 18:37 | sshutina | Note Added: 0094409 | |
2020-09-10 19:44 | kgv | Note Added: 0094415 | |
2020-09-10 19:44 | kgv | Assigned To | kgv => sshutina |
2020-09-10 19:44 | kgv | Status | resolved => assigned |
2020-09-10 21:38 | git | Note Added: 0094426 | |
2020-09-10 21:42 | git | Note Added: 0094427 | |
2020-09-11 07:42 | sshutina | Note Added: 0094435 | |
2020-09-11 07:42 | sshutina | Assigned To | sshutina => kgv |
2020-09-11 07:42 | sshutina | Status | assigned => resolved |
2020-09-11 11:42 | kgv | Note Added: 0094445 | |
2020-09-11 11:43 | kgv | Assigned To | kgv => sshutina |
2020-09-11 11:43 | kgv | Status | resolved => assigned |
2020-09-11 12:11 | git | Note Added: 0094448 | |
2020-09-11 12:13 | git | Note Added: 0094449 | |
2020-09-11 12:18 | sshutina | Assigned To | sshutina => kgv |
2020-09-11 12:18 | sshutina | Status | assigned => resolved |
2020-09-11 12:26 | git | Note Added: 0094452 | |
2020-09-11 16:40 | kgv | Note Added: 0094481 | |
2020-09-11 16:40 | kgv | Assigned To | kgv => bugmaster |
2020-09-11 16:40 | kgv | Status | resolved => reviewed |
2020-09-11 16:40 | kgv | Summary | Visualization - selection filter in context => Visualization - selection filter in context should provide AND option |
2020-09-13 11:06 | bugmaster | Note Added: 0094548 | |
2020-09-13 11:06 | bugmaster | Status | reviewed => tested |
2020-09-13 11:19 | bugmaster | Test case number | => bugs/vis/bug31221 |
2020-09-13 11:24 |
|
Changeset attached | => occt master 897aeb20 |
2020-09-13 11:24 |
|
Assigned To | bugmaster => abv |
2020-09-13 11:24 |
|
Status | tested => verified |
2020-09-13 11:24 |
|
Resolution | open => fixed |
2020-09-13 11:45 | git | Note Added: 0094569 | |
2020-09-13 11:45 | git | Note Added: 0094570 | |
2020-09-13 11:45 | git | Note Added: 0094572 | |
2020-09-13 11:45 | git | Note Added: 0094574 | |
2020-09-13 11:45 | git | Note Added: 0094578 | |
2020-09-13 11:47 | git | Note Added: 0094613 | |
2020-09-13 11:47 | git | Note Added: 0094614 | |
2020-09-13 11:47 | git | Note Added: 0094622 | |
2020-12-02 16:41 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:12 |
|
Status | verified => closed |