]> Creatis software - bbtkGEditor.git/commitdiff
#3249 Change FontSize - Box graphic scale
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Mon, 17 Jan 2022 08:37:45 +0000 (09:37 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Mon, 17 Jan 2022 08:37:45 +0000 (09:37 +0100)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GConnectorModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourController.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx

index a0ea7347b5e5422cd70ee5b638f6261075eb84e3..19fa703f41b418a06a10b751ddb1d5452f0438a6 100644 (file)
@@ -158,41 +158,41 @@ namespace bbtk
                _startPort->getFinalPoint(xport,yport,zport);
 
                // Refresh the position of the contourModel first point with the data of the connector model
-               manualPoint* point = _model->GetManualPoint(0);
-               bsx=point->GetX(); 
-               bsy=point->GetY(); 
+               manualPoint* point  = _model->GetManualPoint(0);
+               bsx                 = point->GetX();
+               bsy                 = point->GetY();
                point->SetPoint(xCenter,yport,zCenter);
-               nsx=xCenter;
-               nsy=yport;
+               nsx                 = xCenter;
+               nsy                 = yport;
                
                //End Point     
                _endPort->getCenter(xCenter,yCenter,zCenter);
                _endPort->getInicPoint(xport,yport,zport);
 
                // Refresh the position of the contourModel last point with the data of the connector model
-               point = _model->GetManualPoint(_model->GetSizeLstPoints()-1);
-               bex=point->GetX(); 
-               bey=point->GetY(); 
+               point   = _model->GetManualPoint(_model->GetSizeLstPoints()-1);
+               bex     = point->GetX();
+               bey     = point->GetY();
                point->SetPoint(xCenter,yport,zCenter);
-               nex=xCenter;
-               ney=yport;
+               nex     = xCenter;
+               ney     = yport;
 
                
                // moving point of the spline connection
                if ( ((bsx!=nsx)&&(bex!=nex)) ||  ((bsy!=nsy)&&(bey!=ney)) )
                {
-                       double difx=bsx-nsx; 
-                       double dify=bey-ney;
+                       double difx = bsx-nsx;
+                       double dify = bey-ney;
                        double tmpX, tmpY, tmpZ;
                        int i,size=_model->GetSizeLstPoints();
                        if (size>2)
                        {
                                for (i=1;i<size-1;i++)
                                {
-                                       point = _model->GetManualPoint(i);
-                                       tmpX = point->GetX();
-                                       tmpY = point->GetY();
-                                       tmpZ = point->GetZ();
+                                       point   = _model->GetManualPoint(i);
+                                       tmpX    = point->GetX();
+                                       tmpY    = point->GetY();
+                                       tmpZ    = point->GetZ();
                                        point->SetPoint(tmpX-difx,tmpY-dify,tmpZ);
                                } // for i
                        }// if size
index c902136502ee383e037fed4e4493fef7fe15028f..bd274231795708303b368c7bcec329699a59d8ba 100644 (file)
@@ -91,12 +91,19 @@ namespace bbtk {
        const int CREATING_CONTOUR                      =       106;
 
        // Object dimensions
-       const double BOX_HEIGHT                         =       10;
-       const double BOX_WIDTH                          =       100;
-       const double PORT_HEIGHT                        =       1.8;
-       const double PORT_WIDTH                         =       2.8;
-       const double COMPLEXPORT_HEIGHT         =       8;
-       const double COMPLEXPORT_WIDTH          =       8;
+//EED 2020-01-15
+//  const double BOX_WIDTH              =   100;
+//  const double BOX_HEIGHT             =   10;
+    const double BOX_WIDTH              =   25;
+       const double BOX_HEIGHT                         =       2.5;  // BOX_WIDTH / 10
+//     const double PORT_WIDTH                         =       2.8;
+//  const double PORT_HEIGHT            =   1.8;
+    const double PORT_WIDTH             =   1.6;
+    const double PORT_HEIGHT            =   0.8; // PORT_WIDTH / 2
+//     const double COMPLEXPORT_HEIGHT         =       8;
+//     const double COMPLEXPORT_WIDTH          =       8;
+    const double COMPLEXPORT_HEIGHT     =   3.3;   //  BOX_HEIGHT + PORT_HEIGHT
+    const double COMPLEXPORT_WIDTH      =   3.3;   //  BOX_HEIGHT + PORT_HEIGHT
 
        // Commands
        const int NO_COMMAND                            =       201;
index 9336bae8b30fc40318fd14a670ca36c6afb51056..fb62c6a990630b0788e13de5543c1cb3e114e3f2 100644 (file)
@@ -159,7 +159,7 @@ namespace bbtk
                        {
                                ok=true;
                                AddPoint(x,y,z);
-                               _bakIdPoint=GetNumberOfPointsManualContour() - 1;
+                               _bakIdPoint = GetNumberOfPointsManualContour() - 1;
                        }
 
                        // Insert Control Points IF Contour si Selected
index 15c1f19aa7f7cf719b70a8adb633e8212dd59d6d..36800fbc11e7d5f6af3d2a72f54ae434efebae1c 100644 (file)
@@ -85,7 +85,9 @@ namespace bbtk
 
                double xFin1,xFin2,xFin3;
                // position referens from box name
-               xFin1 = xInic+(bounds[1]-bounds[0])/2 + 20;
+//EED 2020-01-15
+//        xFin1 = xInic+(bounds[1]-bounds[0])/2 + 20;
+               xFin1 = xInic+(bounds[1]-bounds[0])/10 + 20;
         xFin2=xFin1;
         xFin3=xFin1;
         // position referens from input ports
@@ -205,17 +207,17 @@ namespace bbtk
 
                //------------
 
+//        _boxTextActor            = vtkTextActor::New();  // for actor 2D
                _boxTextActor                   = vtkTextActor3D::New();
                vtkTextProperty *prop   =  vtkTextProperty::New();
                prop->BoldOn();
                prop->SetFontFamilyToArial();
-               _boxTextActor->GetTextProperty()->BoldOn();
-               prop->SetFontSize(80);
+        prop->ShadowOff();
+//EED 2020-01-15
+//             prop->SetFontSize(80);
+//        prop->SetFontSize(15);
+        prop->SetFontSize(40);
                _boxTextActor->SetTextProperty(prop);
-       
-       //      _boxTextActor->GetTextProperty()->SetFontSize(80);
-               
-
                //------------
 
                updatePositionTextActor( xInic,  yInic,  zInic);
@@ -249,7 +251,10 @@ namespace bbtk
                temp+=":";
                temp+=_model->getBBTKName();
                _boxTextActor->SetInput(temp.c_str());
-               _boxTextActor->SetPosition(xInic+4,yInic-7,zInic+1);
+//        _boxTextActor->SetPosition(xInic+4,yInic-7);  // for actor 2D
+//EED 2020-01-15
+//             _boxTextActor->SetPosition(xInic+4,yInic-7,zInic+1);
+        _boxTextActor->SetPosition(xInic+1.1,yInic-BOX_HEIGHT,zInic+1);
                _boxTextActor->SetScale(0.05,0.05,1);
        }
 
index 538ef7eb666a6da30c33f10b562d472d41c9d48b..53f48b80c9d34359ea54a824c32d91de5cc21d0d 100644 (file)
@@ -86,7 +86,9 @@ Version:   $Revision$
 #include "vtkRenderer.h"
 #include "vtkCellArray.h"
 
+//#include "vtkTextActor.h"  // for ator 2D
 #include "vtkTextActor3D.h"
+
 #include "vtkTextProperty.h"
 
 //Includes std
@@ -103,7 +105,8 @@ namespace bbtk
                //Public methods
        private:
                //Private Attributes
-               vtkTextActor3D          *_boxTextActor;
+//         vtkTextActor        *_boxTextActor;  // for actor 2D
+               vtkTextActor3D              *_boxTextActor;
                //Private Methods
                void updatePositionTextActor(double xInic, double yInic, double zInic);
        protected:
index 0ba3bbbf1c5d410109d359d5d770cf8ebc96fe7d..fb4a8a20e7494cd6cb0f8dc33fec20ef68351466 100644 (file)
@@ -96,8 +96,8 @@ wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent)
        initToolbar();
        initPackageBrowser();
        initTabPanelsManager();
-        // JGGR & CM  initHelpHTMLBrowser();
-        _helpHtmlBrowser = NULL;
+    // JGGR & CM  initHelpHTMLBrowser();
+    _helpHtmlBrowser = NULL;
        CreateStatusBar();
        _frameAUIMgr->Update();
        _actualPkgBrowserBoxName = "";
@@ -107,7 +107,7 @@ wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent)
        /////////////////////////////////
        /// IMPORTANT!! FOR SAVE&LOAD PROCESSES THE VERSION IS VERY IMPORTANT.
        /// RaC 2012 2nd Hackfest
