X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsVtkGUIEditorGraphic%2FvtkGBoxView.cxx;h=02d194b772a3c283f2063a22a3513cda4c4d74ec;hb=67a6b56195db640eb7f2a478440c6aa39ccb59ae;hp=9e5c0d64d53f79ce05436b29444ae40c9d95cdc6;hpb=db7d4391e42d1af64599a2bbdc79c5d688ce24da;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx index 9e5c0d6..02d194b 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx @@ -78,31 +78,23 @@ namespace bbtk //========================================================================= void vtkGBoxView::update(int idController,int command) { - updateColors(); - + updateColors(); double xInic, yInic,zInic,xFin, yFin,zFin; _model->getInicPoint(xInic,yInic,zInic); _model->getFinalPoint(xFin, yFin,zFin); - // RaC In the actual version, zInic=zFin=GPOSITION_Z - _pts->SetPoint(0, xInic, yInic, zInic ); _pts->SetPoint(1, xInic, yFin, zInic ); _pts->SetPoint(2, xFin, yFin, zFin ); _pts->SetPoint(3, xFin, yInic, zFin ); - + _pts->Modified(); updatePorts(); - // _borderPolyMapper->Modified(); _fillPolyMapper->Modified(); - //----------- - - //----------- setRefreshWaiting(); } - //========================================================================= //EED2017 void vtkGBoxView::createVtkInputOutputPorts() @@ -112,6 +104,14 @@ namespace bbtk int numberOfTriangles = boxModel->getNumInputPorts(); _TrianglesInputsPts = vtkPoints::New(); _TrianglesInputsPts->SetNumberOfPoints( 3*numberOfTriangles ); + +//EED 2017-03-02 +// if (numberOfTriangles>0) +// { +// _TrianglesInputsPts->SetPoint(0, -1000, -1000, -1000 ); +// _TrianglesInputsPts->SetPoint(1, 1000, 1000, 1000 ); +// } + vtkCellArray *stripTrianglesInputs = vtkCellArray::New(); vtkPolyData *pdTrianglesInputs = vtkPolyData::New(); _TrianglesInputsPolyMapper = vtkPolyDataMapper::New(); @@ -135,6 +135,14 @@ namespace bbtk numberOfTriangles = boxModel->getNumOutputPorts(); _TrianglesOutputsPts = vtkPoints::New(); _TrianglesOutputsPts->SetNumberOfPoints( 3*numberOfTriangles ); + +//EED 2017-03-02 +// if (numberOfTriangles>0) +// { +// _TrianglesOutputsPts->SetPoint(0, -1000, -1000, -1000 ); +// _TrianglesOutputsPts->SetPoint(1, 1000, 1000, 1000 ); +// } + vtkCellArray *stripTrianglesOutputs = vtkCellArray::New(); vtkPolyData *pdTrianglesOutputs = vtkPolyData::New(); _TrianglesOutputsPolyMapper = vtkPolyDataMapper::New(); @@ -179,10 +187,12 @@ namespace bbtk //EED _pts->SetPoint(1, xInic, yFin, zInic ); //EED _pts->SetPoint(2, xFin, yFin, zFin ); //EED _pts->SetPoint(3, xFin, yInic, zFin ); - _pts->SetPoint(0, -1000, -1000, -1000 ); - _pts->SetPoint(1, xInic, yFin, zInic ); - _pts->SetPoint(2, 1000, 1000, 1000 ); - _pts->SetPoint(3, xFin, yInic, zFin ); + +//EED 2017-03-02 +// _pts->SetPoint(0, -1000, -1000, -1000 ); +// _pts->SetPoint(1, xInic, yFin, zInic ); +// _pts->SetPoint(2, 1000, 1000, 1000 ); +// _pts->SetPoint(3, xFin, yInic, zFin ); // lines->InsertNextCell(5); // lines->InsertCellPoint(0); @@ -298,6 +308,7 @@ namespace bbtk _TrianglesInputsPts->SetPoint(i*3+1, ( xInic + xFin ) / 2 , yFin , zInic ); _TrianglesInputsPts->SetPoint(i*3+2, xFin , yInic , zFin ); } + _TrianglesInputsPts->Modified(); _TrianglesInputsPolyMapper->Modified( ) ; // update position for one Actor that represents all OutputPorts @@ -312,6 +323,7 @@ namespace bbtk _TrianglesOutputsPts->SetPoint(i*3+1, ( xInic + xFin ) / 2 , yFin , zInic ); _TrianglesOutputsPts->SetPoint(i*3+2, xFin , yInic , zFin ); } + _TrianglesOutputsPts->Modified(); _TrianglesOutputsPolyMapper->Modified( ) ;