View Issue Details

IDProjectCategoryView StatusLast Update
0023539Open CASCADEOCCT:Visualizationpublic2021-11-26 10:08
ReporterskiAssigned Toaba 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023539: QASelect and QAShiftSelect commands
DescriptionThere different behavior in highlighting after command
QASetChoiceMode EDGE ON
If one edge will be selected by QASelect command (Left Mouse Button) and another edge will be selected by QAShiftSelect command ( Left Mouse Button + Shift Button ),
only second edge will be able for highlighting by QAMoveTo command ( Cursor )

Is this right?
Steps To Reproducepload ALL
pload QAcommands
vinit
box a 10 10 10
vdisplay a
vfit
QASetChoiceMode EDGE ON
QASelect 110 352
QAShiftSelect 29 204

after command
QAMoveTo 110 352
edge will not be highlighted


after command
QAMoveTo 29 204
edge will be highlighted
TagsNo tags attached.
Test case numberbugs vis(004) bug23539_1, bug23539_2

Relationships

related to 0023525 closedkgv Disappearing of highlight in screenshot 
parent of 0023536 closedbugmaster Modes of QASetChoiceMode command 
related to 0023649 closedbugmaster Visualization, AIS_LocalContext - make highlighting of already selected objects consistent with and without Shift modifier 
related to 0023721 closedaba Missing usage hints for vselmode command 
related to 0023526 closedaba Exception after QAMoveTo command 

Activities

san

2012-11-29 15:17

developer   ~0022445

Dear aba,

Could you please find the reason for described behavior in the code?

san

2012-12-12 11:33

developer   ~0022672

QASelect and QAShiftSelect commands to be removed, vselect command to be added to ViewerTest package.

aba

2012-12-17 13:37

developer   ~0022723

1) QASelect, QAShiftSelect commands were replaced with vselect command:

 vselect x y [shift_selection]

where shift_selection is 1 to allow shift selection or 0 for single selection
2) QAMoveTo command was replaced with vmoveto command:

 vmoveto x y

3) QASetChoiceMode command was removed. vselmode command from ViewerTest package can be used instead.
 
 vselmode mode 0/1

4) QAxwd_3d was removed. vdump command can be used instead.

The Git branch CR23539 is ready to be reviewed.
Dear san, please review.

aba

2012-12-18 18:47

developer   ~0022747

The Git branch CR23539 was updated.
1) Returned results of VSelect and VMoveTo functions in case of incorrect usage were changed to 1.
2) In test cases QASelect and QAMoveTo commands were replaced with vselect and vmoveto respectively.

kgv

2012-12-19 10:57

developer   ~0022758

> Standard_Boolean isShiftSelection = Standard_False;
> //shift selection mode was chosen
> if(argc==4 && atoi(argv[3])==1)
> {
> isShiftSelection = Standard_True;
> }
This extra large code block will be more readable in following form:
> const Standard_Boolean isShiftSelection = (argc > 3 && atoi (argv[3]) == 1);

san

2012-12-19 13:41

developer   ~0022767

Last edited: 2012-12-19 14:22

Dear aba,

Please, in addition to the remark by kgv, take into account the following remarks:

- Remove QAUpdateLights command, it is obsolete now
- Remove duplicated vselect and vmoveto commands from tests
- Consider extending vselect command to replace also QASelectRectangle and QAShiftSelectrectangle
- Consider extending vselect (or adding a separate vpolyselect if argument parsing becomes too heavy) command to test polygonal selection
- There seems to be some code duplication between ViewerTest.cxx and ViewerTest_ViewerCommands.cxx related to selection, could you please check this and remove duplicated code if necessary?
- Check if the following QADraw commands have counterparts in ViewerTest and remove QADraw ones if possible (missing ViewerTest commands can be added easily in most cases):
QASetAntialiasing
QAvzfit
QAGetViewCharac
QASetViewCharac
QAAddOrRemoveSelected
QASetZClippingMode
QAwzoom
QAGetCoordinatesWzoom
QANbSelected
QAPurgeDisplay
QACloseLocalContext
QACloseAllContexts
QAIndexOfCurrentLocal
QADisplayedObjects
QARotateV3dView
QAMoveV3dView
QATranslateV3dView
QATurnV3dView
QAPanningV3dView
QASetZoomV3dView
QASetSizeV3dView

aba

2012-12-26 13:55

developer   ~0022847

1) vselect command was extended. Now vselect is enable to perform:
   - single selection
       vselect x y [shift_selection=(1/0)] (shift selection is disabled by default)
   - rectangle selection
        vselect x1 y1 x2 y2 [shift_selection=(1/0)]
   - polygon selection
        vselect x1 y1 x2 y2 ... xn yn [shift_selection=(1/0)]
   
To allow polygon selection additional Select method has been added ViewerTest_ViewerManager.
2) Duplicated vselect and vmove commands were removed from tests
3) Commands removed from QADraw:
  - QASelect, QAShiftSelect, QASelectRectangle, QAShiftSelectRectangle - replaced with vselect
  - QAMoveTo - replaced with vmoveto
  - QASetChoiceMode - vselmode can be used instead
  - QAxwd_3d - vdump can be used instead

  - QAUpdateLights
  - QASetAntialiasing - replaced with vantialiasing command in ViewerTest_ViewerCommands.cxx
  - QAvzfit - vzfit can be used instead
  - QASetViewCharac and QAGetViewCharac - replaced with vviewparams in ViewerTest_ViewerCommands.cxx
  - QAAddOrRemoveSelected - replaced with vchangeselected
  - QAGetZClippingMode and QASetZClippingMode - replaced with vzclipping
  - QAwzoom - replaced with vwzoom in ViewerTest_ViewerCommands.cxx
  - QAGetCoordinatesWzoom
  - QANbSelected - replaced with vnbselected command in ViewerTest package
  - QAPurgeDisplay - replaced with vpurgedisplay in ViewerTest_ViewerCommands.cxx
  - QACloseLocalContext - replaced with vcloselocalcontext
  - QACloseAllContexts - replaced with vcloseallcontexts
  - QAIndexOfCurrentLocal - replaced with vcurrentlocal
  - QADisplayedObjects
  - QARotateV3dView - vrotate can be used instead
  - QAMoveV3dView - replaced with vmoveview
  - QATranslateV3dView - replaced with vtranslateview
  - QATurnV3dView - replaced with vturnview
  - QAPanningV3dView - vpan can be used instead
  - QASetZoomV3dView - vzoom can be used instead
  - QASetSizeV3dView - replaced with vsetviewsize
  
4) Functions deleted in ViewerTest.cxx:
  - Select function as unusable
  - DetectedFromContext function as unusable

aba

2012-12-26 13:55

developer   ~0022848

The Git branch CR23539 was updated.
Dear san, please review.

san

2012-12-26 17:24

developer   ~0022854

Branch CR23539 reviewed with the following remarks:

- src/QADraw/QADraw.cxx:
QAxwd command can be removed, vdump should be used in all tests instead

- src/ViewerTest/ViewerTest_ViewerCommands.cxx:
1. VSelect() function: MoveTo() call is needed only for single-click selection case
2. vselect command help: use "|" to separate alternative argument values instead of "/"
3. VViewParams() function: why error message in case of absent 3D view is different from other modified functions in the same file?
4. VViewParams() function: what is the reason to call anAISView -> V3d_View::SetProj (anAISViewProjX, anAISViewProjY, anAISViewProjZ) twice?
5. VChangeSelected() function: the command name is not veditselected but vchangeselected.
6. VChangeSelected() function: is it really necessary to call anAISCtx->InitSelected() and anAISCtx->InitCurrent() before changing the current selection?
7. VZClipping() function: why not get/set also Z clipping depth and width here?
8. Vwzoom() function: obviously, it is here by mistake. To be removed from ViewerTest. Instead, wzoom command should be extended by the arguments that let the user define the zoom rectangle non-interactively.
9. VPurgeDisplay() function usage string: use "|" to separate alternative argument values instead of "/".
10. VMoveView() function usage string: use "|" to separate alternative argument values instead of "/".
11. VTranslateView() function usage string: use "|" to separate alternative argument values instead of "/".
12. VTurnView() function usage string: use "|" to separate alternative argument values instead of "/".
13. VCloseLocalContext(), VIndexOfCurrentLocal(), VCloseAllContexts(): do we really need them? Normally, all ViewerTest commands manage the local context internally. Moreover, there is no command to open a local context. Could you please review the related test cases and try to understand why such commands are used explicitly?

tests/bugs/mesh/end:
pload QAcommands - is it needed now?

Please, check all tests: vviewcharac command name is used many times but there is no such command, probably vviewparams is meant?

aba

2012-12-27 17:37

developer   ~0022872

The Git branch CR23539 was updated.

1) QAxwd command was removed from QADraw
2) Commands from ViewerTest_ViewerCommands.cxx were updated according to remarks above.
3) vzclipping command was extended:
  now it is able to get Zclipping mode, width and depth and to set:
  - mode
  - width and depth
  - mode, width and depth
4) vwzoom command was removed from ViewerTest package. wzoom draw command was extended. Now it allows to set zoom coordinates as command parameters.
5) VCloseLocalContext(), VIndexOfCurrentLocal(), VCloseAllContexts() were removed from ViewerTest.
  To close local contexts vselmode 0 1 can be used instead.
6)Names of commands in tests were corrected.

Dear san, please review.

san

2013-01-09 21:41

developer   ~0022922

Branch CR23539 reviewed with the following remarks:

src/Draw/Draw_GraphicCommands.cxx:
Help string for wzoom command:
"wzoom [view-id X1 Y1 X2 Y2] - zoom on a window"
does not look clear.
Something like this:
"wzoom [view-id X1 Y1 X2 Y2] - fits the contents of a given rectangle into a view window. The view window and rectangle corners are specified through the arguments or selected interactively by the user if no arguments are given."
would be more informative, wouldn't it?

src/ViewerTest/ViewerTest_EventManager.cdl:
Please correct indentation in "uses" clause.

src/ViewerTest/ViewerTest_EventManager.cxx:
void ViewerTest_EventManager::Select(const TColgp_Array1OfPnt2d& thePolyline),
void ViewerTest_EventManager::ShiftSelect(const TColgp_Array1OfPnt2d& thePolyline) - aPolylist local variable is needed for NIS part only, so it should be moved completely into corresponding "if" block.

void ViewerTest_EventManager::ShiftSelect(const TColgp_Array1OfPnt2d& thePolyline) - the method's header is copied from Select(), to be corrected.

tests/bugs/vis/bug597_* test cases: does it make sense to execute "vmoveto x y" just before "vselect x y"? Most likely "vselect x y" is enough.

General remark: could you please check there are test cases that tests polygonal selection, and create them if they are missing?

aba

2013-01-10 15:55

developer   ~0022932

The Git branch CR23539 was updated according to last remarks.
1) Help string for 'wzoom' were corrected.
2) In src/ViewerTest/ViewerTest_EventManager.cdl file indentation was corrected.
3) In src/ViewerTest/ViewerTest_EventManager.cxx file:
  3.1) in 'Select' and 'ShiftSelect' methods for polygonal selection 'aPolylist' local variable was moved inside 'if' block.
  3.2) Header of 'ShiftSelect' method for polygonal selection was corrected to proper one.
4) In tests/bugs/vis/bug597_1 - bug597_7 test cases:
excess 'vmove' command calls before 'vselect' were removed.
5) Test cases
tests/bugs/vis/bug23539_1 for polygonal selection
and tests/bugs/vis/bug23539_2 for shift polygonal selection were added.

Dear san, please review.

san

2013-01-10 22:27

developer   ~0022936

Branch CR23539 reviewed without remarks, ready for testing.

san

2013-01-17 14:33

developer   ~0023000

Why this issue has been suspended? Please proceed with integration.

mkv

2013-01-17 18:42

tester   ~0023012

Dear BugMaster,

Branch CR23539 (and products from GIT master) was compiled on Linux and
Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
bugs vis(004) bug23539_1, bug23539_2 - OK.

Modified test cases:
bugs vis(004) bug60 bug61 bug71 bug74 bug113 bug137_9 bug137_10 bug137_11 bug223 bug270_1 bug270_2 bug281_1 bug349 bug362 bug544 bug1174 bug1188 bug2066 bug23652

san

2013-01-23 18:42

developer   ~0023105

Note that vselmode command accepts numerical selection modes rather than mode names as human-readable strings (e.g. EDGE).
Correspondence is given below (see also documentation in AIS_Shape.cdl):
        -- - mode 0 - Shape
        -- - mode 1 - Vertex
        -- - mode 2 - Edge
        -- - mode 3 - Wire
        -- - mode 4 - Face
        -- - mode 5 - Shell
        -- - mode 6 - Solid
        -- - mode 7 - Compsolid
        -- - mode 8 - Compound

Related Changesets

occt: master 4754e164

2013-01-18 10:22:14

aba

Details Diff
0023539: QASelect and QAShiftSelect commands

Replaced QAMoveTo, QASelect and QAShiftSelect draw commands with vmoveto and vselect
Moved vselect and vmoveto draw commands to ViewerTest_ViewerCommands.cxx
Replaced QAMoveTo and QASelect in test cases. Corrected returned error case result in vselect and vmoveto.
Added commands in ViewerTest_ViewerCommands from QADraw. Edited tests.
QACommands in tests were replaced with ViewerTest commands.
QAxwd command was removed from QADraw. Edited command wzoom and commands from ViewerTest.
Help for ViewerTest commands was edited
Small corrections. Added test cases for polygonal selection.
Small correction of test cases
Affected Issues
0023539
mod - src/Draw/Draw_GraphicCommands.cxx Diff File
mod - src/QADraw/QADraw.cxx Diff File
mod - src/ViewerTest/ViewerTest.cdl Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_EventManager.cdl Diff File
mod - src/ViewerTest/ViewerTest_EventManager.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - tests/bugs/modalg/bug397 Diff File
mod - tests/bugs/modalg/bug625 Diff File
mod - tests/bugs/modalg/bug794 Diff File
mod - tests/bugs/modalg/bug895 Diff File
mod - tests/bugs/moddata/bug20 Diff File
mod - tests/bugs/moddata/bug332 Diff File
mod - tests/bugs/vis/buc60547 Diff File
mod - tests/bugs/vis/buc60574 Diff File
mod - tests/bugs/vis/buc60587 Diff File
mod - tests/bugs/vis/buc60614 Diff File
mod - tests/bugs/vis/buc60632_1 Diff File
mod - tests/bugs/vis/buc60632_2 Diff File
mod - tests/bugs/vis/buc60688 Diff File
mod - tests/bugs/vis/buc60738 Diff File
mod - tests/bugs/vis/buc60740 Diff File
mod - tests/bugs/vis/buc60814 Diff File
mod - tests/bugs/vis/buc60876 Diff File
mod - tests/bugs/vis/buc60920 Diff File
mod - tests/bugs/vis/bug10702 Diff File
mod - tests/bugs/vis/bug10781 Diff File
mod - tests/bugs/vis/bug11095 Diff File
mod - tests/bugs/vis/bug112 Diff File
mod - tests/bugs/vis/bug11615 Diff File
mod - tests/bugs/vis/bug128 Diff File
mod - tests/bugs/vis/bug137_1 Diff File
mod - tests/bugs/vis/bug137_2 Diff File
mod - tests/bugs/vis/bug137_3 Diff File
mod - tests/bugs/vis/bug137_4 Diff File
mod - tests/bugs/vis/bug137_5 Diff File
mod - tests/bugs/vis/bug173_1 Diff File
mod - tests/bugs/vis/bug173_2 Diff File
mod - tests/bugs/vis/bug173_3 Diff File
mod - tests/bugs/vis/bug185 Diff File
mod - tests/bugs/vis/bug215 Diff File
mod - tests/bugs/vis/bug218 Diff File
mod - tests/bugs/vis/bug232 Diff File
add - tests/bugs/vis/bug23539_1 Diff File
add - tests/bugs/vis/bug23539_2 Diff File
mod - tests/bugs/vis/bug23652 Diff File
mod - tests/bugs/vis/bug280_2 Diff File
mod - tests/bugs/vis/bug280_3 Diff File
mod - tests/bugs/vis/bug319 Diff File
mod - tests/bugs/vis/bug443 Diff File
mod - tests/bugs/vis/bug591 Diff File
mod - tests/bugs/vis/bug597_1 Diff File
mod - tests/bugs/vis/bug597_2 Diff File
mod - tests/bugs/vis/bug597_3 Diff File
mod - tests/bugs/vis/bug597_4 Diff File
mod - tests/bugs/vis/bug597_5 Diff File
mod - tests/bugs/vis/bug597_6 Diff File
mod - tests/bugs/vis/bug597_7 Diff File
mod - tests/bugs/vis/bug6145 Diff File
mod - tests/bugs/vis/bug64 Diff File
mod - tests/bugs/vis/bug6652 Diff File
mod - tests/bugs/vis/bug7186 Diff File
mod - tests/bugs/vis/bug727 Diff File
mod - tests/bugs/vis/bug85_1 Diff File
mod - tests/bugs/vis/ger61351_1 Diff File
mod - tests/bugs/vis/ger61351_2 Diff File
mod - tests/bugs/vis/ger61351_3 Diff File
mod - tests/bugs/vis/ger61351_4 Diff File
mod - tests/bugs/vis/ger61351_5 Diff File
mod - tests/bugs/vis/ger61351_6 Diff File
mod - tests/bugs/xde/bug23193 Diff File

Issue History

Date Modified Username Field Change
2012-11-09 16:15 ski New Issue
2012-11-09 16:15 ski Assigned To => san
2012-11-09 16:16 ski Tag Attached: QA_vis
2012-11-09 16:16 ski Steps to Reproduce Updated
2012-11-29 15:17 san Note Added: 0022445
2012-11-29 15:17 san Assigned To san => aba
2012-11-29 15:17 san Status new => assigned
2012-12-12 11:33 san Note Added: 0022672
2012-12-17 13:37 aba Note Added: 0022723
2012-12-17 13:41 aba Assigned To aba => san
2012-12-17 13:41 aba Status assigned => resolved
2012-12-17 16:53 aba Relationship added related to 0023649
2012-12-18 18:47 aba Note Added: 0022747
2012-12-19 10:57 kgv Note Added: 0022758
2012-12-19 13:41 san Note Added: 0022767
2012-12-19 13:41 san Assigned To san => aba
2012-12-19 13:41 san Status resolved => assigned
2012-12-19 13:42 san Note Edited: 0022767
2012-12-19 14:22 san Note Edited: 0022767
2012-12-26 13:55 aba Note Added: 0022847
2012-12-26 13:55 aba Note Added: 0022848
2012-12-26 13:56 aba Assigned To aba => san
2012-12-26 13:56 aba Status assigned => resolved
2012-12-26 17:24 san Note Added: 0022854
2012-12-26 17:24 san Assigned To san => aba
2012-12-26 17:24 san Status resolved => assigned
2012-12-27 17:37 aba Note Added: 0022872
2012-12-27 17:38 aba Assigned To aba => san
2012-12-27 17:38 aba Status assigned => resolved
2013-01-09 21:41 san Note Added: 0022922
2013-01-09 21:41 san Assigned To san => aba
2013-01-09 21:41 san Status resolved => assigned
2013-01-10 15:55 aba Note Added: 0022932
2013-01-10 15:56 aba Assigned To aba => san
2013-01-10 15:56 aba Status assigned => resolved
2013-01-10 22:27 san Note Added: 0022936
2013-01-10 22:27 san Assigned To san => bugmaster
2013-01-10 22:27 san Status resolved => reviewed
2013-01-11 19:08 mkv Assigned To bugmaster => mkv
2013-01-17 14:33 san Note Added: 0023000
2013-01-17 14:33 san Status reviewed => feedback
2013-01-17 18:42 mkv Note Added: 0023012
2013-01-17 18:43 mkv Test case number => bugs vis(004) bug23539_1, bug23539_2
2013-01-17 18:43 mkv Assigned To mkv => bugmaster
2013-01-17 18:43 mkv Status feedback => tested
2013-01-21 11:46 kgv Severity just a question => minor
2013-01-21 11:46 kgv Target Version => 6.6.0
2013-01-21 18:29 aba Changeset attached => occt master 4754e164
2013-01-21 18:29 aba Assigned To bugmaster => aba
2013-01-21 18:29 aba Status tested => verified
2013-01-21 18:29 aba Resolution open => fixed
2013-01-23 18:42 san Note Added: 0023105
2013-01-23 18:43 san Relationship added related to 0023525
2013-01-23 19:03 san Relationship added related to 0023721
2013-01-24 10:21 san Relationship added parent of 0023536
2013-04-19 13:03 aba Relationship added related to 0023526
2013-04-23 13:34 aiv Status verified => closed
2013-04-29 15:24 aiv Fixed in Version => 6.6.0
2021-11-26 10:08 kgv Tag Detached: QA_vis