View Issue Details

IDProjectCategoryView StatusLast Update
0027945Open CASCADEOCCT:Visualizationpublic2016-12-09 16:38
Reporterkgv Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027945: Visualization - handle correctly view clipping planes within zoom-persistent objects
DescriptionCurrent algorithm renders zoom-persistent objects with view clipping planes turned applied - the behavior was changed by 0027816 only for trihedron and 2D persistence objects.

However, view clipping plane definition can not be directly applied to zoom/rotate persistent objects since their local transformation does not live in world space - e.g. clipping plane is applied incorrectly producing weird visual artifacts.

The behavior should be changed to either:
1) Disable view clipping planes for rendering and perform clipping by attached point at CPU side only.
2) Correct rendering algorithm to apply view clipping planes correctly (e.g. to transform their definition).

The first approach is simpler and should be applicable for most use cases of zoom/rotate transformation persistent objects.
Steps To Reproduce
pload MODELING VISUALIZATION
box b 3 1 2
box z000 50 40 30
box z010 50 40 30
box z002 50 40 30
box z012 50 40 30
box z300 50 40 30
box z302 50 40 30
box z310 50 40 30
box z312 50 40 30

box r1 0.2 0.1 0.1
box r2 0.2 0.1 0.1

vclear
vinit View1
vaxo
vzbufftrihedron
vdisplay -dispMode 1 b

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 0 0 0 z000
vsetlocation z000 -25 -20 -15
vdrawtext    t000 "000\n" -pos 0 0 0 -color RED -halign right

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 0 1 0 z010
vsetlocation z010 -25 -20 -15
vdrawtext    t010 "010\n" -pos 0 1 0 -color RED -halign right

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 0 0 2 z002
vsetlocation z002 -25 -20 -15
vdrawtext    t002 "002\n" -pos 0 0 2 -color RED -halign right

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 0 1 2 z012
vsetlocation z012 -25 -20 -15
vdrawtext    t012 "012\n" -pos 0 1 2 -color RED -halign right

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 3 0 0 z300
vsetlocation z300 -25 -20 -15
vdrawtext    t300 "300\n" -pos 3 0 0 -color RED -halign left

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 3 0 2 z302
vsetlocation z302 -25 -20 -15
vdrawtext    t302 "302\n" -pos 3 0 2 -color RED -halign left

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 3 1 0 z310
vsetlocation z310 -25 -20 -15
vdrawtext    t310 "310\n" -pos 3 1 0 -color RED -halign left

vdisplay -dispMode 1 -trsfPers zoom -trsfPersPos 3 1 2 z312
vsetlocation z312 -25 -20 -15
vdrawtext    t312 "312\n" -pos 3 1 2 -color RED -halign left

vdisplay -dispMode 1 -trsfPers rotate -trsfPersPos -1 1 2 r1
vdisplay -dispMode 1 -trsfPers rotate -trsfPersPos  4 1 2 r2

vfit
vrotate 0.1 0 0

vclipplane pln -equation -1 0 0 2 -set
TagsNo tags attached.
Test case numberbugs vis bug27945

Attached Files

  • clip_zoompers_KO.png (6,763 bytes)
  • clip_zoompers_OK.png (5,663 bytes)

Relationships

child of 0027816 closedbugmaster Open CASCADE Visualization - provide an API for overriding clipping planes list 

Activities

kgv

2016-10-10 21:47

developer  

clip_zoompers_KO.png (6,763 bytes)

git

2016-10-10 22:48

administrator   ~0058536

Branch CR27945 has been created by kgv.

SHA-1: 26257523bfa0491f6db2ed0e3adbd5536da646aa


Detailed log of new commits:

Author: kgv
Date: Mon Oct 10 22:48:35 2016 +0300

    0027945: Visualization - handle correctly view clipping planes within zoom-persistent objects
    
    OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
    now clip entire zoom/rotate persistence object
    by checking anchor point with global clipping planes.

kgv

2016-10-10 22:49

developer   ~0058537

Patch is ready for review.

git

2016-10-11 09:37

administrator   ~0058545

Branch CR27945 has been updated forcibly by kgv.

SHA-1: 78cd8348f9dd2643481514e30f4d03d1c23a71b3

san

2016-10-11 12:03

developer   ~0058565

