Quintiq file version 2.0 
 | 
#parent: #root 
 | 
FunctionOverride CalcToAndFrom 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Calculate initial and final point 
 | 
    x0 := 0; 
 | 
    x1 := 0; 
 | 
    y0 := 0; 
 | 
    y1 := 0; 
 | 
     
 | 
     
 | 
    //PISP -> OperationInput 
 | 
    rcv := this.RoutingConfiguratorView(); 
 | 
    if( not isnull( rcv ) ) 
 | 
    { 
 | 
      pispwidth := rcv.PISPWidth() 
 | 
      midpispheight := [Number] ( rcv.PISPHeight() / 2 ); 
 | 
      midopheight := [Number] ( rcv.OperationInputOutputHeight() / 2 ); 
 | 
     
 | 
      fromop := this.OperationInput(); 
 | 
      toop := this.OperationInput(); 
 | 
     
 | 
      if( not isnull( toop ) and not isnull( fromop ) ) 
 | 
      { 
 | 
        x0 := fromop.PISPNodeX() + pispwidth; 
 | 
        y0 := ifexpr( this.OperationInput().IsLead(), fromop.PISPNodeY()+ midpispheight, fromop.PreviousInputNodeOfRoutingStep().PISPOperationInputEdge().FromY()); 
 | 
        x1 := toop.X(); 
 | 
        y1 := toop.Y() + midopheight 
 | 
     
 | 
        if( toop.IsElementOfInputGroup() ) 
 | 
        { 
 | 
          x0 := x0 + rcv.OperationInputGroupThickness(); 
 | 
          tomidx := [Number]( toop.MinWidth() / 2); 
 | 
          x1 := toop.MinX() + tomidx; 
 | 
          y1 := toop.OperationInputGroup().Y(); 
 | 
     
 | 
        } 
 | 
      } 
 | 
    } 
 | 
     
 | 
    // Set 
 | 
    this.FromX( x0 ); 
 | 
    this.FromY( y0 ); 
 | 
    this.ToX( x1 ); 
 | 
    this.ToY( y1 ); 
 | 
  *] 
 | 
} 
 |