From c1b31c5012a78e4c4ab65c0122b5a4f55bba7104 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 17 May 2007 09:04:42 +0000 Subject: [PATCH] Fix bug 15064: IOLS. Stream Lines parameters are not edited. --- src/PIPELINE/VISU_StreamLinesPL.cxx | 9 ++++----- src/PIPELINE/VISU_StreamLinesPL.hxx | 11 +++++------ src/VISU_I/VISU_StreamLines_i.cc | 17 ++++++++--------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/PIPELINE/VISU_StreamLinesPL.cxx b/src/PIPELINE/VISU_StreamLinesPL.cxx index 5eebee0b..97d9abfb 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.cxx +++ b/src/PIPELINE/VISU_StreamLinesPL.cxx @@ -186,22 +186,21 @@ VISU_StreamLinesPL vtkFloatingPointType theStepLength, vtkDataSet* theSource, vtkFloatingPointType thePercents, - int theDirection, - int theIsOnlyTry) + int theDirection) { vtkDataSet* aDataSet = theSource? theSource: GetMergedInput(); aDataSet->Update(); vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints(); vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput(); - if(thePercents * aNbOfPoints < 1) + if (thePercents * aNbOfPoints < 1) thePercents = 2.0 / aNbOfPoints; theIntStep = CorrectIntegrationStep(theIntStep, aPointSet, thePercents); - thePropogationTime = CorrectPropagationTime(thePropogationTime, + thePropogationTime = CorrectPropagationTime(thePropogationTime, aPointSet); theStepLength = CorrectStepLength(theStepLength, @@ -212,7 +211,7 @@ VISU_StreamLinesPL thePropogationTime, thePercents); - if((!theIsOnlyTry && anIsAccepted) || (theIsOnlyTry && anIsAccepted == 1)){ + if (anIsAccepted) { mySource = theSource; myPercents = thePercents; if(VISU::IsDataOnCells(GetMergedInput())){ diff --git a/src/PIPELINE/VISU_StreamLinesPL.hxx b/src/PIPELINE/VISU_StreamLinesPL.hxx index 9411e341..ed762a9b 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.hxx +++ b/src/PIPELINE/VISU_StreamLinesPL.hxx @@ -44,18 +44,17 @@ public: vtkTypeMacro(VISU_StreamLinesPL, VISU_DeformedShapePL); static - VISU_StreamLinesPL* + VISU_StreamLinesPL* New(); virtual - size_t - SetParams(vtkFloatingPointType theIntStep, + size_t + SetParams(vtkFloatingPointType theIntStep, vtkFloatingPointType thePropogationTime, vtkFloatingPointType theStepLength, - vtkDataSet* theSource = NULL, + vtkDataSet* theSource = NULL, vtkFloatingPointType thePercents = 0.3, - int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS, - int isOnlyTry = false); + int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS); virtual vtkDataSet* diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index 9725d823..4e13c66e 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -201,19 +201,19 @@ VISU::StreamLines_i //--------------------------------------------------------------- -CORBA::Boolean +CORBA::Boolean VISU::StreamLines_i ::SetParams(CORBA::Double theIntStep, CORBA::Double thePropogationTime, CORBA::Double theStepLength, - VISU::Prs3d_ptr thePrs3d, + VISU::Prs3d_ptr thePrs3d, CORBA::Double thePercents, - VISU::StreamLines::Direction theDirection) -{ + VISU::StreamLines::Direction theDirection) +{ VISU::Prs3d_i* aPrs3d = NULL; vtkPointSet* aSource = NULL; - if(!thePrs3d->_is_nil()) - if((aPrs3d = dynamic_cast(VISU::GetServant(thePrs3d).in()))){ + if (!thePrs3d->_is_nil()) + if ((aPrs3d = dynamic_cast(VISU::GetServant(thePrs3d).in()))) { myAppendFilter->RemoveAllInputs(); myAppendFilter->AddInput(aPrs3d->GetPipeLine()->GetMapper()->GetInput()); aSource = myAppendFilter->GetOutput(); @@ -223,9 +223,8 @@ VISU::StreamLines_i theStepLength, aSource, thePercents, - theDirection, - 1); - if(anIsAccepted) + theDirection); + if (anIsAccepted) SetSource(aPrs3d); return anIsAccepted; } -- 2.39.2