Commit 5920ff2d authored by allens's avatar allens

added point data copying

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@28073 18c085ea-50e0-402c-830e-de6fd14e8384
parent 11dcff2b
......@@ -239,21 +239,37 @@ avtPolylineAddEndPointsFilter::ExecuteData(avtDataRepresentation *inDR)
}
int npts = outPD->GetPoints()->GetNumberOfPoints();
vtkDoubleArray *scalars = vtkDoubleArray::New();
scalars->Allocate(npts);
scalars->SetName(activeScalars->GetName());
outPD->GetPointData()->SetScalars(scalars);
outPD->GetPointData()->SetActiveScalars(scalars->GetName());
double scalar = activeScalars->GetTuple1( ptIndexs[tip] );
// Copy over all of the point data from the lines to the
// cones so the append filter will append correctly.
int nArrays = inDS->GetPointData()->GetNumberOfArrays();
for( int j=0; j<nArrays; ++j )
{
vtkDataArray *array = inDS->GetPointData()->GetArray(j);
vtkDoubleArray *scalars = vtkDoubleArray::New();
scalars->Allocate(npts);
scalars->SetName(array->GetName());
if( array->GetName() == activeScalars->GetName() )
{
outPD->GetPointData()->SetScalars(scalars);
outPD->GetPointData()->SetActiveScalars(scalars->GetName());
}
else
outPD->GetPointData()->AddArray(scalars);
double scalar = array->GetTuple1( ptIndexs[tip] );
for( int j=0; j<npts; ++j )
scalars->InsertTuple1(j, scalar);
for( int k=0; k<npts; ++k )
scalars->InsertTuple1(k, scalar);
scalars->Delete();
}
append->AddInputData( outPD );
scalars->Delete();
outPD->Delete();
}
}
......
......@@ -128,7 +128,7 @@ avtPolylineToTubeFilter::ExecuteData(avtDataRepresentation *inDR)
tubeFilter->SetNumberOfSides( numberOfSides );
tubeFilter->SetCapping( 1 );
tubeFilter->ReleaseDataFlagOn();
if( varyRadius && radiusVar != "" && radiusVar != "\0" )
{
if (radiusVar != "default")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment