-// SMESH OBJECT : interactive object for SMESH visualization
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Actor.cxx
// Author : Nicolas REJNERI
// Module : SMESH
// $Header$
-
-
+//
#include "SMESH_ActorDef.h"
#include "SMESH_ActorUtils.h"
#include "SMESH_DeviceActor.h"
#include "SMESH_ControlsDef.hxx"
#include "VTKViewer_ExtractUnstructuredGrid.h"
+#include "SALOME_InteractiveObject.hxx"
#include "SUIT_Session.h"
#include "SUIT_ResourceMgr.h"
-#include <qstringlist.h>
-
#include <vtkProperty.h>
#include <vtkTimeStamp.h>
#include <vtkObjectFactory.h>
myIsShrinkable = false;
myIsShrunk = false;
+ myIsFacesOriented = false;
+
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 );
+ myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
vtkFloatingPointType aPointSize = SMESH::GetFloat("SMESH:node_size",3);
vtkFloatingPointType aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
aFilter->RegisterCellsWithType(VTK_PYRAMID);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
//Definition 1D divice of the actor
//Fix for Bug 13314:
//Incorrect "Min value" in Scalar Bar in Mesh:
- myScalarBarActor->SetLabelFormat("%.4g");
+ // myScalarBarActor->SetLabelFormat("%.4g");
+ // changes was commented because of regression bug IPAL 19981
mgr = SUIT_Session::session()->resourceMgr();
if( !mgr )
}
+void SMESH_ActorDef::SetFacesOriented(bool theIsFacesOriented)
+{
+ myIsFacesOriented = theIsFacesOriented;
+
+ my2DActor->SetFacesOriented(theIsFacesOriented);
+ my3DActor->SetFacesOriented(theIsFacesOriented);
+
+ myTimeStamp->Modified();
+}
+
+bool SMESH_ActorDef::GetFacesOriented()
+{
+ return myIsFacesOriented;
+}
+
+
void
SMESH_ActorDef::
SetControlMode(eControl theMode)
theRenderer->AddActor(myNodeActor);
theRenderer->AddActor(myBaseActor);
- theRenderer->AddActor(my3DActor);
- theRenderer->AddActor(my2DActor);
+ my3DActor->AddToRender(theRenderer);
+ my2DActor->AddToRender(theRenderer);
theRenderer->AddActor(my1DActor);
theRenderer->AddActor(my1DExtActor);
theRenderer->RemoveActor(my1DActor);
theRenderer->RemoveActor(my1DExtActor);
- theRenderer->RemoveActor(my2DActor);
- theRenderer->RemoveActor(my3DActor);
+ my2DActor->RemoveFromRender(theRenderer);
+ my3DActor->RemoveFromRender(theRenderer);
theRenderer->RemoveActor(myScalarBarActor);
theRenderer->RemoveActor(myPointLabels);
//SetIsShrunkable(theGrid->GetNumberOfCells() > 10);
SetIsShrunkable(true);
- SetShrinkFactor( SMESH::GetFloat( "SMESH:shrink_coeff", 0.75 ) );
+ SetShrinkFactor( SMESH::GetFloat( "SMESH:shrink_coeff", 75 ) / 100. );
int aMode = mgr->integerValue( "SMESH", "display_mode" );
SetRepresentation(-1);
aFilter->RegisterCellsWithType(VTK_PYRAMID);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
}
aFilter->Update();
if(myIsCellsLabeled){
SetCellsLabeled(myIsCellsLabeled);
}
+ if(myIsFacesOriented){
+ SetFacesOriented(myIsFacesOriented);
+ }
SetEntityMode(GetEntityMode());
SetVisibility(GetVisibility());