View Issue Details

IDProjectCategoryView StatusLast Update
0025508Open CASCADEOCCT:Visualizationpublic2016-04-20 15:49
ReporteriszAssigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version7.0.0Fixed in Version7.0.0 
Summary0025508: Visualization - redesign of 2d layers in TKV3d
DescriptionCurrent implementation of 2d layers has some disadvantages. In order to improve it, firstly, a new specification has to be developed. It should contain description of current 2d layers usage, their disadvantages, useful features that should be implemented during redesign, possible ways to solve described problems.
Steps To Reproducetest bugs vis bug25136 //color scale in overlay
vrect r //2d rectangle in underlay
Additional information
and documentation updates
 Current implementation of 2d layers consists of Visual3d_Layer, V3d_LayerMgr, Visual3d_layerItem. There are 2 types of layers: Overlayer and Underlayer. It is possible to draw following elements in these layers: verticies, polylines, rectangles and text (new implementation should be able to draw them too).
 There are next cons in current implementation:
  -Layer items redraw on each call (no buffering)
  -No interaction and selection
  -Cant control OpenGl resources
 It would be nice to have next features:
  *Ability to hide and display the whole layer
  *Ability to select and interact with layer items
  *Ability to have multi-level layers
 One of possible ways to solve cons is to implement 2d layers as AIS objects:
  +Selection and interaction
  +Buffering
  +Display priority
  +Driven by AIS Context
 I suggest to make this in the following way:
  1) New class AIS_2dLayer which inherits from AIS_InteractiveObject.
  2) AIS_2dLayer will be able to draw some standard objects (e.g. color scale).
  3) New class AIS_2dLayerObject which inherits from AIS_InteractiveObject.
  4) AIS_2dLayer keeps a list of AIS_2dLayerObject.
  5) AIS_2dLayerObject has high-level drawing methods (e.g. DrawRectangle, DrawTriangle).
  6) AIS_2dLayerObject uses Graphic3d_PrimitiveArray for buffering and drawing.
  7) New methods for AIS_InteractiveContext which work with given AIS_2dLayer and iterate on his list of AIS_2dLayerObject (e.g. DisplayLayer(AIS_2dLayer)).

  
TagsNo tags attached.
Test case number

Relationships

parent of 0025783 closedbugmaster Open CASCADE Visualization - allow Z-layer to draw 2D objects and to make it alternative to Overlay and Underlay 
parent of 0025338 closedbugmaster Open CASCADE MFC standard samples: 3D selection rectangle blinking. 
parent of 0026921 closedbugmaster Open CASCADE Visualization - handle Graphic3d_TMF_2d objects within selection 
related to 0025785 closedski Open CASCADE Visualization - introduce AIS_ColorScale presentation for Color Scale 
related to 0025789 closedbugmaster Open CASCADE Visualization - get rid of obsolete 2d layers implementation 

Activities

git

2014-12-03 12:50

administrator   ~0034965

Branch CR25508_1 has been created by isz.

SHA-1: 36c724fc77e1a96c5edd0cc3d06674977ae59c33


Detailed log of new commits:

Author: isz
Date: Wed Dec 3 12:47:30 2014 +0300

    0025508: Redesign of 2d layers in TKV3d
    
    -Added example of drawing AIS object in 2d.
    
    In order to see it:
    1)Run Draw
    2)call "pload ALL"
    3)call "vinit"
    4)call "vrect r"

git

2014-12-19 16:58

administrator   ~0035531

Branch CR25508_2 has been created by isz.

SHA-1: 187d2ba3ca7350226b2bf7c91b7a5ccf1edd8265


Detailed log of new commits:

Author: isz
Date: Fri Dec 19 16:51:40 2014 +0300

    2d layers implemented. New classes AIS_Layer2d and AIS_2dLayerObject were added. Example 2d class - AIS_Rectangle - inherits from AIS_2dLayerObject.
    Draw command vdrawtext was modified to draw text in 2d.

Author: isz
Date: Wed Dec 3 12:47:30 2014 +0300

    0025508: Redesign of 2d layers in TKV3d
    
    -Added example of drawing AIS object in 2d.
    
    In order to see it:
    1)Run Draw
    2)call "pload ALL"
    3)call "vinit"
    4)call "vrect r"

git

2014-12-22 19:46

administrator   ~0035580

