MantisBT - Open CASCADE
View Issue Details
0030662Open CASCADE[OCCT] OCCT:Documentationpublic2019-04-18 14:392019-07-19 17:35
tizmaylo 
abv 
normalminor 
newopen 
 
[OCCT] 7.5.0* 
0030662: Documentation - "Open CASCADE Technology → User Guides → Visualization" section is outdated
Look 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.
No tags attached.
related to 0030666closed bri Tracker - Bugs in OCCT:Documentation are automatically assigned to the deleted user ysn 
Issue History
2019-04-18 14:39tizmayloNew Issue
2019-04-18 14:39tizmayloAssigned To => ysn
2019-04-18 17:45tizmayloAssigned Toysn =>
2019-04-18 17:45tizmayloDescription Updatedbug_revision_view_page.php?rev_id=21058#r21058
2019-04-19 12:55tizmayloRelationship addedrelated to 0030666
2019-04-19 12:56tizmayloRelationship deletedrelated to 0030666
2019-04-19 12:57tizmayloRelationship addedrelated to 0030666
2019-07-19 17:35apnAssigned To => abv
2019-07-19 17:35apnTarget Version7.4.0 => 7.5.0*

There are no notes attached to this issue.