]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Issue 0020115: [CEA 308] Quadratic elements visualization
authorouv <ouv@opencascade.com>
Fri, 26 Jun 2009 08:08:03 +0000 (08:08 +0000)
committerouv <ouv@opencascade.com>
Fri, 26 Jun 2009 08:08:03 +0000 (08:08 +0000)
src/VTKViewer/VTKViewer_ArcBuilder.cxx

index 9e00674659ad80bb98c04007c1e43fffd9cc5967..e8cd9e4796f8b6349cc2e8d23ea2e13cb6ebcaca 100644 (file)
@@ -593,6 +593,7 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input,
   vtkIdType *aNewPoints;
 
   vtkDataArray* inputScalars = input->GetPointData()->GetScalars();
+  vtkDataArray* outputScalars = output->GetPointData()->GetScalars();
 
   vtkCell* aCell = input->GetCell(cellId);
   //Get All points from input cell
@@ -615,7 +616,8 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input,
     aNewPoints[0] = pts[0];
     for(vtkIdType idx = 1; idx < aNbPts-1;idx++) {
       curID = output->GetPoints()->InsertNextPoint(aPoints->GetPoint(idx));
-      output->GetPointData()->GetScalars()->InsertNextTuple1(aScalarValues[idx]);
+      if( outputScalars )
+       outputScalars->InsertNextTuple1(aScalarValues[idx]);
       aNewPoints[idx] = curID;
     }
     aNewPoints[aNbPts-1] = pts[1];