- // RaC In the actual version, zInic=zFin=900
-
- _pts->SetPoint(0, xInic, yInic, zInic );
- _pts->SetPoint(1, xInic, yFin, zInic );
- _pts->SetPoint(2, xFin, yFin, zFin );
- _pts->SetPoint(3, xFin, yInic, zFin );
-
-
- _borderPolyMapper->Modified();
- _fillPolyMapper->Modified();
- //-----------
-
- updatePositionTextActors(xInic, yInic,zInic);
+ double xFin1,xFin2,xFin3;
+ // position referens from box name
+//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
+ GBoxModel* gbm=(GBoxModel*)_model;
+ if ( gbm->getNumInputPorts()>0 )
+ {
+ GPortModel* gpm = gbm->getInputPort( gbm->getNumInputPorts()-1 );
+ double xpFin, ypFin, zpFin;
+ gpm->getFinalPoint(xpFin, ypFin, zpFin);
+ xFin2 = xpFin+1;
+ }
+ // position referens from output ports
+ if ( gbm->getNumOutputPorts()>0 )
+ {
+ GPortModel* gpm = gbm->getOutputPort( gbm->getNumOutputPorts()-1 );
+ double xpFin, ypFin, zpFin;
+ gpm->getFinalPoint(xpFin, ypFin, zpFin);
+ xFin3 = xpFin+2;
+ }
+ xFin=xFin1;
+ if (xFin2>xFin) xFin=xFin2;
+ if (xFin3>xFin) xFin=xFin3;
+ _model->setFinalPoint( xFin , yFin , zFin );
+ }