MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030662Open CASCADE[OCCT] OCCT:Documentationpublic2019-04-18 14:392019-04-25 16:48
Reportertizmaylo 
Assigned To 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030662: Documentation - "Open CASCADE Technology → User Guides → Visualization" section is outdated
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 number
Attached Files

- Relationships
related to 0030666closedbri Tracker - Bugs in OCCT:Documentation are automatically assigned to the deleted user ysn 

-  Notes
There are no notes attached to this issue.

- 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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker