View Issue Details

IDProjectCategoryView StatusLast Update
0023015Open CASCADEOCCT:Visualizationpublic2012-03-29 17:26
Reporterkgv Assigned Toapl 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
OSWindows 
Target Version6.5.3Fixed in Version6.5.3 
Summary0023015: TKOpenGl redesign regression in text printing
DescriptionThere is regression caused by 0022819.
Current implementation aimed to print 3D view visually similar to displayed on the screen but with quality adopted to printer resolution.
Because zoom-less text rendered pixel-exact regardless 3D view zoom and window dimensions additional scale factor should be applied to reach similar results for rendering buffer.

Previously this was implemented as OpenGl_PrinterContext::GetScale() property.
However this functionality was lost and text doesn't scaled.

There is also another problem: when printing view by tile algorithm with some geometry object and text, the object loses its material colors, like becoming colored in white. This is seen on attached images ("before.jpg").
Steps To Reproduce=====================================================================

The scenario to check the text size:

- Render zoom-less text on front on some 3D objects
- Print 3D view with 72 dpi quality (appropriate printer required)
- Print 3D view with 300 dpi quality (appropriate printer required)
- Dump 3D View as image with window dimensions
- Compare results

Expected results:
  all images should have the same text / 3D scene proportions.

Actual results:
  text scaled not proportionally

===============================================================

The simple DRAW scenario to check the text and color bugs:

pload ALL
vinit
vdrawtext "Text1" 20 0 0 200 200 0 0 0 0 0 40 0
box b 10 10 10
vdisplay b
vsetdispmode b 1
vfit
vprintview 12000 12000 C:\\print.jpg 1

# Now check the image. #
TagsNo tags attached.
Test case numberchl 934 W4

Attached Files

  • PrintText72dpi_652.pdf (12,717 bytes)
  • PrintText72dpi_bug.pdf (11,288 bytes)
  • PrintText600dpi_652.pdf (230,543 bytes)
  • PrintText600dpi_bug.pdf (39,242 bytes)
  • PrintTextDump.png (9,659 bytes)
  • before.jpg (3,625 bytes)
  • after.jpg (4,379 bytes)
  • W4 (2,319 bytes)

Relationships

related to 0022819 closedbugmaster Redesign of OpenGl driver 
related to 0023001 closedbugmaster Mistake in OpenGl_FrameBuffer::IsValidDepthBuffer 

Activities

kgv

2012-03-11 16:07

developer  

PrintText72dpi_652.pdf (12,717 bytes)

kgv

2012-03-11 16:07

developer  

PrintText72dpi_bug.pdf (11,288 bytes)

kgv

2012-03-11 16:07

developer  

PrintText600dpi_652.pdf (230,543 bytes)

kgv

2012-03-11 16:07

developer  

PrintText600dpi_bug.pdf (39,242 bytes)

kgv

2012-03-11 16:08

developer  

PrintTextDump.png (9,659 bytes)

apl

2012-03-16 13:02

developer  

before.jpg (3,625 bytes)

apl

2012-03-16 13:03

developer  

after.jpg (4,379 bytes)

apl

2012-03-16 13:30

developer   ~0020015

The fix provided in Git branch CR23015;

The suitable test case can be also created from prototype draw command. It seems like we don't have any test case to check the text priniting.
- To detect the first problem (text size) the view with non-zoomable text displayed should be printed (this could be done by vprintview command);
- To detect the second described problem (colors) it is necessary to print the text with some geometry by tiling algorithm (like in prototype script). It is necessary to use large image dimensions (more that FBO size, for ex. 12000x12000 image on my workstation).

It is possible to check text & colors together by printing non-zoomable text and geometry at once by tile printing algorithm.

apl

2012-03-16 13:32

developer   ~0020016

Dear Kgv,

Could you please review the git branch CR23015?

kgv

2012-03-16 14:18

developer   ~0020018

Patch is OK, please test it.

apl

2012-03-21 12:22

developer   ~0020053

Dear Bugmaster,

The following debug messages in console after "vprintview" command:

"OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!"

are fixed in patch to 0023001 bug

mkv

2012-03-21 12:23

tester  

W4 (2,319 bytes)

mkv

2012-03-21 12:24

tester   ~0020054

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

There are not regressions in mkv-23015-products regarding to KAS:dev:products-20120306-opt

Test case for this bug is chl/934/W4. It is OK.
N.B. There are following messages during execution this thest case:
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!


See results in /QADisk/occttests/results/KAS/dev/mkv-23015-products_16032012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120306-opt_07032012/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

bugmaster

2012-03-22 11:04

administrator   ~0020084

Integrated into master

Related Changesets

occt: master 34a44cbd

2012-03-16 09:12:26

apl

Details Diff
0023015: TKOpenGl redesign regression in text printing

Changes:
- the lost code block for scaling text restored;
- the color attributes fixed.
Affected Issues
0023015
mod - src/OpenGl/OpenGl_Display_1.cxx Diff File
mod - src/OpenGl/OpenGl_View_2.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.hxx Diff File
mod - src/OpenGl/OpenGl_Workspace_5.cxx Diff File

Issue History

Date Modified Username Field Change
2012-03-11 16:01 kgv New Issue
2012-03-11 16:01 kgv Assigned To => san
2012-03-11 16:07 kgv File Added: PrintText72dpi_652.pdf
2012-03-11 16:07 kgv File Added: PrintText72dpi_bug.pdf
2012-03-11 16:07 kgv File Added: PrintText600dpi_652.pdf
2012-03-11 16:07 kgv File Added: PrintText600dpi_bug.pdf
2012-03-11 16:08 kgv File Added: PrintTextDump.png
2012-03-11 16:09 kgv Relationship added related to 0022819
2012-03-12 17:36 san Assigned To san => apl
2012-03-12 17:36 san Status new => assigned
2012-03-16 13:02 apl File Added: before.jpg
2012-03-16 13:03 apl File Added: after.jpg
2012-03-16 13:08 apl Description Updated
2012-03-16 13:08 apl Steps to Reproduce Updated
2012-03-16 13:30 apl Note Added: 0020015
2012-03-16 13:30 apl Status assigned => resolved
2012-03-16 13:30 apl Assigned To apl => kgv
2012-03-16 13:32 apl Note Added: 0020016
2012-03-16 14:18 kgv Note Added: 0020018
2012-03-16 14:18 kgv Assigned To kgv => bugmaster
2012-03-16 14:18 kgv Status resolved => reviewed
2012-03-16 15:16 mkv Assigned To bugmaster => mkv
2012-03-21 12:22 apl Note Added: 0020053
2012-03-21 12:22 apl Relationship added related to 0023001
2012-03-21 12:23 mkv File Added: W4
2012-03-21 12:24 mkv Note Added: 0020054
2012-03-21 12:24 mkv Assigned To mkv => kgv
2012-03-21 12:25 mkv Test case number => chl 934 W4
2012-03-21 12:25 mkv Assigned To kgv => bugmaster
2012-03-21 12:25 mkv Status reviewed => tested
2012-03-22 11:04 bugmaster Note Added: 0020084
2012-03-22 11:04 bugmaster Status tested => verified
2012-03-22 11:04 bugmaster Resolution open => fixed
2012-03-22 11:04 bugmaster Assigned To bugmaster => apl
2012-03-29 17:26 apl Changeset attached => occt master 34a44cbd