View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007696 | Community | OCCT:Visualization | public | 2005-01-11 19:29 | 2013-04-11 10:49 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | no change required | ||
OS | All | ||||
Target Version | 6.7.0 | ||||
Summary | 0007696: Printing from 2d view | ||||
Description | This improvement suggestion by Dmytro Medvedenko comes from OCC Forum thread 6805: http://www.opencascade.org/org/forum/thread_6805 See also related thread 5898: http://www.opencascade.org/org/forum/thread_5898 --------- First, there is an error in WNT_GraphicDevice.cxx. A line if ( GetObject ( hBmp, sizeof ( BITMAP ), &bm )) { should be at least like this if ( GetObject ( hBmp, sizeof ( BITMAP ), &bm ) && bm.bmWidth>1 && bm.bmHeight>1) { The second error is in WNT_DDriver.cxx. Lines Standard_Boolean fSpoolRes1 = DoSpool ( fOrigSize, aPlotMode ); Standard_Boolean fSpoolRes2 = (aPlotMode == Aspect_PM_FILEONLY ? Standard_True : DoSpool ( fOrigSize, Aspect_PM_FILEONLY ) ); return (fSpoolRes1 & fSpoolRes2); should be changed to return DoSpool ( fOrigSize, aPlotMode ); Then printout is very simple: Handle(WNT_DDriver) aPrintDriver = new WNT_DDriver("Lexmark Z25-Z35", "c:\\Occ", WNT_OT_PORTRAIT,1); myV2dView->PlotScreen(aPrintDriver); aPrintDriver->Spool(Aspect_PM_DPLOTTER); Note the path cannot contain an extension. Executing WNT_DDriver::Spool() has some instability when printing to file. The matter is backslashes in OpenCascade paths are always converted to slashes /. The result is path for .prn - file always contain slashes instead of backslashes. Not all printer drivers can manage this. E.g. my "HP Color LaserJet PS" driver succeeded to form a *.prn file, and the "Lexmark Z25-Z35" failed. It seems one has to make the OSD_Path class to use backslashes instead of slashes. ------------ Comment by ABV: the feasibility of this improvement shall be checked by visualisation experts | ||||
Additional information and documentation updates | Documentation remark, added by apl 2011-04-25 12:12:01: Changes: There are following changes in packages: WNT package: 1) WNT_GraphicDevice now checks on initialization if the given DeviceContext (HDC or Aspect_Handle) is a printer device context, so GraphicDevice could initialize itself (its width and height) correctly taking into account the printer capabilities. 2) WNT_DDriver can Spool the viewer's content into the file using the printer driver. Now it converts the output path's slashes to windows style, this path then used by the printer driver to produce the output file. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
related to | 0023663 | closed | Open CASCADE | Removing 2D viewer library |
2011-04-25 14:14
|
apl-OCC7696-v1.tar.gz (37,130 bytes) |
|
1. Provide fix code/Draw script for creating testing case. 2. Prepare branch from apl-OCC7696-v1.tar.gz 3. Try to ask SAN to revise the fix |
|
Reminder sent to: Dear APL, Is it possible to finalize correction of this issue quickly? |
|
Dear Bugmaster, Could you please close this issue? 2D view support has been removed from OCC (ref issue 0023663). |
|
Issue is closed because 2D view support has been removed from OCC |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-01-12 16:11 | bugmaster | Status | closed => assigned |
2005-01-12 16:11 | bugmaster | Resolution | suspended => @0@ |
2005-01-12 16:11 | bugmaster | Assigned To | bugmaster => san |
2005-03-21 10:33 |
|
Assigned To | san => skt |
2008-10-03 12:18 | bugmaster | Assigned To | skt => san |
2011-04-07 18:10 | bugmaster | Assigned To | san => apl |
2011-04-25 14:45 |
|
Status | assigned => resolved |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2011-08-09 16:11 | bugmaster | Note Added: 0017945 | |
2011-08-09 16:11 | bugmaster | Status | resolved => assigned |
2011-09-20 17:34 |
|
Fixed in Version | EMPTY => |
2011-09-20 17:34 |
|
Target Version | => 6.5.2 |
2011-09-20 17:34 |
|
Description Updated | |
2011-09-20 17:34 |
|
Additional Information Updated | |
2011-09-21 11:13 | bugmaster | Target Version | 6.5.2 => 6.5.3 |
2011-11-23 16:59 |
|
Additional Information Updated | |
2012-02-09 08:52 |
|
Target Version | 6.5.3 => 6.5.4 |
2012-02-23 19:15 |
|
Note Added: 0019767 | |
2012-10-23 19:33 |
|
Target Version | 6.5.4 => 6.6.0 |
2013-02-26 16:10 |
|
Target Version | 6.6.0 => 6.7.0 |
2013-04-09 17:23 |
|
Relationship added | related to 0023663 |
2013-04-09 17:26 |
|
Note Added: 0024057 | |
2013-04-09 17:26 |
|
Assigned To | apl => bugmaster |
2013-04-09 17:26 |
|
Status | assigned => feedback |
2013-04-11 10:49 | bugmaster | Note Added: 0024083 | |
2013-04-11 10:49 | bugmaster | Status | feedback => closed |
2013-04-11 10:49 | bugmaster | Resolution | fixed => no change required |