View Issue Details

IDProjectCategoryView StatusLast Update
0029470Open CASCADEOCCT:Samplespublic2018-06-29 21:21
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.2.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029470: Samples - eliminate references to deprecated Local Context from MFC sample
DescriptionThe code of MFC sample samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp does not use deprecated Local Context functionality, but still refers to it in text descriptions:
//Set faces selection mode
void CViewer3dDoc::OnFaces() 
{
  myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE));

  myCResultDialog.SetTitle("Standard mode: TopAbs_FACE");
  myCResultDialog.SetText("  myAISContext->OpenLocalContext(); \n"
                                    "  \n"
                                    "  myAISContext->ActivateStandardMode(TopAbs_FACE); \n"
                                    "  \n");
  SetTitle (L"Standard mode: TopAbs_FACE");
}

//Set edges selection mode
void CViewer3dDoc::OnEdges() 
{
  myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));

  myCResultDialog.SetTitle("Standard mode: TopAbs_EDGE");
  myCResultDialog.SetText("  myAISContext->OpenLocalContext(); \n"
                                    "  \n"
                                    "  myAISContext->ActivateStandardMode(TopAbs_EDGE); \n"
                                    "  \n");
  SetTitle (L"Standard mode: TopAbs_EDGE");
}

// Set vertices selection mode
void CViewer3dDoc::OnVertices() 
{
  myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));

  myCResultDialog.SetTitle("Standard mode: TopAbs_VERTEX");
  myCResultDialog.SetText("  myAISContext->OpenLocalContext(); \n"
                                    "  \n"
                                    "  myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n"
                                    "  \n");
  SetTitle (L"Standard mode: TopAbs_VERTEX");
}

//Neutral selection mode
void CViewer3dDoc::OnNeutral() 
{
  myCResultDialog.SetTitle("Standard mode: Neutral");
  myCResultDialog.SetText("  myAISContext->CloseAllContexts(); \n"
                                    "  \n");
  SetTitle (L"Standard mode: Neutral");
}


Also, CViewer3dDoc::OnNeutral() should be updated to propose a code for switching back to default selection mode.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0025467 closedkgv Visualization - Possibility to remove AIS_LocalContext class 

Activities

git

2018-03-11 13:21

administrator   ~0074371

Branch CR29470 has been created by kgv.

SHA-1: 87943d01db010e7f9d36a73eed8c9cc70f646538


Detailed log of new commits:

Author: kgv
Date: Sun Mar 11 13:21:01 2018 +0300

    0029470: Samples - eliminate references to deprecated Local Context from MFC sample

kgv

2018-03-11 13:21

developer   ~0074372

Last edited: 2018-03-11 17:14

Patch is ready for review.

http://jenkins-test-10.nnov.opencascade.com/view/CR29470_1-master-KGV/

git

2018-03-11 14:39

administrator   ~0074373

Branch CR29470_1 has been created by kgv.

SHA-1: 3ee60ec84106ee282c9504d7752a4915641eaf7e


Detailed log of new commits:

Author: kgv
Date: Sun Mar 11 13:21:01 2018 +0300

    0029470: Samples - eliminate references to deprecated Local Context from MFC sample
    
    AIS_InteractiveContext::MoveTo(), ::Select(), ::ShiftSelect() now throw
    an exception on invalid V3d_View argument instead of returning empty results.
    AIS_InteractiveContext::DetectedShape() and ::BeginImmediateDraw() now can
    be called without opened Local Context.
    
    Draw Harness - removed unused commands vsetam, vunsetam.
    Removed unused methods ViewerTest::StandardModeActivation(), ::PickObject(), PickObjects().
    Interactive input of Selection modes 0..7 now redirects to vselmode
    instead of removed ViewerTest::StandardModeActivation().

git

2018-03-13 11:15

administrator   ~0074415

Branch CR29470_1 has been updated forcibly by kgv.

SHA-1: bc57cf17f6cdaaa738e452f83851bf45a3e038eb

git

2018-03-13 12:03

administrator   ~0074424

Branch CR29470_1 has been updated forcibly by kgv.

SHA-1: c73673a1698ffba5bb7e2499e26e0b95d1e09f91

san

2018-03-13 20:11

developer   ~0074452

Branch CR29470_1 reviewed without remarks, ready for testing.

bugmaster

2018-03-14 16:08

administrator   ~0074476

