@@ -10,9 +10,9 @@ object CrossingGenerator {
1010 for {
1111 minor <- Network .values.iterator
1212 if minor != Subway && ! isHrw(minor) && (main.isRhw || minor.isRhw ||
13- (main.isNwm && (minor.isRhw || minor.isNwm || minor.base.isEmpty)) ||
14- (main.isNwm && isSingleTile(main) && main.height == 0 && (minor == L1Dtr || minor == L2Dtr )) // ||
15- // (main.isViaduct || minor.isViaduct )
13+ (main.isNwm && (minor.isRhw || minor.isNwm || minor.isViaduct || minor. base.isEmpty)) ||
14+ (main.isNwm && isSingleTile(main) && main.height == 0 && (minor == L1Dtr || minor == L2Dtr )) ||
15+ (main.isViaduct && (minor.isNwm || minor.isRhw || minor.base.isEmpty) && minor != Groundhighway )
1616 ) && intersectionAllowed(main, minor)
1717 } yield minor
1818 }
@@ -33,6 +33,27 @@ trait CrossingGenerator extends Adjacencies { this: RuleGenerator =>
3333 if (main.isNwm && ! minor.isRhw) withResolvableRulesOnly { // T intersections are not defined for all network combinations
3434 Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ CS ) // OxO T 1
3535 Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ NC ) // OxO T 2
36+ Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ NS ) // OxO T End
37+ Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ NEC ) // OxD T 1
38+ Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ NWC ) // OxD T 2
39+ if (minor != Avenue ) {
40+ Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ SW ) // OxD T End 1
41+ Rules += main~ WC ~ CW & minor~ WS ~ SW | (base ~> main)~ WC ~ CW & orient(minor~ EN ) // OxD T End 2
42+ Rules += main~ WE ~ EW & minor~ WS ~ SW | base~ WC ~ CW & minor~ EN ~ NE | main~ WC ~ CW & minor~ WS ~ SW | main~ WC ~ CW & minor~ EN ~ NE // OxD T End 2 Alt
43+ }
44+ if (minor == Avenue ) {
45+ Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ ES ) // OxD T End-Short 1
46+ Rules += main~ WC ~ CW & minor~ ES | (base ~> main)~ WC ~ CW & minor~ SharedDiagRight // OxD T End-Short 2
47+ Rules += main~ WE ~ EW & minor~ ES | (base ~> main)~ WC ~ CW & minor~ SharedDiagRight // OxD T End-Short 2 Alt
48+ }
49+ }
50+ if (main.isNwm && ! minor.isRhw && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
51+ Rules += main~ WE | (base ~> main)~ WE & orient(minor~ CS ) // OxO T 1
52+ Rules += main~ WE | (base ~> main)~ WE & orient(minor~ NC ) // OxO T 2
53+ Rules += main~ WE & minor~ NC | (base ~> main)~ WE & minor~ CN // OxO T Tile 1-2
54+ Rules += main~ EW & minor~ CS | (base ~> main)~ EW & minor~ SC // OxO T Tile 2-1
55+ Rules += main~ EW & minor~ NS | (base ~> main)~ CW & minor~ SN // OxO T End 1/Long T
56+ Rules += main~ WE & minor~ NS | (base ~> main)~ WC & minor~ SN // OxO T End 2/Long T
3657 }
3758 // Shared diagonals on minor are not relevant here since the shared diagonal is an inner tile (i.e. without an edge).
3859 }
@@ -48,6 +69,18 @@ trait CrossingGenerator extends Adjacencies { this: RuleGenerator =>
4869 Rules += main~ SE ~ ES & orient(minor~ SN ) | (base ~> main)~ WN ~ NW // DxO
4970 Rules += main~ SE ~ ES & orient(minor~ SW ) | (base ~> main)~ WN ~ NW // DxD
5071 // Shared diagonals on minor are not relevant here since the shared diagonal is an inner tile (i.e. without an edge).
72+ if (main.isNwm && ! minor.isRhw) withResolvableRulesOnly { // T intersections are not defined for all network combinations
73+ Rules += main~ WE ~ EW & minor~ CS | (base ~> main)~ WE ~ EW // OxO T 1
74+ Rules += main~ WE ~ EW & minor~ NC | (base ~> main)~ WE ~ EW // OxO T 2
75+ Rules += main~ WE ~ EW & minor~ NEC | (base ~> main)~ WE ~ EW // OxD T 1
76+ Rules += main~ WE ~ EW & minor~ NWC | (base ~> main)~ WE ~ EW // OxD T 2
77+ }
78+ // if (main.isNwm && !minor.isRhw && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
79+ // Rules += main~WE | (base ~> main)~WE & orient(minor~CS) // OxO T 1
80+ // Rules += main~WE | (base ~> main)~WE & orient(minor~NC) // OxO T 2
81+ // Rules += main~WE & minor~NC | (base ~> main)~WE & minor~CN // OxO T Tile 1-2
82+ // Rules += main~EW & minor~CS | (base ~> main)~EW & minor~SC // OxO T Tile 2-1
83+ // }
5184 }
5285 if (hasRightShoulder(minor)) exitCode(identity)
5386 if (hasLeftShoulder(minor)) exitCode(_.reverse)
0 commit comments