-       _currentBBGversion="1.4";
+       _currentBBGversion="1.5";
 }
 
 //=========================================================================
index 6c6b1b0fb5bf09d105abdb35c705080f3f8e7811..07b43058ccffe014b0bdce97850b8266b79d2c97 100644 (file)
@@ -137,47 +137,41 @@ wxVtkSceneManager::~wxVtkSceneManager()
 void wxVtkSceneManager::configureBaseView() 
 {
        vtkInteractorStyleBaseView2D *interactorstylebaseview = vtkInteractorStyleBaseView2D::New();
-
        _baseView->SetInteractorStyleBaseView(interactorstylebaseview);
-
        // Important to activate the 2D interaction system
        crea::wxVTKRenderWindowInteractor *iren =       _baseView->GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor(iren);
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(_baseView);
-
        _baseView->GetRenderer()->GetActiveCamera()->ParallelProjectionOn();
        _baseView->GetRenderer()->ResetCamera(-100, 100, -100, 100, -1000, 1000);
-       _baseView->GetRenderer()->GetActiveCamera()->Zoom(10);
-
-
+       _baseView->GetRenderer()->GetActiveCamera()->Zoom(20);
        _baseView->GetRenderer()->SetBackground(0.9, 0.9, 0.9);
        _baseView->GetRenderer()->GradientBackgroundOn();
-
        // Actos Port_Text
        _textActor = vtkTextActor3D::New();
 //     _textActor = vtkTextActor::New();
        _textActor->SetPosition(-9999, -9999, GPOSITION_Z);
        _textActor->SetInput("<void>");
-       _textActor->GetTextProperty()->SetFontSize(60);
+//EED 2022-01-16
+//    _textActor->GetTextProperty()->SetFontSize(60);
+       _textActor->GetTextProperty()->SetFontSize(40);
        _textActor->GetTextProperty()->BoldOn();
+    _textActor->GetTextProperty()->SetFontFamilyToArial();
+    _textActor->GetTextProperty()->ShadowOff();
        _textActor->GetTextProperty()->SetColor(PORTTEXT_NH_R, PORTTEXT_NH_G,PORTTEXT_NH_B);
-
        _baseView->GetRenderer()->AddActor(_textActor);
-
        // Actor  Fill_Port_Text
-
        //------------
-       double xInic = 0;
-       double yInic = 0;
-       double zInic = GPOSITION_Z;
-
-       vtkPolygon *aPolygon = vtkPolygon::New();
-       _fillObjectActor = vtkActor::New();
+       double xInic            = 0;
+       double yInic            = 0;
+       double zInic            = GPOSITION_Z;
+       vtkPolygon *aPolygon    = vtkPolygon::New();
+       _fillObjectActor        = vtkActor::New();
+       _pts                    = vtkPoints::New();
 
-       _pts = vtkPoints::New();
-
-       double w = 100, h = 10, b = h / 15, t = 3;
+/*
+    double w = 100, h = 10, b = h / 15, t = 3;
        _pts->SetNumberOfPoints(21);
        _pts->InsertPoint(0, xInic + w * 0.33 - t / 2, yInic, zInic);
        _pts->InsertPoint(1, xInic + w * 0.33, yInic - t, zInic);
@@ -204,33 +198,43 @@ void wxVtkSceneManager::configureBaseView()
        _pts->InsertPoint(18, xInic + b * 1, yInic + b * 2, zInic);
        _pts->InsertPoint(19, xInic + b * 2, yInic + b * 1, zInic);
        _pts->InsertPoint(20, xInic + b * 4, yInic + b * 0, zInic);
+    aPolygon->GetPointIds()->SetNumberOfIds(21);
+    for (int i = 0; i < 21; i++) {
+    {
+        aPolygon->GetPointIds()->SetId(i, i);
+    }
+*/
 
-       aPolygon->GetPointIds()->SetNumberOfIds(21);
-       for (int i = 0; i < 21; i++) {
+    double w = BOX_WIDTH, h = BOX_HEIGHT, t = PORT_HEIGHT;
+    _pts->SetNumberOfPoints(7);
+    _pts->InsertPoint(0, xInic + t/2.0  , yInic + t     , zInic );
+    _pts->InsertPoint(1, xInic + w      , yInic + t     , zInic );
+    _pts->InsertPoint(2, xInic + w      , yInic + t + h , zInic );
+    _pts->InsertPoint(3, xInic - t*1.5  , yInic + t + h , zInic );
+    _pts->InsertPoint(4, xInic - t*1.5  , yInic + t     , zInic );
+    _pts->InsertPoint(5, xInic - t/2    , yInic + t     , zInic );
+    _pts->InsertPoint(6, xInic          , yInic         , zInic );
+    aPolygon->GetPointIds()->SetNumberOfIds(8);
+       for (int i = 0; i < 8; i++)
+    {
                aPolygon->GetPointIds()->SetId(i, i);
+        if (i==7) aPolygon->GetPointIds()->SetId(i, 0);
        }
-
        vtkUnstructuredGrid *aPolygonGrid = vtkUnstructuredGrid::New();
        aPolygonGrid->Allocate(1, 1);
-       aPolygonGrid->InsertNextCell(aPolygon->GetCellType(),
-                       aPolygon->GetPointIds());
+       aPolygonGrid->InsertNextCell(aPolygon->GetCellType(),aPolygon->GetPointIds());
        aPolygonGrid->SetPoints(_pts);
        _aPolygonMapper = vtkDataSetMapper::New();
-
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
        _aPolygonMapper->SetInput(aPolygonGrid);
 #else
        _aPolygonMapper->SetInputData(aPolygonGrid);
 #endif
-
-
        _fillObjectActor->SetMapper(_aPolygonMapper);
-       _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R, PORTFILL_NH_G,
-                       PORTFILL_NH_B);
+       _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R, PORTFILL_NH_G,PORTFILL_NH_B);
        _fillObjectActor->GetProperty()->SetOpacity(0);
        _aPolygonMapper->Modified();
