View Issue Details

IDProjectCategoryView StatusLast Update
0027816Open CASCADEOCCT:Visualizationpublic2021-01-14 17:08
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027816: Visualization - provide an API for overriding clipping planes list
DescriptionCurrent API provides two ways for defining clipping plane list:
- For entire View.
- For specific Interactive Object.

When Interactive Object defines its own list of clipping planes, the effective list consists of both - global View planes and Object planes.

There are some scenarios, when clipping planes should be disabled for specific Object - example is a trihedron and on-screen presentations, which do not live in world space and their clipping makes no sense. Another example is displaying the clipping plane itself as semitransparent plane.

Currently, the only way to handle this issue is defining no global View planes and assign planes for each Object, however this will be inefficient when only small amount of objects should be customized.

It is proposed to change clipping planes API in the following way:
- Ignore global View planes list for 2D and trihedron persistence objects (consider only Object plane list).
- Replace the clipping planes list with a handle-object with an optional flag to override (ignore) global clipping planes list.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024291 closedapn Open CASCADE Visualization - move Z-buffer trihedron presentation from TKOpenGl to TKV3d 
parent of 0027944 closedapn Open CASCADE Visualization, V3d_View - filter duplicates within ::AddClipPlane() 
parent of 0027945 closedapn Open CASCADE Visualization - handle correctly view clipping planes within zoom-persistent objects 
parent of 0029768 closedabv Open CASCADE Visualization, TKOpenGl - structure is entirely clipped by suppressed clipping 
parent of 0032056 closedbugmaster Open CASCADE Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0 
child of 0027748 newvpozdyayev Open CASCADE Visualization - clipping and capping improvements 

Activities

git

2016-09-11 22:51

administrator   ~0057660

Branch CR27816 has been created by kgv.

SHA-1: 0b541faafb1a057e581e82c6780f0892eb1d1eab


Detailed log of new commits:

Author: kgv
Date: Sun Sep 11 22:51:38 2016 +0300

    0027816: Visualization - provide an API for overriding clipping planes list
    
    Graphic3d_SequenceOfHClipPlane now inherits Standard_Transient.
    PrsMgr_PresentableObject, Graphic3d_Structure, Graphic3d_CStructure,
    V3d_View, OpenGl_View now manages the plane list by Handle.
    The getters ::GetClipPlanes() has been removed,
    setters taking non-handle ::SetClipPlanes() has been marked deprecated.
    
    OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
    now disable global (view) clipping planes for objects
    with flags Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d
    or with new flag Graphic3d_SequenceOfHClipPlane::ToOverrideGlobal().
    
    OpenGl_Clipping now implements interface for managing clipping planes
    without copying the sequences.
    The filtering of duplicates is no more performed by OpenGl_Clipping
    - application is responsible to not do this.
    OpenGl_Clipping tries avoiding unnecessary allocations for managing
    list of active planes.

kgv

2016-09-11 22:52

developer   ~0057661

Patch is ready for review.

git

2016-09-12 16:24

administrator   ~0057690

Branch CR27816 has been updated forcibly by kgv.

SHA-1: 4b7e28a55d3e5158e6c053c894be395f3d05a250

git

2016-09-12 19:48

administrator   ~0057708

Branch CR27816 has been updated forcibly by kgv.

SHA-1: 4d188dcc72c916d22717c932f8cab0f93284f0a9

git

2016-09-12 20:02

administrator   ~0057710

Branch CR27816 has been updated forcibly by kgv.

SHA-1: 98edeefa1be3c0319f719527b2e2348c3ab6234e

apl

2016-09-12 20:04

developer   ~0057711

Last edited: 2016-09-12 20:04

Dear bugmaster,

Please test the branch CR27816.

mkv

2016-09-13 12:10

tester   ~0057729

Dear BugMaster,
Branch CR27816 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 98edeefa1be3c0319f719527b2e2348c3ab6234e

There are following compilation errors:
Windows:
http://jenkins-test-07.nnov.opencascade.com:8080/view/CR27816-master/job/CR27816-master-OCCT-Windows-64-VC10-mfc-samples/1/parsed_console/
8>..\..\..\src\ModelClippingDlg.cpp(124): error C2039: 'GetClipPlanes' : is not a member of 'V3d_View'
8> d:\install\CR27816-master\Windows-64-VC10-opt\OCCT\inc\V3d_View.hxx(114) : see declaration of 'V3d_View'
8>..\..\..\src\ModelClippingDlg.cpp(203): error C2039: 'GetClipPlanes' : is not a member of 'V3d_View'
8> d:\install\CR27816-master\Windows-64-VC10-opt\OCCT\inc\V3d_View.hxx(114) : see declaration of 'V3d_View'

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1138

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 90502950 / 90380751 [+0.14%]
Total CPU difference: 19201.2299999999 / 19445.25000000013 [-1.25%]
products component :
Total MEMORY difference: 30031947 / 29998667 [+0.11%]
Total CPU difference: 5062.849999999976 / 5044.539999999978 [+0.36%]

