Class LayoutLHXOver


  • public class LayoutLHXOver
    extends LayoutXOver
    A LayoutTurnout corresponds to a turnout on the layout. A LayoutTurnout is an extension of the standard Turnout object with drawing and connectivity information added.

    Six types are supported: right-hand, left-hand, wye, double crossover, right-handed single crossover, and left-handed single crossover. Note that double-slip turnouts can be handled as two turnouts, throat to throat, and three-way turnouts can be handles as two turnouts, left-hand and right-hand, arranged throat to continuing route.

    A LayoutTurnout has three or four connection points, designated A, B, C, and D. For right-handed or left-handed turnouts, A corresponds to the throat. At the crossing, A-B (and C-D for crossovers) is a straight segment (continuing route). A-C (and B-D for crossovers) is the diverging route. B-C (and A-D for crossovers) is an illegal condition.

               Turnouts
     Right-hand       Left-hand
    
                            C
                           //
     A ==**== B       A ==**== B
          \\
           C
    
        Wye           Three-way
    
           B                D
          //               //
     A ==**           A ==**== B
          \\               \\
           C                C
    
               Crossovers
     Right-hand            left-hand
     A ==**===== B      A ====**== B
          \\                 //
           \\               //
      D ====**== C     D ==**===== C
    
                 Double
            A ==**==**== B
                 \\//
                  XX
                 //\\
            D ==**==**== C
     

    A LayoutTurnout carries Block information. For right-handed, left-handed, and wye turnouts, the entire turnout is in one block, however, a block border may occur at any connection (A,B,C,D). For a double crossover turnout, up to four blocks may be assigned, one for each connection point, but if only one block is assigned, that block applies to the entire turnout.

    For drawing purposes, each LayoutTurnout carries a center point and displacements for B and C. For right-handed or left-handed turnouts, the displacement for A = - the displacement for B, and the center point is at the junction of the diverging route and the straight through continuing route. For double crossovers, the center point is at the center of the turnout, and the displacement for A = - the displacement for C and the displacement for D = - the displacement for B. The center point and these displacements may be adjusted by the user when in edit mode. For double crossovers, AB and BC are constrained to remain perpendicular. For single crossovers, AB and CD are constrained to remain parallel, and AC and BD are constrained to remain parallel.

    When LayoutTurnouts are first created, a rotation (degrees) is provided. For 0.0 rotation, the turnout lies on the east-west line with A facing east. Rotations are performed in a clockwise direction.

    When LayoutTurnouts are first created, there are no connections. Block information and connections may be added when available.

    When a LayoutTurnout is first created, it is enabled for control of an assigned actual turnout. Clicking on the turnout center point will toggle the turnout. This can be disabled via the popup menu.

    Signal Head names are saved here to keep track of where signals are. LayoutTurnout only serves as a storage place for signal head names. The names are placed here by tools, e.g., Set Signals at Turnout, and Set Signals at Double Crossover. Each connection point can have up to three SignalHeads and one SignalMast.

    A LayoutTurnout may be linked to another LayoutTurnout to form a turnout pair. Throat-To-Throat Turnouts - Two turnouts connected closely at their throats, so closely that signals are not appropriate at the their throats. This is the situation when two RH, LH, or WYE turnouts are used to model a double slip. 3-Way Turnout - Two turnouts modeling a 3-way turnout, where the throat of the second turnout is closely connected to the continuing track of the first turnout. The throat will have three heads, or one head. A link is required to be able to correctly interpret the use of signal heads.