-
        _baseView->GetRenderer()->AddActor(_fillObjectActor);
 }
 
@@ -592,8 +596,11 @@ int wxVtkSceneManager::createGConnector(GPortModel* startPort)
          * @param WidthLine  
          */
  //EED2017
-        manContourView->SetWidthLine( 3 ) ;
-       manContourView->SetShowText(false);
+//        manContourView->SetWidthLine( 3 ) ;
+//EED 2022-01-16
+          manContourView->SetWidthLine( 1 ) ;
+
+    manContourView->SetShowText(false);
 
        manContourControl->SetModelView(manContourModel, manContourView);
 
@@ -880,25 +887,33 @@ bool wxVtkSceneManager::OnMouseMove()
                                        // PortText
                                        if ( ( _bugTextActor_text==desc->getStatusText() ) || (_bugTextActor_status==0) )
                                        {
-                                               _bugTextActor_status    = 1;
-                                               okPortMessage           = true;
-                                               py                      = py + 5;
-                                               _textActor->SetScale(0.1);
-                                               std::string tmp = desc->getStatusText()+"\n";
+                        _bugTextActor_status   = 1;
+                                               okPortMessage               = true;
+//EED 2022-01-16
+//                        py                      = py + 5;
+//                                             _textActor->SetScale(0.1);
+//                        py                         = py + 5*0.5;
+                        _textActor->SetScale(0.05,0.05,1);
+
+                                               std::string tmp         = desc->getStatusText()+"\n";
                                                _textActor->SetInput( tmp.c_str() );
-                                               _textActor->SetPosition(px - 25, py + 1, pz + 2);
+//                      _textActor->SetPosition(px - 25, py + 1, pz + 2);
+//                      _textActor->SetPosition(px  , py-PORT_HEIGHT/4 , pz + 2);
+                                               _textActor->SetPosition(px  , py-PORT_HEIGHT , pz + 2);
                                                _textActor->Modified();
                                                // FillPortText
-                                               px                      = px - 33;
-                                               //py = py;
-                                               _fillObjectActor->SetScale(1);
-                                               _fillObjectActor->GetProperty()->SetOpacity(0.50);
-                                               _fillObjectActor->SetPosition(px, py, 1);
+//EED 2022-01-16
+//                        px                         = px - 33;
+                        _fillObjectActor->SetScale(1);
+//                        px                         = px - 33*0.7;
+//                                             _fillObjectActor->SetScale(0.7,0.5,1);
+                                               _fillObjectActor->GetProperty()->SetOpacity(0.75);
+                                               _fillObjectActor->SetPosition( px, py + PORT_HEIGHT/2.0 , 1);
                                                _aPolygonMapper->Modified();
                                        } else {
-                                               _bugTextActor_status    = 2;
+                                               _bugTextActor_status= 2;
                                        } //  _bugTextActor_tex
