MantisBT - Open CASCADE
View Issue Details
0027816Open CASCADE[OCCT] OCCT:Visualizationpublic2016-08-27 13:152018-05-14 19:29
kgv 
bugmaster 
normalminor 
closedfixed 
 
[OCCT] 7.1.0[OCCT] 7.1.0 
Not needed
0027816: Visualization - provide an API for overriding clipping planes list
Current 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.
No tags attached.
related to 0024291closed apn Open CASCADE Visualization - move Z-buffer trihedron presentation from TKOpenGl to TKV3d 
parent of 0027944closed apn Open CASCADE Visualization, V3d_View - filter duplicates within ::AddClipPlane() 
parent of 0027945closed apn Open CASCADE Visualization - handle correctly view clipping planes within zoom-persistent objects 
parent of 0029768closed abv Open CASCADE Visualization, TKOpenGl - structure is entirely clipped by suppressed clipping 
child of 0027748new kgv Open CASCADE Visualization - clipping and capping improvements 
Issue History
2016-08-27 13:15kgvNew Issue
2016-08-27 13:15kgvAssigned To => kgv
2016-08-27 13:15kgvRelationship addedchild of 0027748
2016-08-27 13:16kgvRelationship addedrelated to 0024291
2016-09-11 22:51gitNote Added: 0057660
2016-09-11 22:52kgvNote Added: 0057661
2016-09-11 22:52kgvAssigned Tokgv => san
2016-09-11 22:52kgvStatusnew => resolved
2016-09-12 09:21kgvAssigned Tosan => apl
2016-09-12 16:24gitNote Added: 0057690
2016-09-12 19:48gitNote Added: 0057708
2016-09-12 20:02gitNote Added: 0057710
2016-09-12 20:04aplNote Added: 0057711
2016-09-12 20:04aplAssigned Toapl => bugmaster
2016-09-12 20:04aplStatusresolved => reviewed
2016-09-12 20:04aplNote Edited: 0057711bug_revision_view_page.php?bugnote_id=57711#r14651
2016-09-12 20:30mkvAssigned Tobugmaster => mkv
2016-09-13 12:10mkvNote Added: 0057729
2016-09-13 12:10mkvNote Added: 0057730
2016-09-13 12:10mkvAssigned Tomkv => kgv
2016-09-13 12:10mkvStatusreviewed => assigned
2016-09-13 12:10mkvTest case number => Not needed
2016-09-13 12:28gitNote Added: 0057732
2016-09-13 12:34kgvNote Added: 0057734
2016-09-13 12:34kgvAssigned Tokgv => bugmaster
2016-09-13 12:34kgvStatusassigned => resolved
2016-09-13 12:34kgvStatusresolved => reviewed
2016-09-13 12:35kgvNote Edited: 0057734bug_revision_view_page.php?bugnote_id=57734#r14658
2016-09-13 12:39mkvAssigned Tobugmaster => mkv
2016-09-14 11:47mkvNote Added: 0057761
2016-09-14 11:47mkvNote Added: 0057762
2016-09-14 11:47mkvAssigned Tomkv => bugmaster
2016-09-14 11:47mkvStatusreviewed => tested
2016-09-14 13:46gitNote Added: 0057774
2016-09-14 13:47kgvNote Added: 0057776
2016-09-16 09:43bugmasterChangeset attached => occt master 3202bf1e
2016-09-16 09:43bugmasterStatustested => verified
2016-09-16 09:43bugmasterResolutionopen => fixed
2016-10-09 22:00kgvRelationship addedparent of 0027944
2016-10-09 23:14kgvRelationship addedrelated to 0027945
2016-10-09 23:15kgvRelationship replacedparent of 0027945
2016-10-28 21:45gitNote Added: 0059501
2016-10-28 21:45gitNote Added: 0059502
2016-12-09 16:30aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0
2017-01-23 14:05abvRelationship addedrelated to 0028383
2018-05-14 19:28kgvRelationship addedrelated to 0029768
2018-05-14 19:29kgvRelationship replacedparent of 0029768

Notes
(0057660)
git   
2016-09-11 22:51   
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.
(0057661)
kgv   
2016-09-11 22:52   
Patch is ready for review.
(0057690)
git   
2016-09-12 16:24   
Branch CR27816 has been updated forcibly by kgv.

SHA-1: 4b7e28a55d3e5158e6c053c894be395f3d05a250
(0057708)
git   
2016-09-12 19:48   
Branch CR27816 has been updated forcibly by kgv.

SHA-1: 4d188dcc72c916d22717c932f8cab0f93284f0a9
(0057710)
git   
2016-09-12 20:02   
Branch CR27816 has been updated forcibly by kgv.

SHA-1: 98edeefa1be3c0319f719527b2e2348c3ab6234e
(0057711)
apl   
2016-09-12 20:04   
Dear bugmaster,

Please test the branch CR27816.

(0057729)
mkv   
2016-09-13 12:10   
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
(0057730)
mkv   
2016-09-13 12:10   
Dear kgv,
Branch CR27816 has been rejected due to:
- compilation errors
- differences in images
(0057732)
git   
2016-09-13 12:28   
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.

(0057734)
kgv   
2016-09-13 12:34   
(edited on: 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).

(0057761)
mkv   
2016-09-14 11:47   
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.
(0057762)
mkv   
2016-09-14 11:47   
Dear BugMaster,
Branch CR27816 is TESTED.
(0057774)
git   
2016-09-14 13:46   
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.
(0057776)
kgv   
2016-09-14 13:47   
Branch CR27816_1 contains a patch rebased onto CR27739_1 (#0027739), prepared for further integration.
(0059501)
git   
2016-10-28 21:45   
Branch CR27816 has been deleted by kgv.

SHA-1: 03ec5d0471ce2ae531ac513f9c698d6b71113a80
(0059502)
git   
2016-10-28 21:45   
Branch CR27816_1 has been deleted by kgv.

SHA-1: e9ec746f35d9b568daccf954f29f8f19978dd34f