Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
IMP 10199 (add Volume Control). Add eVolume3D Control
[modules/smesh.git]
/
src
/
OBJECT
/
SMESH_Actor.cxx
diff --git
a/src/OBJECT/SMESH_Actor.cxx
b/src/OBJECT/SMESH_Actor.cxx
index bdadcf0261d669de0a64417155f5b781e0774c3e..3c5e2e0d09a8baecf04fddf01c32d7ea856256d1 100644
(file)
--- a/
src/OBJECT/SMESH_Actor.cxx
+++ b/
src/OBJECT/SMESH_Actor.cxx
@@
-116,7
+116,10
@@
SMESH_ActorDef::SMESH_ActorDef()
myIsShrinkable = false;
myIsShrunk = false;
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);
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);
myScalarBarActor->SetVisibility(false);
myScalarBarActor->SetLookupTable(myLookupTable);
-
SUIT_ResourceMgr*
mgr = SUIT_Session::session()->resourceMgr();
+ mgr = SUIT_Session::session()->resourceMgr();
if( !mgr )
return;
if( !mgr )
return;
@@
-585,6
+588,14
@@
SetControlMode(eControl theMode,
myControlActor = my3DActor;
break;
}
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();
case eMinimumAngle:
{
SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
@@
-743,18
+754,18
@@
bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
if( !mgr )
return false;
if( !mgr )
return false;
-
QString aMode = mgr->string
Value( "SMESH", "display_mode" );
+
int aMode = mgr->integer
Value( "SMESH", "display_mode" );
SetRepresentation(-1);
SetRepresentation(-1);
- if(aMode
.compare("Wireframe")
== 0){
+ if(aMode == 0){
SetRepresentation(eEdge);
SetRepresentation(eEdge);
- }else if(aMode
.compare("Shading") == 0
){
+ }else if(aMode
== 1
){
SetRepresentation(eSurface);
SetRepresentation(eSurface);
- }else if(aMode
.compare("Nodes") == 0
){
+ }else if(aMode
== 2
){
SetRepresentation(ePoint);
}
SetRepresentation(ePoint);
}
- if(aMode ==
"Shrink"
){
+ if(aMode ==
3
){
SetShrink();
}
SetShrink();
}