X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_Actor.cxx;h=3c5e2e0d09a8baecf04fddf01c32d7ea856256d1;hp=bdadcf0261d669de0a64417155f5b781e0774c3e;hb=5958c2aa894e64e158a98ce2f755218a4ff98346;hpb=92ea065d9764d4091bdf6d9e40ad4fe598a3cd45 diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index bdadcf026..3c5e2e0d0 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -116,7 +116,10 @@ SMESH_ActorDef::SMESH_ActorDef() myIsShrinkable = false; myIsShrunk = false; - myControlsPrecision = (long)SMESH::GetFloat( "SMESH:controls_precision", -1 ); + myControlsPrecision = -1; + SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); + if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) ) + myControlsPrecision = (long)SMESH::GetFloat( "SMESH", "controls_precision", -1 ); float aPointSize = SMESH::GetFloat("SMESH:node_size",3); float aLineWidth = SMESH::GetFloat("SMESH:element_width",1); @@ -278,7 +281,7 @@ SMESH_ActorDef::SMESH_ActorDef() myScalarBarActor->SetVisibility(false); myScalarBarActor->SetLookupTable(myLookupTable); - SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); + mgr = SUIT_Session::session()->resourceMgr(); if( !mgr ) return; @@ -585,6 +588,14 @@ SetControlMode(eControl theMode, myControlActor = my3DActor; break; } + case eVolume3D: + { + SMESH::Controls::Volume* aControl = new SMESH::Controls::Volume(); + aControl->SetPrecision( myControlsPrecision ); + aFunctor.reset( aControl ); + myControlActor = my3DActor; + break; + } case eMinimumAngle: { SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle(); @@ -743,18 +754,18 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj, if( !mgr ) return false; - QString aMode = mgr->stringValue( "SMESH", "display_mode" ); + int aMode = mgr->integerValue( "SMESH", "display_mode" ); SetRepresentation(-1); - if(aMode.compare("Wireframe") == 0){ + if(aMode == 0){ SetRepresentation(eEdge); - }else if(aMode.compare("Shading") == 0){ + }else if(aMode == 1){ SetRepresentation(eSurface); - }else if(aMode.compare("Nodes") == 0){ + }else if(aMode == 2){ SetRepresentation(ePoint); } - if(aMode == "Shrink"){ + if(aMode == 3){ SetShrink(); }