From: ouv Date: Fri, 26 Jun 2009 08:08:03 +0000 (+0000) Subject: Issue 0020115: [CEA 308] Quadratic elements visualization X-Git-Tag: V5_1_2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8350675d4bfee4a60a9c5d5ec8ddad0dc5b98481;p=modules%2Fgui.git Issue 0020115: [CEA 308] Quadratic elements visualization --- diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.cxx b/src/VTKViewer/VTKViewer_ArcBuilder.cxx index 9e0067465..e8cd9e479 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.cxx +++ b/src/VTKViewer/VTKViewer_ArcBuilder.cxx @@ -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];