From 1aead308982954197e87bdc30995435fcb04b459 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Sun, 10 Jul 2016 17:57:19 +0200 Subject: [PATCH] #2989 creaMaracasVisu Bug New Normal - ManualContourModel duplicate last point of contour lstPoints --- bbtk/src/bbcreaMaracasVisuTubeFilter.cxx | 5 ----- bbtk/src/bbcreaMaracasVisuTubeFilter.h | 4 ++-- .../wxWindows/widgets/manualContour/manualContourModel.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx index c25e3e5..dbb0a9e 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx @@ -109,8 +109,6 @@ namespace bbcreaMaracasVisu void MaracasTubeFilter::Run() { - - unsigned int i; unsigned int nTv = 8; // No. of surface elements for each tube vertex @@ -242,8 +240,6 @@ void TubeFilter::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - printf("EED TubeFilter::Process start \n"); - if (tubefilter!=NULL) { delete tubefilter; @@ -266,7 +262,6 @@ void TubeFilter::Process() tubefilter->SetlstColour( bbGetInputColour() ); tubefilter->Run(); bbSetOutputOutAxis( tubefilter->GetActor() ); - printf("EED TubeFilter::Process end \n"); } //===== diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.h b/bbtk/src/bbcreaMaracasVisuTubeFilter.h index e69a630..5228422 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.h +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.h @@ -108,9 +108,9 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(TubeFilter,bbtk::AtomicBlackBox); BBTK_INPUT(TubeFilter,lstPointY,"lstPointY",std::vector,""); BBTK_INPUT(TubeFilter,lstPointZ,"lstPointZ",std::vector,""); BBTK_INPUT(TubeFilter,lstRadio,"lstRadio. Default value is 1 everywhere.",std::vector,""); - BBTK_INPUT(TubeFilter,Colour,"Colour",std::vector,""); + BBTK_INPUT(TubeFilter,Colour,"Colour (default 1 0 0)",std::vector,""); BBTK_INPUT(TubeFilter,Transform,"vtkTransform", vtkLinearTransform *,""); - BBTK_INPUT(TubeFilter,Opacity,"Opacity",double,""); + BBTK_INPUT(TubeFilter,Opacity,"Opacity (default 1)",double,""); BBTK_OUTPUT(TubeFilter,OutAxis,"Tube Actor",vtkProp3D *,""); BBTK_END_DESCRIBE_BLACK_BOX(TubeFilter); //===== diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp index 947e614..7e3e8b8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp @@ -337,7 +337,8 @@ void manualContourModel::UpdateSpline() // virtual _delta_JSTG = (double) (np) / double (_sizePointsContour - 1); //Without the -1 the curve is not close } else { // _delta_JSTG = (double) (np-1) / double (_sizePointsContour ); //Without the -1 the curve is not close - _delta_JSTG = (double) (np) / double (_sizePointsContour-1 ); //Without the -1 the curve is not close +//EED 9/7/2016 _delta_JSTG = (double) (np) / double (_sizePointsContour-1 ); //Without the -1 the curve is not close + _delta_JSTG = (double) (np-1) / double (_sizePointsContour-1 ); //Without the -1 the curve is not close } //----------------------------------------------------------------------------------------------------------- } @@ -357,14 +358,14 @@ void manualContourModel::UpdateSpline() // virtual void manualContourModel::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtal { GetSpline_t_Point(i*_delta_JSTG,x,y,z); -} + // ---------------------------------------------------------------------------- //JSTG 25-02-08 --------------------------------------------------------------- void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, double *z) { - if (_lstPoints.size()==0) + if (_lstPoints.size()==0) { *x = 0; *y = 0; -- 2.47.1