MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023115Open CASCADE[OCCT] OCCT:Visualizationpublic2012-04-17 12:422012-04-23 12:33
Reporterdbv 
Assigned Tosan 
PriorityimmediateSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.5.3 
Target Version[OCCT] 6.5.3Fixed in Version[OCCT] 6.5.3 
Summary0023115: Polygon offset doesn't applied in Viewer3D sample
DescriptionFunction TelUpdatePolygonOffsets is not called during rendering shape
Steps To Reproducepload ALL
restore D:/work/OCC/work/ros/samples/mfc/standard/04_Viewer3d/Data/bottle.brep b
explode b F
vinit
vdisplay b
vsetdispmode 1
vpolygonoffset b 1 1.5 0.5

vdisplay b_16
vtexture b_16 D:/work/OCC/work/ros/carrelage1.gif
vtexrepeat b_16 3 2

vdisplay b_21
vtexture b_21 D:/work/OCC/work/ros/carrelage1.gif
vtexrepeat b_21 3 2

vfit
vpolygonoffset b
vpolygonoffset b_16
vpolygonoffset b_21

Additional information
and documentation updates
AIS_InteractiveObject::SetPolygonOffsets() method has been patched to update also all object's Graphic3d_Group instances that has Graphic3d_AsepctFillArea3d aspect set. Without this, changing polygon offset parameters for Graphic3d_Structure only has no effect.

vpolygonoffset DRAW command added to set or print polygon offset parameters for a displayed object or to print the default values.
TagsNo tags attached.
Test case numberchl 934 X0
Attached Filespng file icon Viewer3D_Sample.PNG (150,007 bytes) 2012-04-17 12:42
? file icon X0 (1,928 bytes) 2012-04-20 13:15

- Relationships
related to 0023117closedbugmaster TKV3d and TKOpenGl code clean-up 
related to 0023118closedbugmaster Incomplete face aspect data returned by Graphic3d_Group::GroupPrimitivesAspect() 
child of 0022819closedbugmaster Redesign of OpenGl driver 

-  Notes
(0020412)
san (developer)
2012-04-18 18:45

In fact, there are two regressions in one:

1. Polygon offset parameters are not taken into account while redrawing a 3D scene

2. Default polygon offset is Aspect_POM_None that effectively disables polygon offsets. Prior to OCCT 6.5.3, default polygon offset settings were:
mode = Aspect_POM_Fill
factor = 1.0
units = 0.0
(0020413)
san (developer)
2012-04-18 18:52

Previous note is incorrect: by default polygon offsets are still enabled at OpenGl_Workspace level. Thus there is only one problem.
(0020414)
san (developer)
2012-04-18 21:24

Branch CR23115 is ready for testing.
(0020415)
san (developer)
2012-04-18 21:33
edited on: 2012-04-18 21:35

The problem resulted from changed behavior of the graphic driver after 0022819 implementation.

Formerly, the face aspect defined at the structure level was applied at the beginning of structure rendering, and corresponding "elements" were also executed and thus converted into sets of OpenGL calls. Later, when each group belonging to the structure applied its own face aspect, it had polygon offset mode set to default (Aspect_POM_None) so polygon offset parameters were not changed and the structure's ones still were in force.

Now, the face aspect (as well as other aspect types) is rendered (converted into sets of corresponding OpenGL calls) only when some OpenGl_Element asks for this using OpenGl_Workspace::AspectFace(Standard_True) call. At the moment when this element starts to draw something, OpenGl_Workspace holds the face aspect belonging to corresponding group if it is set, and the structure's aspect is simply ignored in such a case. This looks correct and consistent, however the old code that relied on immediate execution of the structure's aspects might not work, similarly to AIS_InteractiveObject::SetPolygonOffsets() method.

(0020417)
apn (administrator)
2012-04-19 11:48

Dear BugMaster,
      Workbench KAS:dev:mkv-23115-occt was created from git branch CR23115 (and mkv-23115-products from svn trunk) and compiled on Linux platform.
    
      There are not regressions in mkv-23115-products regarding to KAS:dev:products-20120415-opt
      
      There are not improvements in mkv-23115-products regarding to KAS:dev:products-20120415-opt

      Test case for this fix is chl 934 X0. It's OK.
      
      See results in /QADisk/occttests/results/KAS/dev/mkv-23115-products_19042012/lin
      See reference results in /QADisk/occttests/results/KAS/dev/products-20120415-opt_13042012/lin
      See test cases in /QADisk/occttests/tests/ED
(0020420)
san (developer)
2012-04-20 10:32

Improved patch including a workaround for 0023118 is ready in branch CR23115_1
(0020421)
san (developer)
2012-04-20 10:33

Branch CR23115_1 is ready for testing.

NOTE: Please update the test case using "Steps to reproduce" section of this issue, it has been updated!
(0020424)
mkv (tester)
2012-04-20 15:56

Dear BugMaster,
Workbench KAS:dev:mkv-23115-1-occt was created from git branch CR23115_1
(and mkv-23115-1-products from svn trunk) and compiled on Linux platform.

Test case for this fix is chl 934 X0. It's OK.
There are not regressions in mkv-23115-1-products regarding to KAS:dev:products-20120415-opt
There are not improvements in mkv-23115-1-products regarding to KAS:dev:products-20120415-opt

See results in /QADisk/occttests/results/KAS/dev/mkv-23115-1-products_20042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120415-opt_13042012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification [^]

- Related Changesets
occt: master 3ddebf91
Timestamp: 2012-04-18 17:15:49
Author: san
Details ] Diff ]
0023115: Polygon offset doesn't applied in Viewer3D sample

- AIS_InteractiveObject::SetPolygonOffsets() patched to update all object's groups that has AspectFillArea3d set.
- vpolygonoffset DRAW command added.
mod - src/AIS/AIS_InteractiveObject.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff ] File ]
occt: master 60761105
Timestamp: 2012-04-20 06:27:13
Author: san
Details ] Diff ]
0023115: Polygon offset doesn't applied in Viewer3D sample

Graphic3d_AspectFillArea3d: use Aspect_POM_Fill polygon offset mode by default

Graphic3d_Group: disable texture mapping if invalid texture ID is specified

AIS_InteractiveObject: remove Fill() method, polygon offset parameters
should be applied explicitly in Compute() method or by SetPolygonOffsets()

AIS_TexturedShape: Compute() now takes polygon offsets into account
mod - src/AIS/AIS_InteractiveObject.cdl Diff ] File ]
mod - src/AIS/AIS_InteractiveObject.cxx Diff ] File ]
mod - src/AIS/AIS_TexturedShape.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_Group_8.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-04-17 12:42 dbv New Issue
2012-04-17 12:42 dbv Assigned To => san
2012-04-17 12:42 dbv File Added: Viewer3D_Sample.PNG
2012-04-17 14:57 bugmaster Status new => assigned
2012-04-17 18:17 san Priority normal => immediate
2012-04-17 18:17 san Target Version => 6.5.3
2012-04-18 18:45 san Note Added: 0020412
2012-04-18 18:52 san Note Added: 0020413
2012-04-18 21:22 san Steps to Reproduce Updated View Revisions
2012-04-18 21:22 san Additional Information Updated View Revisions
2012-04-18 21:23 san Relationship added child of 0022819
2012-04-18 21:23 san Status assigned => resolved
2012-04-18 21:24 san Note Added: 0020414
2012-04-18 21:24 san Assigned To san => bugmaster
2012-04-18 21:24 san Status resolved => reviewed
2012-04-18 21:33 san Note Added: 0020415
2012-04-18 21:34 san Note Edited: 0020415 View Revisions
2012-04-18 21:35 san Note Edited: 0020415 View Revisions
2012-04-18 21:39 mkv Assigned To bugmaster => apn
2012-04-19 11:48 apn Note Added: 0020417
2012-04-19 11:49 apn Test case number => chl 934 X0
2012-04-19 11:49 apn Assigned To apn => bugmaster
2012-04-19 11:49 apn Status reviewed => tested
2012-04-19 11:49 apn File Added: X0
2012-04-19 15:43 san Relationship added related to 0023117
2012-04-19 20:57 san Relationship added related to 0023118
2012-04-20 10:30 san Steps to Reproduce Updated View Revisions
2012-04-20 10:31 san Assigned To bugmaster => san
2012-04-20 10:31 san Status tested => assigned
2012-04-20 10:32 san Note Added: 0020420
2012-04-20 10:32 san Status assigned => resolved
2012-04-20 10:33 san Note Added: 0020421
2012-04-20 10:33 san Assigned To san => bugmaster
2012-04-20 10:33 san Status resolved => reviewed
2012-04-20 10:38 mkv Assigned To bugmaster => mkv
2012-04-20 13:15 apn File Deleted: X0
2012-04-20 13:15 apn File Added: X0
2012-04-20 15:56 mkv Note Added: 0020424
2012-04-20 15:57 mkv Status reviewed => tested
2012-04-20 15:58 mkv Assigned To mkv => bugmaster
2012-04-23 12:33 san Changeset attached => occt master 60761105
2012-04-23 12:33 san Changeset attached => occt master 3ddebf91
2012-04-23 12:33 san Assigned To bugmaster => san
2012-04-23 12:33 san Status tested => verified
2012-04-23 12:33 san Resolution open => fixed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker