myIsShrunk = false;
myIsHighlited = false;
- myRepresentation = eSurface;
+ myRepresentation = SMESH_DeviceActor::EReperesent(-1);
myProperty = vtkProperty::New();
myMapper = VTKViewer_PolyDataMapper::New();
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
myMapper->Delete();
- myPlaneCollection->Delete();
+ // myPlaneCollection->Delete(); -- it is vtkSmartPointer
myProperty->Delete();
myExtractGeometry->Delete();
::SetStoreGemetryMapping(bool theStoreMapping)
{
myGeomFilter->SetStoreMapping(theStoreMapping);
- SetStoreClippingMapping(theStoreMapping);
+ // for optimization, switch the mapping explicitly in each filter/algorithm
+ //SetStoreClippingMapping(theStoreMapping);
}
{
myStoreClippingMapping = theStoreMapping;
myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed);
- SetStoreIDMapping(theStoreMapping);
+ // EAP, 23315
+ // Mapping in myExtractUnstructuredGrid and myGeomFilter is ON in the pickable DeviceActor only.
+ // To show labels, the mapping is computed explicitly via myExtractUnstructuredGrid->BuildOut2InMap();
+ //SetStoreIDMapping(theStoreMapping);
}
if(anIsInitialized){
vtkUnstructuredGrid* aDataSet = vtkUnstructuredGrid::New();
- SetStoreIDMapping(true);
+ // SetStoreIDMapping(true);
myExtractUnstructuredGrid->Update();
vtkUnstructuredGrid* aGrid = myExtractUnstructuredGrid->GetOutput();
using namespace SMESH::Controls;
if(NumericalFunctor* aNumericalFunctor = dynamic_cast<NumericalFunctor*>(theFunctor.get()))
{
- for(vtkIdType i = 0; i < aNbCells; i++){
+ myExtractUnstructuredGrid->BuildOut2InMap();
+ for(vtkIdType i = 0; i < aNbCells; i++)
+ {
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
double aValue = aNumericalFunctor->GetValue(anObjId);
}
else if(Predicate* aPredicate = dynamic_cast<Predicate*>(theFunctor.get()))
{
- for(vtkIdType i = 0; i < aNbCells; i++){
+ myExtractUnstructuredGrid->BuildOut2InMap();
+ for(vtkIdType i = 0; i < aNbCells; i++)
+ {
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
bool aValue = aPredicate->IsSatisfy(anObjId);
-unsigned long int
+vtkMTimeType
SMESH_DeviceActor
::GetMTime()
{
- // cout << this->myExtractUnstructuredGrid
+ // cout << "DA " << this
+ // << " GF " << myGeomFilter;
+ // if ( this->Property )
+ // cout << " P " << this->Property->GetMTime();
+ // if ( this->BackfaceProperty != NULL )
+ // cout << " BP " << BackfaceProperty->GetMTime();
+ // if ( this->Texture != NULL )
+ // cout << " T " << this->Texture->GetMTime();
+ // cout << " U " << this->GetUserTransformMatrixMTime()
+ // << " M " << this->MTime.GetMTime() << endl;
+
+ // cout << "DA " << this
+ // << " GF " << myGeomFilter
// << " " << this->Superclass::GetMTime()
// << " " << myExtractGeometry->GetMTime()
// << " " << myExtractUnstructuredGrid->GetMTime()
// << " " << myTransformFilter->GetMTime()
// << " " << myFaceOrientationFilter->GetMTime() << endl;
- unsigned long mTime = this->Superclass::GetMTime();
+ vtkMTimeType mTime = this->Superclass::GetMTime();
mTime = max(mTime,myExtractGeometry->GetMTime());
mTime = max(mTime,myExtractUnstructuredGrid->GetMTime());
mTime = max(mTime,myMergeFilter->GetMTime());
SMESH_DeviceActor
::SetRepresentation(EReperesent theMode)
{
+ if ( myRepresentation == theMode )
+ return;
switch(theMode){
case ePoint:
myGeomFilter->SetInside(true);