From 8c6d29c9d753d55b8bc04e9ff95d0617ded15f13 Mon Sep 17 00:00:00 2001 From: davila <> Date: Thu, 30 Sep 2010 07:17:09 +0000 Subject: [PATCH] no message --- .../vtkGBlackBoxView.cxx | 13 +++++++-- .../bbsVtkGUIEditorGraphic/vtkGBoxView.cxx | 13 +++++++-- .../vtkGComplexBoxPortView.cxx | 13 +++++++-- .../bbsVtkGUIEditorGraphic/vtkGPortView.cxx | 25 +++++++++-------- .../bbtkwxGUIEditorGraphicBBS.cxx | 3 +- .../wxVtkSceneManager.cxx | 9 +++++- .../bbsWxGUIEditorGraphic/wxVtkSceneManager.h | 28 +++++++++---------- 7 files changed, 66 insertions(+), 38 deletions(-) diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx index 5377d7b..4dbbbed 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx @@ -98,11 +98,18 @@ namespace bbtk // RaC In the actual version, zInic=zFin=900 - _pts->SetPoint(0, xInic, yInic, zInic ); +//EED _pts->SetPoint(0, xInic, yInic, zInic ); +//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, xFin, yFin, zFin ); + _pts->SetPoint(2, 1000, 1000, 1000 ); _pts->SetPoint(3, xFin, yInic, zFin ); - + + + lines->InsertNextCell(5); lines->InsertCellPoint(0); lines->InsertCellPoint(1); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx index 89d0252..b95f204 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx @@ -96,11 +96,18 @@ namespace bbtk // RaC In the actual version, zInic=zFin=900 - _pts->SetPoint(0, xInic, yInic, zInic ); +//EED _pts->SetPoint(0, xInic, yInic, zInic ); +//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, xFin, yFin, zFin ); + _pts->SetPoint(2, 1000, 1000, 1000 ); _pts->SetPoint(3, xFin, yInic, zFin ); - + + + lines->InsertNextCell(5); lines->InsertCellPoint(0); lines->InsertCellPoint(1); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx index 3f528c0..35dc1a8 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx @@ -96,11 +96,18 @@ namespace bbtk // RaC In the actual version, zInic=zFin=900 - _pts->SetPoint(0, xInic, yInic, zInic ); +//EED _pts->SetPoint(0, xInic, yInic, zInic ); +//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, xFin, yFin, zFin ); + _pts->SetPoint(2, 1000, 1000, 1000 ); _pts->SetPoint(3, xFin, yInic, zFin ); - + + lines->InsertNextCell(5); lines->InsertCellPoint(0); lines->InsertCellPoint(1); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx index 321a858..40e9478 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx @@ -90,10 +90,15 @@ namespace bbtk double mid = (xInic+xFin)/2; - _pts->SetPoint(0, xInic, yInic, zInic ); +//EED _pts->SetPoint(0, xInic, yInic, zInic ); +//EED _pts->SetPoint(1, mid, yFin, zInic ); +//EED _pts->SetPoint(2, xFin, yInic, zFin ); + + _pts->SetPoint(0, -1000, -1000, -1000 ); _pts->SetPoint(1, mid, yFin, zInic ); - _pts->SetPoint(2, xFin, yInic, zFin ); - + _pts->SetPoint(2, 1000, 1000, 1000 ); + + ///************************* FILL ************************* vtkCellArray *strip = vtkCellArray::New(); @@ -126,14 +131,12 @@ namespace bbtk void vtkGPortView::updateColors() { - _fillObjectActor->GetProperty()->SetColor(0.5,0.45,0.45); + _fillObjectActor->GetProperty()->SetColor(0.45,0.45,0.45); if(_state==HIGHLIGHTED) { - _fillObjectActor->GetProperty()->SetColor(0.8,0.8,0.8); - } - else - { + _fillObjectActor->GetProperty()->SetColor( 0 , 0 , 1 ); + } else { GPortModel* portm = (GPortModel*)_model; if(portm->isConnected()) { @@ -142,10 +145,8 @@ namespace bbtk else if(portm->isValueSet()) { _fillObjectActor->GetProperty()->SetColor(0.55,0.25,0.25); - } - else - { - _fillObjectActor->GetProperty()->SetColor(0.5,0.45,0.45); + } else { + _fillObjectActor->GetProperty()->SetColor(0.45,0.45,0.45); } } } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index c9c63b3..75b6c25 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -622,10 +622,9 @@ namespace bbtk std::string packageName = bbDes->GetPackage()->GetName(); this->_tabsMgr->getActualTabPanel()->getSceneManager()->createGBlackBox(50,50,packageName, typeName); - + this->_tabsMgr->getActualTabPanel()->getSceneManager()->refresh(); printf("EED wxGUIEditorGraphicBBS::OnClickBtnBox \n"); - refreshGUIControls(); } //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 66c468a..60f3cb5 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -1449,11 +1449,18 @@ printf("EED wxVtkSceneManager::createGComplexBoxOutputPort 900-450\n"); //========================================================================= + + void wxVtkSceneManager::refresh() + { + _baseView->Refresh(); + } + //========================================================================= + void wxVtkSceneManager::refreshScene() { _baseView->RefreshView(); } - + //========================================================================= void wxVtkSceneManager::centerView() diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h index e3bd1b1..61dc0ca 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h @@ -131,6 +131,7 @@ namespace bbtk virtual void update(int idController,int command); + void refresh(); void refreshScene(); void displayBlackBoxInfo(std::string packageName, std::string boxName); void updateStatusBar(std::string textStatus); @@ -193,41 +194,40 @@ namespace bbtk private: //wxPanel that uses the manager - wxGEditorTabPanel *_parent; + wxGEditorTabPanel *_parent; // Id of the manager, the same of the panel - int _idManager; + int _idManager; // Boxes number in the scene - int _numBoxes; + int _numBoxes; // StartDragging - bool _startDragging; + bool _startDragging; // creaMaracasVisu viewer - wxVtk3DBaseView *_baseView; + wxVtk3DBaseView *_baseView; // State of the 3D Scene or the virtual world int _worldState; //Map of id - objectController - std::map _controllers; + std::map _controllers; //Saves the id's of the selected objects in the controllers map - std::vector _selectedObjects; + std::vector _selectedObjects; //Is the diagram in state complex box - bool _isComplexBox; + bool _isComplexBox; - int _idConnectionInCreation; + int _idConnectionInCreation; int _contLastId; - vtkTextActor3D *_textActor; - vtkPoints *_pts; - vtkActor *_fillObjectActor; -//EED Borrame vtkPolyDataMapper *_fillPolyMapper; - vtkDataSetMapper *_aPolygonMapper; + vtkTextActor3D *_textActor; + vtkPoints *_pts; + vtkActor *_fillObjectActor; + vtkDataSetMapper *_aPolygonMapper; protected: -- 2.47.1