MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030662Open CASCADE[OCCT] OCCT:Documentationpublic2019-04-18 14:392020-09-13 11:44
Reportertizmaylo 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0030662: Documentation - update programming example in Visualization user guide
DescriptionLook at current OCCT documentation. E.g. Open CASCADE Technology → User Guides → Visualization → 3D Presentations → 3D view facilities → A programming example (https://www.opencascade.com/doc/occt-7.3.0/overview/html/occt_user_guides__visualization.html#occt_visu_4_4_2 [^]):

// create a default display connection
Handle(Aspect_DisplayConnection) aDispConnection = new Aspect_DisplayConnection();
// create a Graphic Driver
Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (aDispConnection);
// create a Viewer to this Driver
Handle(V3d_Viewer) VM = new V3d_Viewer (aGraphicDriver);
VM->SetDefaultBackgroundColor (Quantity_NOC_DARKVIOLET);
VM->SetDefaultViewProj (V3d_Xpos);
// Create a structure in this Viewer
Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (VM->Viewer());
// Type of structure
aStruct->SetVisual (Graphic3d_TOS_SHADING);
// Create a group of primitives  in this structure
Handle(Graphic3d_Group) aPrsGroup = new Graphic3d_Group (aStruct);
// Fill this group with one quad of size 100
Handle(Graphic3d_ArrayOfTriangleStrips) aTriangles = new Graphic3d_ArrayOfTriangleStrips (4);
aTriangles->AddVertex (-100./2., -100./2., 0.0);
aTriangles->AddVertex (-100./2.,  100./2., 0.0);
aTriangles->AddVertex ( 100./2., -100./2., 0.0);
aTriangles->AddVertex ( 100./2.,  100./2., 0.0);
aPrsGroup->AddPrimitiveArray (aTriangles);
aPrsGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectFillArea3d());
// Create Ambient and Infinite Lights in this Viewer
Handle(V3d_AmbientLight) aLight1 = new V3d_AmbientLight (VM, Quantity_NOC_GRAY50);
Handle(V3d_DirectionalLight) aLight2 = new V3d_DirectionalLight (VM, V3d_XnegYnegZneg, Quantity_NOC_WHITE);

// Create a 3D quality  Window with the same DisplayConnection
Handle(Xw_Window) aWindow = new Xw_Window (aDispConnection, "Test V3d", 0.5, 0.5, 0.5, 0.5);

// Map this Window to this screen
aWindow->Map();
// Create a Perspective  View in this Viewer
Handle(V3d_View) aView = new V3d_View (VM);
aView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
// Associate this View with the Window
aView ->SetWindow (aWindow);
// Display ALL structures in this View
VM->Viewer()->Display();
// Finally update the Visualization in this View
aView->Update();
// Fit view to object size
V->FitAll();


This code doesn't compile with current OCCT and may mislead users.
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships
related to 0030664newabv Documentation - Draw Test Harness Manual is outdated 
related to 0031637verifiedbugmaster Documentation - minor clean-up of User Guide for Visualization module 
related to 0030666closedbri Tracker - Bugs in OCCT:Documentation are automatically assigned to the deleted user ysn 

-  Notes
(0094493)
git (administrator)
2020-09-11 17:34

Branch CR30662 has been created by kgv.

SHA-1: 5589264a0bd27a74c9754f2e43ceaa8276defcac


Detailed log of new commits:

Author: kgv
Date: Fri Sep 11 17:37:37 2020 +0300

    0030662: Documentation - update programming example in Visualization user guide
    
    "A programming example" section has been updated to provide a working code.
(0094494)
kgv (developer)
2020-09-11 17:35

Patch is ready for review
- OCCT branch: CR30662.
(0094497)
nds (developer)
2020-09-11 17:51

Dear Igor,
please push this patch.

OCCT: CR30662
PRODUCTS: NOT

Thank you for help, Natalia
(0094551)
bugmaster (administrator)
2020-09-13 11:07

Combination -
OCCT branch : IR-2020-09-11
master SHA - d1b25684e9402d995dafec22fb98f83957d5fb76
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-11 SHA - a7e55a291cf6642cb4af945a999deeeb5f91272a
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:
Debian80-64:
OCCT
Total CPU difference: 17333.360000000142 / 17325.800000000123 [+0.04%]
Products
Total CPU difference: 12056.720000000096 / 12079.64000000011 [-0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 18817.921875 / 18792.46875 [+0.14%]
Products
Total CPU difference: 13294.09375 / 13274.75 [+0.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0094565)
git (administrator)
2020-09-13 11:44

Branch CR30662 has been deleted by inv.

SHA-1: 5589264a0bd27a74c9754f2e43ceaa8276defcac

- Related Changesets
occt: master 0784d6e3
Timestamp: 2020-09-11 14:37:37
Author: abv
Committer: abv
Details ] Diff ]
0030662: Documentation - update programming example in Visualization user guide

"A programming example" section has been updated to provide a working code.
mod - dox/user_guides/visualization/visualization.md Diff ] File ]

- Issue History
Date Modified Username Field Change
2019-04-18 14:39 tizmaylo New Issue
2019-04-18 14:39 tizmaylo Assigned To => ysn
2019-04-18 17:45 tizmaylo Assigned To ysn =>
2019-04-18 17:45 tizmaylo Description Updated View Revisions
2019-04-19 12:55 tizmaylo Relationship added related to 0030666
2019-04-19 12:56 tizmaylo Relationship deleted related to 0030666
2019-04-19 12:57 tizmaylo Relationship added related to 0030666
2019-07-19 17:35 apn Assigned To => abv
2019-07-19 17:35 apn Target Version 7.4.0 => 7.5.0
2020-09-11 15:42 utverdov Target Version 7.5.0 => 7.6.0*
2020-09-11 15:53 kgv Product Version => 7.3.0
2020-09-11 15:54 kgv Relationship added related to 0030664
2020-09-11 15:55 kgv Relationship added related to 0031637
2020-09-11 17:33 kgv Summary Documentation - "Open CASCADE Technology → User Guides → Visualization" section is outdated => Documentation - fix programming example in Visualization user guide
2020-09-11 17:33 kgv Summary Documentation - fix programming example in Visualization user guide => Documentation - update programming example in Visualization user guide
2020-09-11 17:34 git Note Added: 0094493
2020-09-11 17:35 kgv Note Added: 0094494
2020-09-11 17:35 kgv Assigned To abv => nds
2020-09-11 17:35 kgv Status new => resolved
2020-09-11 17:35 kgv Target Version 7.6.0* => 7.5.0
2020-09-11 17:51 nds Note Added: 0094497
2020-09-11 17:51 nds Assigned To nds => bugmaster
2020-09-11 17:51 nds Status resolved => reviewed
2020-09-13 11:07 bugmaster Note Added: 0094551
2020-09-13 11:07 bugmaster Status reviewed => tested
2020-09-13 11:19 bugmaster Test case number => Not required
2020-09-13 11:24 abv Changeset attached => occt master 0784d6e3
2020-09-13 11:24 abv Assigned To bugmaster => abv
2020-09-13 11:24 abv Status tested => verified
2020-09-13 11:24 abv Resolution open => fixed
2020-09-13 11:44 git Note Added: 0094565


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker