MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029791Community[OCCT] OCCT:Visualizationpublic2018-05-21 14:412018-05-29 15:54
ReporterFreeman 
Assigned Toabv 
PriorityhighSeverityminor 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 7.3.0Fixed in Version 
Summary0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
DescriptionI faced with a problem with function SelectMgr_RectangularFrustum::IsClipped.

So when the clip plane has been added to the bottle, one can see a highlighting, when mouse cursor on the clipped part of a shape.

If you look at SelectMgr_ViewerSelector::checkOverlap you could see a call of mySelectingVolumeMgr.IsClipped (*aSelectable->ClipPlanes(), aPickResult.Depth()). Where mySelectingVolumeMgr is of SelectMgr_RectangularFrustum

This function returns wrong results sometimes (e.g. when you add plane or several parallel planes perpendicular to the view plane)
Steps To Reproduce
pload MODELING VISUALIZATION
restore [locate_data_file bottle.brep] b
vclear
vinit View1
vdisplay -dispMode 1 -highMode 1 b
vfit
vzbufftrihedron
vviewparams -scale 14.7435 -proj 0.193921 -0.891229 0.410007 -up -0.0205984 0.414149 0.909976 -at 11.3689 
1.32152 24.9954
vclipplane p -equation 1 0 0 -20 -set
vmoveto 150 200
vstate -entities
vselect 150 200
if { [vreadpixel 150 200 rgb name] != "BLACK"      } { puts "Error1" }
if { [vreadpixel 300 200 rgb name] != "GOLDENROD1" } { puts "Error2" }



To represent a problem, one can try this code:

    TopoDS_Shape bottle = MakeBottle(70, 100, 30);
    Handle(AIS_Shape) aBottle = new AIS_Shape(bottle);
    Handle(Graphic3d_ClipPlane) planeLeft = new
    Graphic3d_ClipPlane(gp_Pln(gp_Pnt(20, 0, 0), gp::DX()));
    aBottle->AddClipPlane(planeLeft);

    myContext->Display(aBottle, true);
(MakeBottle - simple function from OCCT docs making sample bottle).
Additional information
and documentation updates
https://www.opencascade.com/content/wrong-result-selectmgrrectangularfrustumisclipped [^]
TagsNo tags attached.
Test case numberbugs vis bug29791
Attached Files

- Relationships
child of 0024623closedbugmaster Open CASCADE Visualization - improve selection mechanism 

-  Notes
(0076302)
git (administrator)
2018-05-24 20:04

Branch CR29791_1 has been created by kgv.

SHA-1: c6766a66052316decdf32ae8354bdf70f340e08f


Detailed log of new commits:

Author: kgv
Date: Thu May 24 20:01:48 2018 +0300

    0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
    
    SelectMgr_RectangularFrustum::computeClippingRange() - do not skip depth range starting behind the ray.

Author: kgv
Date: Fri Apr 27 20:53:50 2018 +0300

    0029729: Visualization, Graphic3d_ClipPlane - add support of clipping plane chains
    
    Graphic3d_ClipPlane now can define a Chain of Planes (logical AND).
    OpenGl_ShaderManager - added new GLSL sub-programs for clipping plane chains.
    Bnd_Range::TrimFrom(), ::TrimTo() - added auxiliary methods for trimming the range.
    SelectMgr_ViewClipRange now handles non-continuous clipping range.
    Graphic3d_SequenceOfHClipPlane now aggregates NCollection_Sequence instead of inheritance.
    OpenGl_CappingPlaneResource - triangulation has been adjusted to make front face following CCW order.
(0076304)
git (administrator)
2018-05-24 20:07

Branch CR29791_1 has been updated forcibly by kgv.

SHA-1: eb94be5f25331cab01db3b368bc60a0659977878
(0076305)
git (administrator)
2018-05-24 20:10

Branch CR29791_2 has been created by kgv.

SHA-1: 9c41b118f76fef36ba79976246f4f1fa5016f4f1


Detailed log of new commits:

Author: kgv
Date: Thu May 24 20:10:32 2018 +0300

    0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
    
    SelectMgr_RectangularFrustum::computeClippingRange() fix skipping depth range starting behind the ray.
(0076307)
git (administrator)
2018-05-24 21:43

Branch CR29791_1 has been updated forcibly by kgv.

