]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020948: EDF 1468 SMESH: Histogram of the quality controls
authoreap <eap@opencascade.com>
Fri, 19 Nov 2010 16:26:16 +0000 (16:26 +0000)
committereap <eap@opencascade.com>
Fri, 19 Nov 2010 16:26:16 +0000 (16:26 +0000)
   move updating distrubution of scalar bar to SMESH_Actor::UpdateDistribution()
+  virtual void SMESH_Actor::UpdateDistribution() = 0;

0020944: EDF 1464 SMESH: detection of over-constrained elements
+    class  OverConstrainedVolume: public Predicate
+    class  OverConstrainedFace: public Predicate

src/OBJECT/SMESH_DeviceActor.cxx

index e0d754cf8c4f29253ed283b0c24660fb8bbe24a1..d4a04203bb16663384de8af2e094fe943cd4a272 100644 (file)
@@ -310,12 +310,6 @@ SMESH_DeviceActor
         double aValue = aNumericalFunctor->GetValue(anObjId);
         aScalars->SetValue(i,aValue);
       }
-      int nbIntervals = theScalarBarActor->GetMaximumNumberOfColors();
-      std::vector<int> nbEvents;
-      std::vector<double> funValues;
-      aNumericalFunctor->GetHistogram(nbIntervals, nbEvents, funValues);
-      theScalarBarActor->SetDistribution(nbEvents);
-
     }else if(Predicate* aPredicate = dynamic_cast<Predicate*>(theFunctor.get())){
       for(vtkIdType i = 0; i < aNbCells; i++){
         vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
@@ -475,16 +469,6 @@ SMESH_DeviceActor
       myMergeFilter->SetScalars(aDataSet);
       aDataSet->Delete();
     }
-    
-    //Set Distribution 
-    if(NumericalFunctor* aNumericalFunctor = dynamic_cast<NumericalFunctor*>(theFunctor.get())){
-      int nbIntervals = theScalarBarActor->GetMaximumNumberOfColors();
-      std::vector<int> nbEvents;
-      std::vector<double> funValues;
-      aNumericalFunctor->GetHistogram(nbIntervals, nbEvents, funValues);
-      theScalarBarActor->SetDistribution(nbEvents);
-    }
-    
   }
   GetMapper()->SetScalarVisibility(anIsInitialized);
   theScalarBarActor->SetVisibility(anIsInitialized);
@@ -500,10 +484,12 @@ SMESH_DeviceActor
   myVisualObj->UpdateFunctor(theFunctor);
 
   using namespace SMESH::Controls;
-  if ( dynamic_cast<FreeBorders*>(theFunctor.get()) ||
-       dynamic_cast<FreeFaces*>(theFunctor.get())   ||
-       dynamic_cast<BareBorderVolume*>(theFunctor.get())||
-       dynamic_cast<BareBorderFace*>(theFunctor.get()))
+  if ( dynamic_cast<FreeBorders          *>(theFunctor.get()) ||
+       dynamic_cast<FreeFaces            *>(theFunctor.get()) ||
+       dynamic_cast<BareBorderVolume     *>(theFunctor.get()) ||
+       dynamic_cast<BareBorderFace       *>(theFunctor.get()) ||
+       dynamic_cast<OverConstrainedVolume*>(theFunctor.get()) ||
+       dynamic_cast<OverConstrainedFace  *>(theFunctor.get()))
   {
     Predicate* aFreePredicate = dynamic_cast<Predicate*>(theFunctor.get());
     myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);