Combination -
OCCT branch : CR29470_1 SHA - 3ee60ec84106ee282c9504d7752a4915641eaf7e
Products branch : master SHA - 4fd289ec73d35d02f23f3990c73b3acac9a60574
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:
Debian70-64:
OCCT
Total CPU difference: 18313.85999999964 / 18338.37999999957 [-0.13%]
Products
Total CPU difference: 7474.19000000002 / 7461.340000000009 [+0.17%]
Windows-64-VC10:
OCCT
Total CPU difference: 17663.618827598657 / 17653.338361698563 [+0.06%]
Products
Total CPU difference: 8037.155919899966 / 7990.761222500007 [+0.58%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2018-03-19 10:05

administrator   ~0074606

Branch CR29470 has been deleted by kgv.

SHA-1: 87943d01db010e7f9d36a73eed8c9cc70f646538

git

2018-03-19 10:05

administrator   ~0074607

Branch CR29470_1 has been deleted by kgv.

SHA-1: c73673a1698ffba5bb7e2499e26e0b95d1e09f91

Related Changesets

occt: master 8c088c52

2018-03-11 10:21:01

kgv


Committer: bugmaster Details Diff
0029470: Samples - eliminate references to deprecated Local Context from MFC sample

AIS_InteractiveContext::MoveTo(), ::Select(), ::ShiftSelect() now throw
an exception on invalid V3d_View argument instead of returning empty results.
AIS_InteractiveContext::DetectedShape() and ::BeginImmediateDraw() now can
be called without opened Local Context.

Draw Harness - removed unused commands vsetam, vunsetam.
Removed unused methods ViewerTest::StandardModeActivation(), ::PickObject(), PickObjects().
Interactive input of Selection modes 0..7 now redirects to vselmode
instead of removed ViewerTest::StandardModeActivation().
Affected Issues
0029470
mod - samples/mfc/standard/03_Viewer2d/src/StdAfx.h Diff File
mod - samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h Diff File
mod - samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp Diff File
mod - samples/mfc/standard/Common/AngleParamsVerticesPage.cpp Diff File
mod - samples/mfc/standard/Common/DimensionDlg.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsEdgePage.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsEdgesPage.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsVerticesPage.cpp Diff File
mod - samples/mfc/standard/Common/OCC_3dBaseDoc.cpp Diff File
mod - samples/mfc/standard/Common/RadiusParamsPage.cpp Diff File
mod - src/AIS/AIS.hxx Diff File
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.hxx Diff File
mod - src/AIS/AIS_InteractiveContext_1.cxx Diff File
mod - src/AIS/AIS_InteractiveContext_2.cxx Diff File
mod - src/AIS/AIS_InteractiveContext_3.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest.hxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx Diff File
mod - tests/bugs/vis/bug25540 Diff File
mod - tools/VInspector/VInspector_Tools.cxx Diff File

Issue History

Date Modified Username Field Change
2018-02-01 20:22 kgv New Issue
2018-02-01 20:22 kgv Assigned To => kgv
2018-02-27 11:30 abv Relationship added related to 0025467
2018-03-11 13:21 git Note Added: 0074371
2018-03-11 13:21 kgv Note Added: 0074372
2018-03-11 13:21 kgv Assigned To kgv => san
2018-03-11 13:21 kgv Status new => resolved
2018-03-11 14:39 git Note Added: 0074373
2018-03-11 17:14 kgv Note Edited: 0074372
2018-03-13 11:15 git Note Added: 0074415
2018-03-13 12:03 git Note Added: 0074424
2018-03-13 20:11 san Note Added: 0074452
2018-03-13 20:11 san Assigned To san => bugmaster
2018-03-13 20:11 san Status resolved => reviewed
2018-03-14 16:04 bugmaster Test case number => Not needed
2018-03-14 16:08 bugmaster Note Added: 0074476
2018-03-14 16:08 bugmaster Status reviewed => tested
2018-03-18 13:21 bugmaster Changeset attached => occt master 8c088c52
2018-03-18 13:21 bugmaster Status tested => verified
2018-03-18 13:21 bugmaster Resolution open => fixed
2018-03-19 10:05 git Note Added: 0074606
2018-03-19 10:05 git Note Added: 0074607
2018-06-29 21:16 aiv Fixed in Version => 7.3.0
2018-06-29 21:21 aiv Status verified => closed