Branch CR25508_2 has been updated by isz.

SHA-1: 09f3a72f31e2927ef42bde70cb333e00148bfe76


Detailed log of new commits:

Author: isz
Date: Mon Dec 22 19:46:23 2014 +0300

    First version of AIS_ColorScale implemented.

git

2014-12-26 14:01

administrator   ~0035754

Branch CR25508_2 has been updated by isz.

SHA-1: 5d0dd356a5f603808989dbc29e80047647d9499c


Detailed log of new commits:

Author: isz
Date: Fri Dec 26 14:01:05 2014 +0300

    Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale.

git

2014-12-29 17:19

administrator   ~0035841

Branch CR25508_2 has been updated by isz.

SHA-1: 5f6951346b79102254d99944ddabcb868bbc91b8


Detailed log of new commits:

Author: isz
Date: Mon Dec 29 17:19:35 2014 +0300

    Added documentation on AIS_Layer2d and AIS_2dObjects. Compiler warnings fixed.

kgv

2015-01-14 16:52

developer   ~0036059

Please re-base your developments on top of #0024394

git

2015-01-20 12:24

administrator   ~0036244

Branch CR25508_3 has been created by isz.

SHA-1: d18f7fb4c4a1fb248586ab7a49e0d19579166163


Detailed log of new commits:

Author: isz
Date: Tue Jan 20 12:24:30 2015 +0300

    Branch rebased on CR24394_6. Compiler warnings fixed.

Author: isz
Date: Mon Dec 29 17:19:35 2014 +0300

    Added documentation on AIS_Layer2d and AIS_2dObjects. Compiler warnings fixed.

Author: isz
Date: Fri Dec 26 14:01:05 2014 +0300

    Color scale is implemented on AIS. Draw command vcolorscale now works with AIS_ColorScale.

Author: isz
Date: Mon Dec 22 19:46:23 2014 +0300

    First version of AIS_ColorScale implemented.

Author: isz
Date: Fri Dec 19 16:51:40 2014 +0300

    2d layers implemented. New classes AIS_Layer2d and AIS_2dLayerObject were added. Example 2d class - AIS_Rectangle - inherits from AIS_2dLayerObject.
    Draw command vdrawtext was modified to draw text in 2d.

Author: isz
Date: Wed Dec 3 12:47:30 2014 +0300

    0025508: Redesign of 2d layers in TKV3d
    
    -Added example of drawing AIS object in 2d.
    
    In order to see it:
    1)Run Draw
    2)call "pload ALL"
    3)call "vinit"
    4)call "vrect r"

git

2015-01-26 15:32

administrator   ~0036650

Branch CR25508_3 has been updated by isz.

SHA-1: 51f1f54700c70a984203bb59b365bd3278c50bc3


Detailed log of new commits:

Author: isz
Date: Mon Jan 26 15:10:50 2015 +0300

    Is2d flag is added to ZlayerSettings. Graphic3d_ZLayerId_BotOSD with id -5 is added to draw underlay.
    Displaying objects in 2d now works through zlayers.

git

2015-01-29 14:49

administrator   ~0036826

Branch CR25508_3 has been updated forcibly by isz.

SHA-1: a937ac7e3be4c7ff68a8f1b464868e5c4eecae77

git

2015-01-30 10:11

administrator   ~0036870

Branch CR25508_4 has been created by isz.

SHA-1: 895733cfcfb6535e079089a97bb666a2d73115e3


Detailed log of new commits:

Author: isz
Date: Fri Jan 30 10:10:54 2015 +0300

    0025508: Redesign of 2d layers in TKV3d
    
    Displaying objects in 2d now works through zlayers. Is2d flag is added to ZlayerSettings.
    Graphic3d_ZLayerId_BotOSD with id -5 is added to draw underlay. Class AIS_Rectangle and draw command "vrectangle" are added for example.
    AIS_Colorscale implemented, vcolorscale command updated.

git

2015-02-02 13:46

administrator   ~0036957

Branch CR25508_5 has been created by isz.

SHA-1: 06cc502f1ba65adf3e40951b6ee08c7b7c76336b


Detailed log of new commits:

Author: isz
Date: Mon Feb 2 13:46:32 2015 +0300

    AIS_ColorScale is rebased on fixed version(CR25136_2). Matrix settings for 2d are moved into OpenGl_Layer from OpenGl_LayerList, OCC method OpenGl_Utils::Ortho2D is used to set a proper matrix. Cosmetic fixes are made.

