From: apo Date: Thu, 19 Jan 2006 06:27:07 +0000 (+0000) Subject: Roll back mistaken integration X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e3866fe70f4f771478f28d210c5910005fda30ea;p=modules%2Fgui.git Roll back mistaken integration --- diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index b79eb3f4e..a4dded2cc 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -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 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(theGrid->GetCell(cellId))){ - vtkSmartPointer convex = RemoveAllUnneededPoints(convex_in); + vtkConvexPointSet* convex = RemoveAllUnneededPoints(convex_in); TCellArray f2points; float convex_center[3]; // convex center point coorinat int aNbFaces = convex->GetNumberOfFaces(); diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index ae9641d03..d1baa5b11 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -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++)