Branch CR27945 reviewed without remarks, ready for testing.

kgv

2016-10-11 21:43

developer  

clip_zoompers_OK.png (5,663 bytes)

apv

2016-10-12 16:27

tester   ~0058624

Dear BugMaster,

Branch CR27945 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 78cd8348f9dd2643481514e30f4d03d1c23a71b3

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1154

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug27945 - OK
http://occt-tests/CR27945-master-OCCT/Debian70-64/bugs/vis/bug27945.html
http://occt-tests/CR27945-master-OCCT/Windows-64-VC10/bugs/vis/bug27945.html

Testing on Linux:
Total MEMORY difference: 90492041 / 91118010 [-0.69%]
Total CPU difference: 19429.569999999858 / 19440.230000000018 [-0.05%]

Testing on Windows:
Total MEMORY difference: 57221011 / 57241724 [-0.04%]
Total CPU difference: 18000.518587198563 / 18173.586096598698 [-0.95%]

kgv

2016-10-12 16:29

developer   ~0058626

> bugs vis bug27945 - OK
Could you please add missing vdump to new test case?

git

2016-10-12 21:19

administrator   ~0058636

Branch CR27945 has been updated by kgv.

SHA-1: 322a42ba31f1b69aa9b8254c2190cc2c4a972048


Detailed log of new commits:

Author: kgv
Date: Wed Oct 12 21:19:26 2016 +0300

    Image dump has been added to the new test case.

kgv

2016-10-12 21:20

developer   ~0058637

Image dump has been added to new test case - retesting is not needed.

git

2016-10-28 21:42

administrator   ~0059469

Branch CR27945 has been deleted by kgv.

SHA-1: 322a42ba31f1b69aa9b8254c2190cc2c4a972048

Related Changesets

occt: master 8b1441e3

2016-10-13 11:01:19

kgv


Committer: apn Details Diff
0027945: Visualization - handle correctly view clipping planes within zoom-persistent objects

OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap()
now clip entire zoom/rotate persistence object
by checking anchor point with global clipping planes.

Image dump has been added to the new test case.
Affected Issues
0027945
mod - src/OpenGl/OpenGl_Structure.cxx 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
add - tests/bugs/vis/bug27945 Diff File

Issue History

Date Modified Username Field Change
2016-10-09 23:14 kgv New Issue
2016-10-09 23:14 kgv Assigned To => kgv
2016-10-09 23:14 kgv Relationship added related to 0027816
2016-10-09 23:15 kgv Relationship replaced child of 0027816
2016-10-09 23:15 kgv Summary Visualization - handle view clipping planes within zoom-persistent objects => Visualization - handle correctly view clipping planes within zoom-persistent objects
2016-10-10 21:46 kgv Steps to Reproduce Updated
2016-10-10 21:47 kgv File Added: clip_zoompers_KO.png
2016-10-10 22:48 git Note Added: 0058536
2016-10-10 22:49 kgv Note Added: 0058537
2016-10-10 22:49 kgv Assigned To kgv => san
2016-10-10 22:49 kgv Status new => resolved
2016-10-10 22:49 kgv Product Version => 7.0.0
2016-10-11 09:37 git Note Added: 0058545
2016-10-11 12:03 san Note Added: 0058565
2016-10-11 12:03 san Assigned To san => bugmaster
2016-10-11 12:03 san Status resolved => reviewed
2016-10-11 12:24 apv Assigned To bugmaster => apv
2016-10-11 17:32 apv Test case number => bugs vis bug27945
2016-10-11 21:43 kgv File Added: clip_zoompers_OK.png
2016-10-12 16:27 apv Note Added: 0058624
2016-10-12 16:27 apv Assigned To apv => bugmaster
2016-10-12 16:27 apv Status reviewed => tested
2016-10-12 16:29 kgv Note Added: 0058626
2016-10-12 21:19 git Note Added: 0058636
2016-10-12 21:20 kgv Note Added: 0058637
2016-10-20 15:13 apn Changeset attached => occt master 8b1441e3
2016-10-20 15:13 apn Assigned To bugmaster => apn
2016-10-20 15:13 apn Status tested => verified
2016-10-20 15:13 apn Resolution open => fixed
2016-10-28 21:42 git Note Added: 0059469
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0