From: jfa Date: Thu, 17 May 2007 09:04:42 +0000 (+0000) Subject: Fix bug 15064: IOLS. Stream Lines parameters are not edited. X-Git-Tag: mergeto_BR_Dev_For_4_0_21May07~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1b31c5012a78e4c4ab65c0122b5a4f55bba7104;p=modules%2Fvisu.git Fix bug 15064: IOLS. Stream Lines parameters are not edited. --- 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; }