]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on Bug1984
authorapo <apo@opencascade.com>
Tue, 11 Apr 2006 07:37:39 +0000 (07:37 +0000)
committerapo <apo@opencascade.com>
Tue, 11 Apr 2006 07:37:39 +0000 (07:37 +0000)
  TC: Sphere and Plane segmentation for planar mesh give SIGFPE fatal error
- Additional checks were provided in order to avoid calaculation on invalid bounding boxes

src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h
src/OBJECT/VISU_GaussPtsDeviceActor.cxx
src/OBJECT/VISU_GaussPtsDeviceActor.h

index 64acea7bc99cb312a215ddad7da493641710ab6a..0568b2f508d21412f4461fd04670ddba19ecbb62 100644 (file)
@@ -603,7 +603,9 @@ VISU_GaussPtsAct
 }
 
 //----------------------------------------------------------------------------
-bool VISU_GaussPtsAct::IsInfinitive()
+bool
+VISU_GaussPtsAct
+::IsInfinitive()
 {
   if(vtkMapper* aMapper = myDeviceActor->GetMapper()){
     if(vtkDataSet* aDataSet= aMapper->GetInput()){
@@ -614,6 +616,14 @@ bool VISU_GaussPtsAct::IsInfinitive()
   return myIsInfinite;
 }
 
+//----------------------------------------------------------------------------
+int
+VISU_GaussPtsAct
+::GetPickable()
+{
+  return myDeviceActor->GetPickable();
+}
+
 //----------------------------------------------------------------------------
 bool
 VISU_GaussPtsAct
index 105db840b7e244348c4c169b3d88604f073d73eb..ef7279c6950948978f40b906aa8c2ce982b90b6a 100644 (file)
@@ -231,6 +231,10 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   bool
   IsInfinitive();
 
+  virtual
+  int
+  GetPickable();
+
  protected:
   //----------------------------------------------------------------------------
   VISU_GaussPtsAct();
index cc600ca78c20a684dde00b5bf675c696434e505a..912c2e0aa0642504739ed3a915f20e77a076c025 100644 (file)
@@ -152,6 +152,22 @@ VISU_GaussPtsDeviceActor
   return myMapper.GetPointer();
 }
 
+int
+VISU_GaussPtsDeviceActor
+::GetPickable()
+{
+  if(Superclass::GetPickable()){
+    if(vtkMapper* aMapper = GetPSMapper()){
+      if(vtkDataSet* aDataSet= aMapper->GetInput()){
+       aDataSet->Update();
+       return aDataSet->GetNumberOfCells() > 0;
+      }
+    }
+  }
+
+  return false;
+}
+
 
 //----------------------------------------------------------------------------
 void
index 096c91c186cc573103c6be7db15a88103e4bea13..c03d736c815e6b08f95bc712697d0103beed8910 100644 (file)
@@ -79,6 +79,10 @@ class VISU_GaussPtsDeviceActor: public vtkLODActor
   VISU_OpenGLPointSpriteMapper*
   GetPSMapper();
 
+  virtual
+  int
+  GetPickable();
+
  protected:
   //----------------------------------------------------------------------------
   vtkSmartPointer<VISU_GaussPointsPL> myPipeLine;