mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Bug PAL7334
DEVELOPMENT : Control Improvement
This commit is contained in:
parent
30f78ce578
commit
7fd19e4676
@ -826,6 +826,8 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
|||||||
my3DActor->Init(myVisualObj,myImplicitBoolean);
|
my3DActor->Init(myVisualObj,myImplicitBoolean);
|
||||||
|
|
||||||
my1DActor->GetMapper()->SetLookupTable(myLookupTable);
|
my1DActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||||
|
my1DExtActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||||
|
|
||||||
my2DActor->GetMapper()->SetLookupTable(myLookupTable);
|
my2DActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||||
my3DActor->GetMapper()->SetLookupTable(myLookupTable);
|
my3DActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||||
|
|
||||||
@ -1136,11 +1138,6 @@ void SMESH_ActorDef::SetRepresentation(int theMode){
|
|||||||
if(myRepresentation != ePoint)
|
if(myRepresentation != ePoint)
|
||||||
aReperesent = SMESH_DeviceActor::eInsideframe;
|
aReperesent = SMESH_DeviceActor::eInsideframe;
|
||||||
break;
|
break;
|
||||||
case eLength2D:
|
|
||||||
case eFreeEdges:
|
|
||||||
case eFreeBorders:
|
|
||||||
my1DExtActor->SetVisibility(true);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my1DActor->SetProperty(aProp);
|
my1DActor->SetProperty(aProp);
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include "QAD_Config.h"
|
#include "QAD_Config.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <vtkUnstructuredGrid.h>
|
||||||
|
#include <vtkUnstructuredGridWriter.h>
|
||||||
|
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
static int MYDEBUG = 1;
|
static int MYDEBUG = 1;
|
||||||
#else
|
#else
|
||||||
@ -30,10 +33,22 @@ static int MYDEBUG = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
|
|
||||||
float GetFloat(const QString& theValue, float theDefault){
|
float GetFloat(const QString& theValue, float theDefault){
|
||||||
if(theValue.isEmpty()) return theDefault;
|
if(theValue.isEmpty()) return theDefault;
|
||||||
QString aValue = QAD_CONFIG->getSetting(theValue);
|
QString aValue = QAD_CONFIG->getSetting(theValue);
|
||||||
if(aValue.isEmpty()) return theDefault;
|
if(aValue.isEmpty()) return theDefault;
|
||||||
return aValue.toFloat();
|
return aValue.toFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
|
||||||
|
vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
|
||||||
|
aWriter->SetFileName(theFileName);
|
||||||
|
aWriter->SetInput(theGrid);
|
||||||
|
if(theGrid->GetNumberOfCells()){
|
||||||
|
aWriter->Write();
|
||||||
|
}
|
||||||
|
aWriter->Delete();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,14 @@
|
|||||||
|
|
||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
|
|
||||||
|
class vtkUnstructuredGrid;
|
||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
|
|
||||||
float GetFloat(const QString& theValue, float theDefault = 0);
|
float GetFloat(const QString& theValue, float theDefault = 0);
|
||||||
|
|
||||||
|
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "SMESH_DeviceActor.h"
|
#include "SMESH_DeviceActor.h"
|
||||||
#include "SMESH_ExtractGeometry.h"
|
#include "SMESH_ExtractGeometry.h"
|
||||||
#include "SMESH_ControlsDef.hxx"
|
#include "SMESH_ControlsDef.hxx"
|
||||||
|
#include "SMESH_ActorUtils.h"
|
||||||
|
|
||||||
#include "SALOME_Transform.h"
|
#include "SALOME_Transform.h"
|
||||||
#include "SALOME_TransformFilter.h"
|
#include "SALOME_TransformFilter.h"
|
||||||
@ -331,8 +332,6 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
|||||||
theLookupTable->SetRange(aScalars->GetRange());
|
theLookupTable->SetRange(aScalars->GetRange());
|
||||||
theLookupTable->Build();
|
theLookupTable->Build();
|
||||||
|
|
||||||
SetUnstructuredGrid(aDataSet);
|
|
||||||
|
|
||||||
myMergeFilter->SetScalars(aDataSet);
|
myMergeFilter->SetScalars(aDataSet);
|
||||||
aDataSet->Delete();
|
aDataSet->Delete();
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
|
|
||||||
#include "SMESH_ObjectDef.h"
|
#include "SMESH_ObjectDef.h"
|
||||||
|
#include "SMESH_ActorUtils.h"
|
||||||
|
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
#include "SMESH_Actor.h"
|
#include "SMESH_Actor.h"
|
||||||
@ -41,8 +42,6 @@
|
|||||||
#include <vtkUnsignedCharArray.h>
|
#include <vtkUnsignedCharArray.h>
|
||||||
|
|
||||||
#include <vtkUnstructuredGrid.h>
|
#include <vtkUnstructuredGrid.h>
|
||||||
#include <vtkUnstructuredGridWriter.h>
|
|
||||||
#include <vtkUnstructuredGridReader.h>
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -70,17 +69,6 @@ static int MYDEBUGWITHFILES = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
|
|
||||||
vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
|
|
||||||
aWriter->SetFileName(theFileName);
|
|
||||||
aWriter->SetInput(theGrid);
|
|
||||||
if(theGrid->GetNumberOfCells()){
|
|
||||||
aWriter->Write();
|
|
||||||
}
|
|
||||||
aWriter->Delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace{
|
namespace{
|
||||||
|
|
||||||
inline const SMDS_MeshNode* FindNode(const SMDS_Mesh* theMesh, int theId){
|
inline const SMDS_MeshNode* FindNode(const SMDS_Mesh* theMesh, int theId){
|
||||||
@ -393,7 +381,7 @@ void SMESH_VisualObjDef::buildPrs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
|
if( MYDEBUG ) MESSAGE( "Update - myGrid->GetNumberOfCells() = "<<myGrid->GetNumberOfCells() );
|
||||||
if( MYDEBUGWITHFILES ) WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );
|
if( MYDEBUGWITHFILES ) SMESH::WriteUnstructuredGrid( myGrid,"/tmp/buildPrs" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -201,7 +201,4 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user