Testing on Windows:
occt component :
Total MEMORY difference: 57178117 / 57172575 [+0.01%]
Total CPU difference: 18435.808177498588 / 18100.047225198865 [+1.86%]
products component :
Total MEMORY difference: 21267592 / 21225414 [+0.20%]
Total CPU difference: 4939.646864199956 / 4888.104133799955 [+1.05%]

There are following differences in images found by testdiff.
http://occt-tests/CR27816-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27816-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
IMAGE bugs vis bug24224: bug24224.png differs

mkv

2016-09-13 12:10

tester   ~0057730

Dear kgv,
Branch CR27816 has been rejected due to:
- compilation errors
- differences in images

git

2016-09-13 12:28

administrator   ~0057732

Branch CR27816 has been updated by kgv.

SHA-1: 03ec5d0471ce2ae531ac513f9c698d6b71113a80


Detailed log of new commits:

Author: kgv
Date: Tue Sep 13 12:28:42 2016 +0300

    MFC sample has been updated to use V3d_View::ClipPlanes() method.

kgv

2016-09-13 12:34

developer   ~0057734

Last edited: 2016-09-13 12:35

> compilation errors
Please check compilation of MFC samples on updated branch CR27816.
Regression testing is not needed.

> IMAGE bugs vis bug24224: bug24224.png differs
The image difference in this test case is expected.
Test case explicitly adds the same plane into the view and into the object.
Double inclusions (producing visual artifacts in this case)
should be handled on application level now.
But this invalid scenario has been kept in test case to check that clipping algorithm handles it transparently (without crash or stability issues).

mkv

2016-09-14 11:47

tester   ~0057761

Dear BugMaster,
Branch CR27816 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode.
SHA-1: 03ec5d0471ce2ae531ac513f9c698d6b71113a80

The compilation error was fixed.

mkv

2016-09-14 11:47

tester   ~0057762

Dear BugMaster,
Branch CR27816 is TESTED.

git

2016-09-14 13:46

administrator   ~0057774

Branch CR27816_1 has been created by kgv.

SHA-1: e9ec746f35d9b568daccf954f29f8f19978dd34f


Detailed log of new commits:

Author: kgv
Date: Wed Sep 14 13:44:47 2016 +0300

    0027816: Visualization - provide an API for overriding clipping planes list
    
    Graphic3d_SequenceOfHClipPlane now inherits Standard_Transient.
    PrsMgr_PresentableObject, Graphic3d_Structure, Graphic3d_CStructure,
    V3d_View, OpenGl_View now manages the plane list by Handle.
    The getters ::GetClipPlanes() has been removed,
    setters taking non-handle ::SetClipPlanes() has been marked deprecated.
    
    OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
    now disable global (view) clipping planes for objects
    with flags Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d
    or with new flag Graphic3d_SequenceOfHClipPlane::ToOverrideGlobal().
    
    OpenGl_Clipping now implements interface for managing clipping planes
    without copying the sequences.
    The filtering of duplicates is no more performed by OpenGl_Clipping
    - application is responsible to not do this.
    OpenGl_Clipping tries avoiding unnecessary allocations for managing
    list of active planes.
    
    MFC sample has been updated to use V3d_View::ClipPlanes() method.

kgv

2016-09-14 13:47

developer   ~0057776

Branch CR27816_1 contains a patch rebased onto CR27739_1 (#0027739), prepared for further integration.

git

2016-10-28 21:45

administrator   ~0059501

Branch CR27816 has been deleted by kgv.

SHA-1: 03ec5d0471ce2ae531ac513f9c698d6b71113a80

git

2016-10-28 21:45

administrator   ~0059502

Branch CR27816_1 has been deleted by kgv.

SHA-1: e9ec746f35d9b568daccf954f29f8f19978dd34f

Related Changesets

occt: master 3202bf1e

2016-09-14 10:44:47

kgv


Committer: bugmaster Details Diff
0027816: Visualization - provide an API for overriding clipping planes list

Graphic3d_SequenceOfHClipPlane now inherits Standard_Transient.
PrsMgr_PresentableObject, Graphic3d_Structure, Graphic3d_CStructure,
V3d_View, OpenGl_View now manages the plane list by Handle.
The getters ::GetClipPlanes() has been removed,
setters taking non-handle ::SetClipPlanes() has been marked deprecated.

OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
now disable global (view) clipping planes for objects
with flags Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d
or with new flag Graphic3d_SequenceOfHClipPlane::ToOverrideGlobal().

OpenGl_Clipping now implements interface for managing clipping planes
without copying the sequences.
The filtering of duplicates is no more performed by OpenGl_Clipping
- application is responsible to not do this.
OpenGl_Clipping tries avoiding unnecessary allocations for managing
list of active planes.

MFC sample has been updated to use V3d_View::ClipPlanes() method.
Affected Issues
0027816
mod - samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp Diff File
mod - src/Graphic3d/Graphic3d_CStructure.hxx Diff File
mod - src/Graphic3d/Graphic3d_CView.hxx Diff File
mod - src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.hxx Diff File
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff File
mod - src/OpenGl/OpenGl_Clipping.cxx Diff File
mod - src/OpenGl/OpenGl_Clipping.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File
mod - src/PrsMgr/FILES Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.cxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.hxx Diff File
rm - src/PrsMgr/PrsMgr_PresentableObject.lxx Diff File
mod - src/PrsMgr/PrsMgr_PresentationManager.cxx Diff File
mod - src/SelectMgr/SelectMgr_BaseFrustum.hxx Diff File
mod - src/SelectMgr/SelectMgr_RectangularFrustum.cxx Diff File
mod - src/SelectMgr/SelectMgr_RectangularFrustum.hxx Diff File
mod - src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx Diff File
mod - src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.cxx Diff File
mod - src/StdSelect/StdSelect_ViewerSelector3d.cxx Diff File
mod - src/V3d/V3d_View.hxx Diff File
mod - src/V3d/V3d_View_2.cxx Diff File

Issue History

Date Modified Username Field Change
2016-08-27 13:15 kgv New Issue
2016-08-27 13:15 kgv Assigned To => kgv
2016-08-27 13:15 kgv Relationship added child of 0027748
2016-08-27 13:16 kgv Relationship added related to 0024291
2016-09-11 22:51 git Note Added: 0057660
2016-09-11 22:52 kgv Note Added: 0057661
2016-09-11 22:52 kgv Assigned To kgv => san
2016-09-11 22:52 kgv Status new => resolved
2016-09-12 09:21 kgv Assigned To san => apl
2016-09-12 16:24 git Note Added: 0057690
2016-09-12 19:48 git Note Added: 0057708
2016-09-12 20:02 git Note Added: 0057710
2016-09-12 20:04 apl Note Added: 0057711
2016-09-12 20:04 apl Assigned To apl => bugmaster
2016-09-12 20:04 apl Status resolved => reviewed
2016-09-12 20:04 apl Note Edited: 0057711
2016-09-12 20:30 mkv Assigned To bugmaster => mkv
2016-09-13 12:10 mkv Note Added: 0057729
2016-09-13 12:10 mkv Note Added: 0057730
2016-09-13 12:10 mkv Assigned To mkv => kgv
2016-09-13 12:10 mkv Status reviewed => assigned
2016-09-13 12:10 mkv Test case number => Not needed
2016-09-13 12:28 git Note Added: 0057732
2016-09-13 12:34 kgv Note Added: 0057734
2016-09-13 12:34 kgv Assigned To kgv => bugmaster
2016-09-13 12:34 kgv Status assigned => resolved
2016-09-13 12:34 kgv Status resolved => reviewed
2016-09-13 12:35 kgv Note Edited: 0057734
2016-09-13 12:39 mkv Assigned To bugmaster => mkv
2016-09-14 11:47 mkv Note Added: 0057761
2016-09-14 11:47 mkv Note Added: 0057762
2016-09-14 11:47 mkv Assigned To mkv => bugmaster
2016-09-14 11:47 mkv Status reviewed => tested
2016-09-14 13:46 git Note Added: 0057774
2016-09-14 13:47 kgv Note Added: 0057776
2016-09-16 09:43 bugmaster Changeset attached => occt master 3202bf1e
2016-09-16 09:43 bugmaster Status tested => verified
2016-09-16 09:43 bugmaster Resolution open => fixed
2016-10-09 22:00 kgv Relationship added parent of 0027944
2016-10-09 23:14 kgv Relationship added related to 0027945
2016-10-09 23:15 kgv Relationship replaced parent of 0027945
2016-10-28 21:45 git Note Added: 0059501
2016-10-28 21:45 git Note Added: 0059502
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0
2018-05-14 19:28 kgv Relationship added related to 0029768
2018-05-14 19:29 kgv Relationship replaced parent of 0029768
2021-01-14 17:08 kgv Relationship added parent of 0032056