From 8350675d4bfee4a60a9c5d5ec8ddad0dc5b98481 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 26 Jun 2009 08:08:03 +0000 Subject: [PATCH] Issue 0020115: [CEA 308] Quadratic elements visualization --- src/VTKViewer/VTKViewer_ArcBuilder.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]; -- 2.39.2