Author: isz
Date: Fri Jan 30 10:10:54 2015 +0300

    0025508: Redesign of 2d layers in TKV3d
    
    Displaying objects in 2d now works through zlayers. Is2d flag is added to ZlayerSettings.
    Graphic3d_ZLayerId_BotOSD with id -5 is added to draw underlay. Class AIS_Rectangle and draw command "vrectangle" are added for example.
    AIS_Colorscale implemented, vcolorscale command updated.

isz

2015-02-02 13:50

developer   ~0036959

Dear Kirill,
Please review branch CR25508_5.

git

2015-10-16 16:57

administrator   ~0047061

Branch CR25508_1 has been deleted by kgv.

SHA-1: 36c724fc77e1a96c5edd0cc3d06674977ae59c33

git

2015-10-16 16:57

administrator   ~0047062

Branch CR25508_2 has been deleted by kgv.

SHA-1: 5f6951346b79102254d99944ddabcb868bbc91b8

git

2015-10-16 16:57

administrator   ~0047063

Branch CR25508_3 has been deleted by kgv.

SHA-1: a937ac7e3be4c7ff68a8f1b464868e5c4eecae77

git

2015-10-16 16:57

administrator   ~0047064

Branch CR25508_4 has been deleted by kgv.

SHA-1: 895733cfcfb6535e079089a97bb666a2d73115e3

git

2015-10-16 16:57

administrator   ~0047065

Branch CR25508_5 has been deleted by kgv.

SHA-1: 06cc502f1ba65adf3e40951b6ee08c7b7c76336b

kgv

2015-11-17 15:41

developer   ~0048285

Dear bugmaster,

please switch this issue to verified since key features have been implemented (in scope of child issues).

Issue History

Date Modified Username Field Change
2014-11-21 12:29 isz New Issue
2014-11-21 12:29 isz Assigned To => isz
2014-11-24 11:37 apl Status new => assigned
2014-11-24 19:54 isz Additional Information Updated
2014-12-03 12:50 git Note Added: 0034965
2014-12-19 16:58 git Note Added: 0035531
2014-12-22 19:46 git Note Added: 0035580
2014-12-26 14:01 git Note Added: 0035754
2014-12-29 17:19 git Note Added: 0035841
2015-01-14 16:52 kgv Note Added: 0036059
2015-01-20 12:24 git Note Added: 0036244
2015-01-26 15:32 git Note Added: 0036650
2015-01-29 14:49 git Note Added: 0036826
2015-01-30 10:11 git Note Added: 0036870
2015-02-02 13:46 git Note Added: 0036957
2015-02-02 13:50 isz Note Added: 0036959
2015-02-02 13:50 isz Assigned To isz => kgv
2015-02-02 13:50 isz Status assigned => resolved
2015-02-02 13:50 isz Steps to Reproduce Updated
2015-02-03 09:43 isz Relationship added parent of 0025783
2015-02-03 09:52 isz Relationship added related to 0025785
2015-02-03 13:13 isz Relationship added related to 0025789
2015-02-03 14:29 kgv Summary Redesign of 2d layers in TKV3d => Visualization - redesign of 2d layers in TKV3d
2015-02-03 17:31 kgv Assigned To kgv => isz
2015-02-03 17:31 kgv Status resolved => assigned
2015-08-19 11:37 kgv Target Version 7.1.0 => 7.0.0
2015-10-16 16:57 git Note Added: 0047061
2015-10-16 16:57 git Note Added: 0047062
2015-10-16 16:57 git Note Added: 0047063
2015-10-16 16:57 git Note Added: 0047064
2015-10-16 16:57 git Note Added: 0047065
2015-11-10 10:32 kgv Relationship added parent of 0025338
2015-11-17 15:41 kgv Note Added: 0048285
2015-11-17 15:41 kgv Assigned To isz => bugmaster
2015-11-17 15:41 kgv Status assigned => feedback
2015-11-17 15:41 kgv Resolution open => fixed
2015-11-17 17:39 bugmaster Status feedback => tested
2015-11-17 17:39 bugmaster Status tested => verified
2015-11-24 16:44 kgv Relationship added parent of 0026921
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:49 aiv Status verified => closed