]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Roll back mistaken integration
authorapo <apo@opencascade.com>
Thu, 19 Jan 2006 06:27:07 +0000 (06:27 +0000)
committerapo <apo@opencascade.com>
Thu, 19 Jan 2006 06:27:07 +0000 (06:27 +0000)
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx

index b79eb3f4eee1514c0432e2fe522512f3e1d05081..a4dded2cc20d6fa4fde630c48a97e3783a6b5b4f 100644 (file)
@@ -66,8 +66,8 @@ static float FACE_ANGLE_TOLERANCE=1.5;
   static int MYDEBUG = 0;
   static int MYDEBUG_REMOVE = 0;
 #else
-  static int MYDEBUG = 1;
-  static int MYDEBUG_REMOVE = 1;
+  static int MYDEBUG = 0;
+  static int MYDEBUG_REMOVE = 0;
 #endif
 
 /*! \fn static void GetCenter(TInput* theGrid,TCell theptIds,float *center)
@@ -519,7 +519,7 @@ static void GetAndRemoveIdsOnOneLine(vtkPoints* points,
 }
 
 static vtkConvexPointSet* RemoveAllUnneededPoints(vtkConvexPointSet* convex){
-  vtkConvexPointSet* out = vtkConvexPointSet::New();
+  vtkSmartPointer<vtkConvexPointSet> out = vtkConvexPointSet::New();
   
   TUIDS two_points,input_points,out_two_points_ids,removed_points_ids,loc_removed_points_ids;
   vtkIdList* aPointIds = convex->GetPointIds();
@@ -624,7 +624,7 @@ static vtkConvexPointSet* RemoveAllUnneededPoints(vtkConvexPointSet* convex){
   out->Modified();
   out->Initialize();
   
-  return out;
+  return out.GetPointer();
 }
 
 void GetPolygonalFaces(vtkUnstructuredGrid* theGrid,int cellId,TCellArray &outputCellArray)
@@ -632,7 +632,7 @@ void GetPolygonalFaces(vtkUnstructuredGrid* theGrid,int cellId,TCellArray &outpu
   if (theGrid->GetCellType(cellId) == VTK_CONVEX_POINT_SET){
     // get vtkCell type = VTK_CONVEX_POINT_SET
     if(vtkConvexPointSet* convex_in = static_cast<vtkConvexPointSet*>(theGrid->GetCell(cellId))){
-      vtkSmartPointer<vtkConvexPointSet> convex = RemoveAllUnneededPoints(convex_in);
+      vtkConvexPointSet* convex = RemoveAllUnneededPoints(convex_in);
       TCellArray f2points;
       float convex_center[3]; // convex center point coorinat
       int aNbFaces = convex->GetNumberOfFaces();
index ae9641d03434575d0bfd54858e6f3cbf61192ad3..d1baa5b115af77e360ce622ebad33b0a1a1a811e 100755 (executable)
@@ -98,7 +98,6 @@ void VTKViewer_GeometryFilter::UnstructuredGridExecute()
   vtkCellArray *Connectivity = input->GetCells();
   if (Connectivity == NULL) {return;}
   vtkIdType cellId;
-  vtkGenericCell *cell = vtkGenericCell::New();
   int i;
   int allVisible;
   vtkIdType npts = 0;
@@ -280,25 +279,7 @@ void VTKViewer_GeometryFilter::UnstructuredGridExecute()
          outputCD->CopyData(cd,cellId,newCellId);
           break;
          
-       case VTK_CONVEX_POINT_SET: {
-         aCellType = VTK_TRIANGLE;
-         numFacePts = 3;
-         input->GetCell(cellId,cell);
-         for (int j=0; j < cell->GetNumberOfFaces(); j++){
-           vtkCell *face = cell->GetFace(j);
-           input->GetCellNeighbors(cellId, face->PointIds, cellIds);
-           if ( true || cellIds->GetNumberOfIds() <= 0 || myShowInside ) {
-             aNewPts[0] = face->PointIds->GetId(0);
-             aNewPts[1] = face->PointIds->GetId(1);
-             aNewPts[2] = face->PointIds->GetId(2);
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             outputCD->CopyData(cd,cellId,newCellId);
-           }
-         }
-         break;
-         /*
+       case VTK_CONVEX_POINT_SET:{
          TCellArray tmpCellArray;
          try{
            CONVEX_TOOL::GetPolygonalFaces(input,cellId,tmpCellArray); // "VTKViewer_ConvexTool.cxx"
@@ -329,7 +310,6 @@ void VTKViewer_GeometryFilter::UnstructuredGridExecute()
            outputCD->CopyData(cd,cellId,newCellId);
          }
          break;
-         */
        }
         case VTK_TETRA: {
           for (faceId = 0; faceId < 4; faceId++)