]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GConnectorModel.cxx
v1.1.0 BUG 1400
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GConnectorModel.cxx
index ebdf3715aeb5d46cc7854e77ed81c671fb2ded28..7be647f13f8797d20cb12d80de3a43e72434d3f6 100644 (file)
@@ -136,6 +136,7 @@ namespace bbtk
                // Refresh the position of the contourModel last point with the data of the connector model
                point = _model->GetManualPoint(_model->GetSizeLstPoints()-1);
                point->SetPoint(xCenter,yport,zCenter);
+               
        }
 
        //=========================================================================
@@ -157,6 +158,8 @@ namespace bbtk
 
        void GConnectorModel::save(std::string &content)
        {
+               char buffer[50];
+
                content+="CONNECTION\n";
 
                // Connection info
@@ -168,6 +171,19 @@ namespace bbtk
                content+=":";
                content+=_endPort->getBBTKName();
                content+="\n";
+               
+               int i,sizeLstPoints = _model->GetSizeLstPoints()-2;
+               content+="NumberOfControlPoints:";
+               sprintf (buffer, "%d", sizeLstPoints );
+               content+=buffer;
+               content+="\n";
+               
+               for (i=0;i<sizeLstPoints;i++)
+               {
+                       manualPoint *mp = _model->GetManualPoint(i+1);
+                       sprintf (buffer, "%f:%f:%f\n", (float)mp->GetX(),(float)mp->GetY(),(float)mp->GetZ() );
+                       content+=buffer;
+               }               
        }
 
        //=========================================================================