-                                       _bugTextActor_text              = desc->getStatusText();
+                                       _bugTextActor_text                  = desc->getStatusText();
 
                                } // if GPORT
                        }  //if state
@@ -1953,6 +1968,9 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        if (line == "# - BBTKGEditor v 1.4 BBG BlackBox Diagram file") {
                                version = line.substr(18, 3);
                        }
+            if (line == "# - BBTKGEditor v 1.5 BBG BlackBox Diagram file") {
+                version = line.substr(18, 3);
+            }
                } else if (line == "APP_START") {
                        start = true;
                        break;
@@ -1960,7 +1978,8 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
        }
 
 
-       if (start) {
+       if (start)
+    {
 
                if ((version != "1.0") && (version != "1.1")) {
                        getCleanLine(inputStream, line);//CATEGORY:<category of the box>
@@ -1993,10 +2012,12 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                result = strtok(NULL, delims);
                std::string isComplexBox(result);
 
-               if (isComplexBox == "TRUE") {
+               if (isComplexBox == "TRUE")
+        {
                        _isComplexBox = true;
 
-                       if ((version != "1.0") && (version != "1.1")) {
+                       if ((version != "1.0") && (version != "1.1"))
+            {
                                getCleanLine(inputStream, line);//COMPLEXNAME:<name of the complex box>
                                char complexboxnameTmp[255];
                                strcpy(complexboxnameTmp, line.c_str());
@@ -2010,7 +2031,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                result = strtok(packagenameTmp, delims);
                                result = strtok(NULL, delims);
                                SetCbPackageName(result);
-                       }
+                       } // if version !1.0  !1.1
 
                        if(version < "1.4")
                        {
@@ -2027,7 +2048,8 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                std::istringstream inps(result);
                                inps >> numInputs;
 
-                               for (int i = 0; i < numInputs; i++) {
+                               for (int i = 0; i < numInputs; i++)
+                {
                                        //----------
                                        getCleanLine(inputStream, line);//COMPLEX_PORT
                                        getCleanLine(inputStream, line);//name
@@ -2055,14 +2077,14 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                        if (version<="1.2")
                                        {
                                                if (zIn==900) zIn=GPOSITION_Z;
-                                       }
+                                       } // if version <=1.2
 
                                        getCleanLine(inputStream, line);//FIN_COMPLEX_PORT
 
                                        configGComBoxInputOutputPort(true, inputPortName, xIn, yIn, zIn);
 
                                } // for input complex box
-                       }
+                       } // if version < 1.4
 
 
 
@@ -2080,7 +2102,8 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        std::istringstream outps(result);
                        outps >> numOutputs;
 
-                       for (int i = 0; i < numOutputs; i++) {
+                       for (int i = 0; i < numOutputs; i++)
+            {
                                //----------
                                getCleanLine(inputStream, line);//COMPLEX_PORT
                                getCleanLine(inputStream, line);//name
@@ -2109,15 +2132,21 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                {
                                        if (zIn==900) zIn=GPOSITION_Z;
                                }
-                               
+//EED 2022-01-16
+                if (version<="1.4")
+                {
+                    xIn = xIn*0.70;
+                    yIn = yIn*0.30;
+                }
+
                                getCleanLine(inputStream, line);//FIN_COMPLEX_PORT
 
                                configGComBoxInputOutputPort(false, outputPortName, xIn, yIn, zIn);
 
                        } // for output complex box
+               } // if isComplexBox
 
-               } // complex box
-
+        
                // RaC2012 2nd Hackfest
                if(version >= "1.4")
                {
@@ -2134,13 +2163,11 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        std::istringstream inps(result);
                        inps >> numInputs;
 
-                       for (int i = 0; i < numInputs; i++) {
-                               //----------
+                       for (int i = 0; i < numInputs; i++)
+            {
                                getCleanLine(inputStream, line);//COMPLEX_PORT
                                getCleanLine(inputStream, line);//name
                                std::string inputPortName(line);
-
-                               //----------
                                getCleanLine(inputStream, line);//xInic:yInic:zInic
                                char coord[80];
                                strcpy(coord, line.c_str());
@@ -2150,7 +2177,6 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                std::string yInic(result);
                                result = strtok(NULL, delims);//zInic
                                std::string zInic(result);
-
                                double xIn, yIn, zIn;
                                std::istringstream xSt(xInic);
                                xSt >> xIn;
@@ -2158,18 +2184,20 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                ySt >> yIn;
                                std::istringstream zSt(zInic);
                                zSt >> zIn;
-
                                if (version<="1.2")
                                {
                                        if (zIn==900) zIn=GPOSITION_Z;
                                }
-                               
+//EED 2022-01-16
+                if (version<="1.4")
+                {
+                    xIn = xIn*0.70;
+                    yIn = yIn*0.30;
+                }
                                getCleanLine(inputStream, line);//FIN_COMPLEX_PORT
                                configGComBoxInputOutputPort(true, inputPortName, xIn, yIn, zIn);
-
                        } // for external input
-               }
-
+               }   //      if(version >= "1.4")
 
                //----------
                getCleanLine(inputStream, line);//BOXES:num
@@ -2214,7 +2242,6 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        std::string yInic(result);
                        result = strtok(NULL, delims);//zInic
                        std::string zInic(result);
-
                        double xIn, yIn, zIn;
                        std::istringstream xSt(xInic);
                        xSt >> xIn;
@@ -2223,13 +2250,16 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        std::istringstream zSt(zInic);
                        zSt >> zIn;
 
-                       
                        if (version<="1.2")
                        {
                                if (zIn==900) zIn=GPOSITION_Z;
                        }
-                       
-                       
+//EED 2022-01-16
+            if (version<="1.4")
+            {
+                xIn = xIn*0.70;
+                yIn = yIn*0.30;
+            }
                        //----------
                        getCleanLine(inputStream, line);//xEnd:yEnd:zEnd
                        strcpy(coord, line.c_str());
@@ -2252,7 +2282,8 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        {
                                if (zEn==900) zEn=GPOSITION_Z;
                        }
-                       
+//EED 2022-01-16
+            yEn = yIn-BOX_HEIGHT;
                        
                        bool boxExecutable = false;
                        if (isExec == "TRUE") 
@@ -2290,9 +2321,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                        strcat(result,tmpString.c_str());
                                }
                                std::string value(result);
-
                                bbmod->setValueToInput(name, value);
-
                                getCleanLine(inputStream, line);//PORT o FIN_BOX
                                port = line.substr(0, 4);
                        } // while
@@ -2307,7 +2336,6 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                strcpy(conns, line.c_str());
                result = strtok(conns, delims);
                result = strtok(NULL, delims);
-
                int numConns;
                std::istringstream isCons(result);
                isCons >> numConns;
@@ -2318,7 +2346,6 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        //----------
                        getCleanLine(inputStream, line);//CONNECTION
                        getCleanLine(inputStream, line);//Startbox.PortName:EndBox.PortName
-
                        char connec[200];
                        strcpy(connec, line.c_str());
                        result = strtok(connec, delims);
@@ -2329,28 +2356,23 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        std::string nameEndBox(result);
                        result = strtok(NULL, delims);
                        std::string nameEndPort(result);
-
                        int idCon = configGConnetion(nameStartBox, nameStartPort,nameEndBox, nameEndPort);
-
                        if (version != "1.0") {
                                //Readding control points of the manualContour
-                               GConnectorController *tempp             = (GConnectorController*) _controllers[idCon];
-                               GConnectorModel *conMod                 = (GConnectorModel*) tempp->getModel();
-                               vtkGConnectorView *conView              = (vtkGConnectorView*) tempp->getView();
+                               GConnectorController    *tempp          = (GConnectorController*) _controllers[idCon];
+                               GConnectorModel         *conMod         = (GConnectorModel*) tempp->getModel();
+                               vtkGConnectorView       *conView        = (vtkGConnectorView*) tempp->getView();
                                getCleanLine(inputStream, line); //NumberOfControlPoints:##
                                strcpy(conns, line.c_str());
                                result = strtok(conns, delims);
                                result = strtok(NULL, delims);
-
                                int numberOfControlPoints;
                                std::istringstream isCons(result);
                                isCons >> numberOfControlPoints;
-
                                for (int ii = 0; ii < numberOfControlPoints; ii++) {
                                        getCleanLine(inputStream, line); //XX:YY:ZZ
                                        char connec[200];
                                        strcpy(connec, line.c_str());
-
                                        double px, py, pz;
                                        result = strtok(connec, delims);
                                        std::istringstream isPointX(result);
@@ -2361,18 +2383,22 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                        result = strtok(NULL, delims);
                                        std::istringstream isPointZ(result);
                                        isPointZ >> pz;
-               
                                        if (version<="1.2")
                                        {
                                                if (pz==900) pz=GPOSITION_Z;
                                        }
-                                       
+//EED 2022-01-16
+                    if (version<="1.4")
+                    {
+                        px = px*0.70;
+                        py = py*0.30;
+                    }
                                        conMod->getManualContourModel()->InsertPoint_id(ii + 1, px, py, pz);
                                        conView->getManualContourView()->AddPoint();
                                }
-                       }// version !=1.0
+                       }// if version !=1.0
                } // for numConns
-       } // start      
+       } // if start
 }
 //=========================================================================