myBaseActor->SetUserMatrix(aMatrix);
myBaseActor->SetStoreMapping(true);
myBaseActor->GetProperty()->SetOpacity(0.0);
+ myBaseActor->myGeomFilter->SetInside(true);
myPickableActor = myBaseActor;
my1DExtActor->SetExtControlMode(aFunctor,myControlActor);
break;
case eLength2D:
- my1DExtActor->SetExtControlMode(aFunctor,myControlActor,myScalarBarActor,myLookupTable);
- break;
case eMultiConnection2D:
my1DExtActor->SetExtControlMode(aFunctor,myControlActor,myScalarBarActor,myLookupTable);
break;
if(!myVisualObj->GetNbEntities(SMDSAbs_Volume))
theMode &= ~eVolumes;
- if(!theMode)
- return;
+ if(!theMode){
+ if(myVisualObj->GetNbEntities(SMDSAbs_Edge))
+ theMode |= eEdges;
+
+ if(myVisualObj->GetNbEntities(SMDSAbs_Face))
+ theMode |= eFaces;
+
+ if(myVisualObj->GetNbEntities(SMDSAbs_Volume))
+ theMode |= eVolumes;
+ }
myEntityMode = theMode;
+ SALOME_ExtractUnstructuredGrid* aFilter = NULL;
+ aFilter = myBaseActor->GetExtractUnstructuredGrid();
+ aFilter->ClearRegisteredCellsWithType();
+ aFilter->SetModeOfChanging(SALOME_ExtractUnstructuredGrid::eAdding);
+
+ if(myEntityMode & eEdges){
+ if (MYDEBUG) MESSAGE("EDGES");
+ aFilter->RegisterCellsWithType(VTK_LINE);
+ }
+ if(myEntityMode & eFaces){
+ if (MYDEBUG) MESSAGE("FACES");
+ aFilter->RegisterCellsWithType(VTK_TRIANGLE);
+ aFilter->RegisterCellsWithType(VTK_POLYGON);
+ aFilter->RegisterCellsWithType(VTK_QUAD);
+ }
+
+ if(myEntityMode & eVolumes){
+ if (MYDEBUG) MESSAGE("VOLUMES");
+ aFilter->RegisterCellsWithType(VTK_TETRA);
+ aFilter->RegisterCellsWithType(VTK_VOXEL);
+ aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
+ aFilter->RegisterCellsWithType(VTK_WEDGE);
+ aFilter->RegisterCellsWithType(VTK_PYRAMID);
+ aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
+ }
+ aFilter->Update();
+ if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
SetVisibility(GetVisibility(),false);
}
if(myIsCellsLabeled){
SetCellsLabeled(myIsCellsLabeled);
}
+ SetEntityMode(GetEntityMode());
SetVisibility(GetVisibility());
myTimeStamp->Modified();
void SMESH_DeviceActor::SetStoreMapping(int theStoreMapping){
+ if (myStoreMapping == theStoreMapping)
+ return;
myStoreMapping = theStoreMapping;
+ myGeomFilter->SetStoreMapping( myStoreMapping );
Modified();
}
using namespace SMESH::Controls;
if(FreeBorders* aFreeBorders = dynamic_cast<FreeBorders*>(theFunctor.get())){
myExtractUnstructuredGrid->SetModeOfChanging(SALOME_ExtractUnstructuredGrid::eAdding);
- myExtractUnstructuredGrid->ClearRegisteredCells();
- vtkUnstructuredGrid* aGrid = theDeviceActor->GetUnstructuredGrid();
+ vtkUnstructuredGrid* aGrid = myVisualObj->GetUnstructuredGrid();
vtkIdType aNbCells = aGrid->GetNumberOfCells();
for( vtkIdType i = 0; i < aNbCells; i++ ){
- vtkIdType anObjId = theDeviceActor->GetElemObjId(i);
+ vtkIdType anObjId = myVisualObj->GetElemObjId(i);
if(aFreeBorders->IsSatisfy(anObjId))
myExtractUnstructuredGrid->RegisterCell(i);
}
myGeomFilter->SetInside(true);
GetProperty()->SetRepresentation(0);
break;
- case eInsideframe:
+ case eInsideframe:
myGeomFilter->SetInside(true);
GetProperty()->SetRepresentation(1);
break;
vtkIdType anId = myGeomFilter->GetElemObjId(theVtkID);
if(anId < 0)
return -1;
- vtkIdType anId2 = myExtractUnstructuredGrid->GetInputId(anId);
+ vtkIdType anId2 = myExtractGeometry->GetElemObjId(anId);
if(anId2 < 0)
return -1;
- vtkIdType anId3 = myExtractGeometry->GetElemObjId(anId2);
+ vtkIdType anId3 = myExtractUnstructuredGrid->GetInputId(anId2);
if(anId3 < 0)
return -1;
vtkIdType aRetID = myVisualObj->GetElemObjId(anId3);
if(MYDEBUG)
- MESSAGE("GetElemObjId - theVtkID = "<<theVtkID<<"; anId2 = "<<anId2<<"; anId3 = "<<anId3<<"; aRetID = "<<aRetID);
+ MESSAGE("GetElemObjId - theVtkID = "<<theVtkID<<"; anId2 = "<<anId2<<"; anId3 = "<<anId3<<"; aRetID = "<<aRetID);
return aRetID;
}
vtkCell* SMESH_DeviceActor::GetElemCell(int theObjID){
- vtkDataSet* aDataSet = myExtractGeometry->GetInput();
+ vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
vtkCell* aCell = aDataSet->GetCell(aGridID);
if(MYDEBUG)