SHA-1: 7a6f6fee31705d66f956e4204ce2b34575b73490
(0076308)
git (administrator)
2018-05-24 21:44

Branch CR29791_2 has been updated forcibly by kgv.

SHA-1: f2a065648110b863da4c5b641294110338ecf5a5
(0076309)
kgv (developer)
2018-05-25 07:34

Patch is ready for review.

http://jenkins-test-11.nnov.opencascade.com:8080/view/CR29791_2-master-KGV/ [^]
(0076314)
san (developer)
2018-05-25 11:26

Branch CR29791_2 reviewed without remarks.
(0076323)
bugmaster (administrator)
2018-05-25 13:34

Combination -
OCCT branch : CR29791_2 SHA - f2a065648110b863da4c5b641294110338ecf5a5
Products branch : master SHA - 0503d2e80bad20c78461c45f990db7f47ea81501
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18226.470000000027 / 18176.60999999981 [+0.27%]
Products
Total CPU difference: 7428.720000000049 / 7438.350000000027 [-0.13%]
Windows-64-VC10:
OCCT
Total CPU difference: 18017.819098098553 / 17976.931235998483 [+0.23%]
Products
Total CPU difference: 8197.072544999859 / 8185.31006959986 [+0.14%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

- Related Changesets
occt: master 2b8e3efe
Timestamp: 2018-05-24 17:10:32
Author: abv
Committer: abv
Details ] Diff ]
0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped

SelectMgr_RectangularFrustum::computeClippingRange() fix skipping depth range starting behind the ray.
mod - src/SelectMgr/SelectMgr_RectangularFrustum.cxx Diff ] File ]
add - tests/bugs/vis/bug29791 Diff ] File ]
occt: master fad3eca7
Timestamp: 2018-05-24 17:10:32
Author: abv
Committer: abv
Details ] Diff ]
0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped

SelectMgr_RectangularFrustum::computeClippingRange() fix skipping depth range starting behind the ray.
mod - src/SelectMgr/SelectMgr_RectangularFrustum.cxx Diff ] File ]
add - tests/bugs/vis/bug29791 Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-05-21 14:41 Freeman New Issue
2018-05-21 14:41 Freeman Assigned To => kgv
2018-05-24 18:48 kgv Summary Wrong result of SelectMgr_RectangularFrustum::IsClipped => Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
2018-05-24 18:48 kgv Steps to Reproduce Updated View Revisions
2018-05-24 18:48 kgv Steps to Reproduce Updated View Revisions
2018-05-24 18:50 kgv Product Version 7.2.0 => 7.1.0
2018-05-24 19:00 kgv Steps to Reproduce Updated View Revisions
2018-05-24 19:21 kgv Note Added: 0076299
2018-05-24 19:22 kgv Relationship added child of 0024623
2018-05-24 19:22 kgv Product Version 7.1.0 => 6.9.0
2018-05-24 19:22 kgv Target Version => 7.4.0*
2018-05-24 19:46 kgv Note Deleted: 0076299
2018-05-24 20:04 git Note Added: 0076302
2018-05-24 20:07 git Note Added: 0076304
2018-05-24 20:10 git Note Added: 0076305
2018-05-24 20:20 kgv Target Version 7.4.0* => 7.3.0
2018-05-24 21:43 git Note Added: 0076307
2018-05-24 21:44 git Note Added: 0076308
2018-05-25 07:34 kgv Note Added: 0076309
2018-05-25 07:34 kgv Assigned To kgv => san
2018-05-25 07:34 kgv Priority normal => high
2018-05-25 07:34 kgv Status new => resolved
2018-05-25 11:26 san Note Added: 0076314
2018-05-25 11:26 san Assigned To san => bugmaster
2018-05-25 11:26 san Status resolved => reviewed
2018-05-25 13:30 bugmaster Test case number => bugs vis bug29791
2018-05-25 13:34 bugmaster Note Added: 0076323
2018-05-25 13:34 bugmaster Status reviewed => tested
2018-05-29 12:33 abv Changeset attached => occt master 2b8e3efe
2018-05-29 12:33 abv Assigned To bugmaster => abv
2018-05-29 12:33 abv Status tested => verified
2018-05-29 12:33 abv Resolution open => fixed
2018-05-29 15:54 abv Changeset attached => occt master fad3eca7


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker