MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #22337 All Revisions ] Back to Issue ]
Summary 0022337: V3d_View::Print crashes in OCCT 6.5.0
Revision 2011-11-23 17:17 by szy
Additional information
and documentation updates
Documentation remark, added by apl 2011-05-26 17:43:39:

Improvements:
The printing operation under Windows has been completely redesigned.
Now it uses the off-screen buffer (frame buffer object) for rendering that makes
the result independent from the current 3D view dimensions.

The new option has been added to the print method. It is possible now to
choose between two print algorithms that define how the 3D scene is mapped to
the print area when the maximum dimensions of the frame buffer are smaller than
the dimensions of the print area.

One option is to use the newly implemented TileSplit algorithm.
This algorithm allows you to cover the whole printing area by rendering
multiple parts of the viewer. Theoretically, this means that any printing
resolution could be achieved without stretching, to avoid image quality loss.
This algorithm prints parts of the 3D scene in maximum possible resolution into
an off-screen buffer, and when copies them to the printing area, covering it by
a sort of tiling.

Another option is to draw the 3D scene using maximum supported frame buffer size
and then stretch the image to the whole printing area.
The stretching functionality provided by FreeImage is applied with the bicubic
interpolation.

If print method was used in the code of your application, you might need to
revise it to take into account the ability to choose between print algorithms.
The stretching will be selected by default when porting your application.

The new printing approach has been tested with A4 paper size and resolution of
1200 dpi (180 lpi).

Changes:
There are following changes in packages:
OpenGl package:

1) The call_togl_print function has been modified, now it uses the off-screen
buffer for rendering the viewer’s content. Two print algorithms have been
implemented: stretch algorithm and the tile algorithm. Stretch algorithm prints
the viewer’s content into off-screen buffer and then stretches the result if its
size smaller than printing area. Tile algorithm covers the whole printing area
by rendering parts of the viewer in a maximum possible resolution. New parameter
has been added to call_togl_print: const int printmode.
This method now returns true/false to indicate if the print data has been successfully sent to the printer or not.

2) The new class OpenGl_PrinterContext has been implemented. This class provides
the specific printing information to the OpenGl redraw procedure. The instance
of this class can be created only in call_togl_print method and can be obtained
by the OpenGl_PrinterContext::GetPrinterContext() method. The printer context is
associated with the OpenGL rendering context for better robustness.

3) TelSetViewIndex, call_togl_redraw_layer2d, OpenGl_TextRender::RenderText
function (methods) have been modified to use printing information provided by
OpenGl_PrinterContext instance.

4) The new parameter has been added to OpenGl_GraphicDriver::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

Aspect package:
1) The new enumeration has been added: Aspect_PrintAlgo. This enumeration
defines the print algorithms.

Graphic3d package:
1) The new parameter has been added to Graphic3d_GraphicDriver::Print method:
const Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

Visual3d package:
1) The new parameter has been added to Visual3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

V3d package:
1) The new parameter has been added to V3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

ViewerTest package:
1) The new draw command has been added to test print algorithms:
vprintview width height filename [mode=0]
   - Width and height parameters specify the dimensions of the image buffer that
is treated like a usual printing area.
   - Filename is the output file for saving the results. Mode parameters specify
the print algorithm: 0 - stretch, 1 - tile.

Modified entities:
Aspect_PrintAlgo.hxx / Aspect.cdl – the new enumeration has been added.
Graphic3d_GraphicDriver.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
OpenGl_GraphicDriver.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
V3d_View.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
Visual3d_View.cdl – new parameters has been added to both Print methods.
Revision 2011-08-12 11:42 by apl
Additional information
and documentation updates
Documentation remark, added by POLETAEV Anton (apl) 2011-05-26 17:43:39:

Improvements:
The printing operation under Windows has been completely redesigned.
Now it uses the off-screen buffer (frame buffer object) for rendering that makes
the result independent from the current 3D view dimensions.

The new option has been added to the print method. It is possible now to
choose between two print algorithms that define how the 3D scene is mapped to
the print area when the maximum dimensions of the frame buffer are smaller than
the dimensions of the print area.

One option is to use the newly implemented TileSplit algorithm.
This algorithm allows you to cover the whole printing area by rendering
multiple parts of the viewer. Theoretically, this means that any printing
resolution could be achieved without stretching, to avoid image quality loss.
This algorithm prints parts of the 3D scene in maximum possible resolution into
an off-screen buffer, and when copies them to the printing area, covering it by
a sort of tiling.

Another option is to draw the 3D scene using maximum supported frame buffer size
and then stretch the image to the whole printing area.
The stretching functionality provided by FreeImage is applied with the bicubic
interpolation.

If print method was used in the code of your application, you might need to
revise it to take into account the ability to choose between print algorithms.
The stretching will be selected by default when porting your application.

The new printing approach has been tested with A4 paper size and resolution of
1200 dpi (180 lpi).

Changes:
There are following changes in packages:
OpenGl package:

1) The call_togl_print function has been modified, now it uses the off-screen
buffer for rendering the viewer’s content. Two print algorithms have been
implemented: stretch algorithm and the tile algorithm. Stretch algorithm prints
the viewer’s content into off-screen buffer and then stretches the result if its
size smaller than printing area. Tile algorithm covers the whole printing area
by rendering parts of the viewer in a maximum possible resolution. New parameter
has been added to call_togl_print: const int printmode.
This method now returns true/false to indicate if the print data has been successfully sent to the printer or not.

2) The new class OpenGl_PrinterContext has been implemented. This class provides
the specific printing information to the OpenGl redraw procedure. The instance
of this class can be created only in call_togl_print method and can be obtained
by the OpenGl_PrinterContext::GetPrinterContext() method. The printer context is
associated with the OpenGL rendering context for better robustness.

3) TelSetViewIndex, call_togl_redraw_layer2d, OpenGl_TextRender::RenderText
function (methods) have been modified to use printing information provided by
OpenGl_PrinterContext instance.

4) The new parameter has been added to OpenGl_GraphicDriver::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

Aspect package:
1) The new enumeration has been added: Aspect_PrintAlgo. This enumeration
defines the print algorithms.

Graphic3d package:
1) The new parameter has been added to Graphic3d_GraphicDriver::Print method:
const Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

Visual3d package:
1) The new parameter has been added to Visual3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. Additional parameter has been added: theScaleFactor - it is internally used to provide scaling information that is selected in print parameters dialog. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

V3d package:
1) The new parameter has been added to V3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm. This method now returns Standard_True/Standard_False to indicate is the print data has been successfully sent to the printer.

ViewerTest package:
1) The new draw command has been added to test print algorithms:
vprintview width height filename [mode=0]
   - Width and height parameters specify the dimensions of the image buffer that
is treated like a usual printing area.
   - Filename is the output file for saving the results. Mode parameters specify
the print algorithm: 0 - stretch, 1 - tile.

Modified entities:
Aspect_PrintAlgo.hxx / Aspect.cdl – the new enumeration has been added.
Graphic3d_GraphicDriver.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
OpenGl_GraphicDriver.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
V3d_View.cdl – new parameters has been added to the Print method, method returns Standard_Boolean.
Visual3d_View.cdl – new parameters has been added to both Print methods.
Revision 2011-08-01 12:50 by bugmaster
Additional information
and documentation updates
Documentation remark, added by POLETAEV Anton (apl) 2011-05-26 17:43:39:

Improvements:
The printing operation under Windows has been completely redesigned.
Now it uses the off-screen buffer (frame buffer object) for rendering that makes
the result independent from the current 3D view dimensions.

The new option has been added to the print method. It is possible now to
choose between two print algorithms that define how the 3D scene is mapped to
the print area when the maximum dimensions of the frame buffer are smaller than
the dimensions of the print area.

One option is to use the newly implemented TileSplit algorithm.
This algorithm allows you to cover the whole printing area by rendering
multiple parts of the viewer. Theoretically, this means that any printing
resolution could be achieved without stretching, to avoid image quality loss.
This algorithm prints parts of the 3D scene in maximum possible resolution into
an off-screen buffer, and when copies them to the printing area, covering it by
a sort of tiling.

Another option is to draw the 3D scene using maximum supported frame buffer size
and then stretch the image to the whole printing area.
The stretching functionality provided by FreeImage is applied with the bicubic
interpolation.

If print method was used in the code of your application, you might need to
revise it to take into account the ability to choose between print algorithms.
The stretching will be selected by default when porting your application.

The new printing approach has been tested with A4 paper size and resolution of
1200 dpi (180 lpi).

Changes:
There are following changes in packages:
OpenGl package:

1) The call_togl_print function has been modified, now it uses the off-screen
buffer for rendering the viewer’s content. Two print algorithms have been
implemented: stretch algorithm and the tile algorithm. Stretch algorithm prints
the viewer’s content into off-screen buffer and then stretches the result if its
size smaller than printing area. Tile algorithm covers the whole printing area
by rendering parts of the viewer in a maximum possible resolution. New parameter
has been added to call_togl_print: const int printmode.

2) The new class OpenGl_PrinterContext has been implemented. This class provides
the specific printing information to the OpenGl redraw procedure. The instance
of this class can be created only in call_togl_print method and can be obtained
by the OpenGl_PrinterContext::GetPrinterContext() method. The printer context is
associated with the OpenGL rendering context for better robustness.

3) TelSetViewIndex, call_togl_redraw_layer2d, OpenGl_TextRender::RenderText
function (methods) have been modified to use printing information provided by
OpenGl_PrinterContext instance.

4) The new parameter has been added to OpenGl_GraphicDriver::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

Aspect package:
1) The new enumeration has been added: Aspect_PrintAlgo. This enumeration
defines the print algorithms.

Graphic3d package:
1) The new parameter has been added to Graphic3d_GraphicDriver::Print method:
const Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

Visual3d package:
1) The new parameter has been added to Visual3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

V3d package:
1) The new parameter has been added to V3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

ViewerTest package:
1) The new draw command has been added to test print algorithms:
vprintview width height filename [mode=0]
   - Width and height parameters specify the dimensions of the image buffer that
is treated like a usual printing area.
   - Filename is the output file for saving the results. Mode parameters specify
the print algorithm: 0 - stretch, 1 - tile.

Modified entities:
Aspect_PrintAlgo.hxx / Aspect.cdl – the new enumeration has been added.
Graphic3d_GraphicDriver.cdl – new parameter has been added to the Print method.
OpenGl_GraphicDriver.cdl – new parameter has been added to the Print method.
V3d_View.cdl – new parameter has been added to the Print method.
Visual3d_View.cdl – new parameters has been added to both Print methods.
Revision 2011-07-29 13:11 by bugmaster
Additional information
and documentation updates
Documentation remark, added by POLETAEV Anton (apl) 2011-05-26 17:43:39:

Improvements:
The printing operation under Windows has been completely redesigned.
Now it uses the off-screen buffer (frame buffer object) for rendering that makes
the result independent from the current 3D view dimensions.

The new option has been added to the print method. It is possible now to
choose between two print algorithms that define how the 3D scene is mapped to
the print area when the maximum dimensions of the frame buffer are smaller than
the dimensions of the print area.

One option is to use the newly implemented TileSplit algorithm.
This algorithm allows you to cover the whole printing area by rendering
multiple parts of the viewer. Theoretically, this means that any printing
resolution could be achieved without stretching, to avoid image quality loss.
This algorithm prints parts of the 3D scene in maximum possible resolution into
an off-screen buffer, and when copies them to the printing area, covering it by
a sort of tiling.

Another option is to draw the 3D scene using maximum supported frame buffer size
and then stretch the image to the whole printing area.
The stretching functionality provided by FreeImage is applied with the bicubic
interpolation.

If print method was used in the code of your application, you might need to
revise it to take into account the ability to choose between print algorithms.
The stretching will be selected by default when porting your application.

The new printing approach has been tested with A4 paper size and resolution of
1200 dpi (180 lpi).

Changes:
There are following changes in packages:
OpenGl package:

1) The call_togl_print function has been modified, now it uses the off-screen
buffer for rendering the viewer’s content. Two print algorithms have been
implemented: stretch algorithm and the tile algorithm. Stretch algorithm prints
the viewer’s content into off-screen buffer and then stretches the result if its
size smaller than printing area. Tile algorithm covers the whole printing area
by rendering parts of the viewer in a maximum possible resolution. New parameter
has been added to call_togl_print: const int printmode.

2) The new class OpenGl_PrinterContext has been implemented. This class provides
the specific printing information to the OpenGl redraw procedure. The instance
of this class can be created only in call_togl_print method and can be obtained
by the OpenGl_PrinterContext::GetPrinterContext() method. The printer context is
associated with the OpenGL rendering context for better robustness.

3) TelSetViewIndex, call_togl_redraw_layer2d, OpenGl_TextRender::RenderText
function (methods) have been modified to use printing information provided by
OpenGl_PrinterContext instance.

4) The new parameter has been added to OpenGl_GraphicDriver::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

Aspect package:
1) The new enumeration has been added: Aspect_PrintAlgo. This enumeration
defines the print algorithms.

Graphic3d package:
1) The new parameter has been added to Graphic3d_GraphicDriver::Print method:
const Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

Visual3d package:
1) The new parameter has been added to Visual3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

V3d package:
1) The new parameter has been added to V3d_View::Print method: const
Aspect_PrintAlgo printAlgorithm. This parameters allows to select print
algorithm.

ViewerTest package:
1) The new draw command has been added to test print algorithms:
vprintview width height filename [mode=0]
   - Width and height parameters specify the dimensions of the image buffer that
is treated like a usual printing area.
   - Filename is the output file for saving the results. Mode parameters specify
the print algorithm: 0 - stretch, 1 - tile.

Modified entities:
Aspect_PrintAlgo.hxx / Aspect.cdl – the new enumeration has been added.
Graphic3d_GraphicDriver.cdl – new parameter has been added to the Print method.
OpenGl_GraphicDriver.cdl – new parameter has been added to the Print method.
V3d_View.cdl – new parameter has been added to the Print method.
Visual3d_View.cdl – new parameters has been added to both Print methods.


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker