@@ -30,24 +30,72 @@ trait CrossingGenerator extends Adjacencies { this: RuleGenerator =>
3030 Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ ES ) // OxD
3131 Rules += main~ SE ~ ES | (base ~> main)~ WN ~ NW & orient(minor~ NS ) // DxO
3232 Rules += main~ SE ~ ES | (base ~> main)~ WN ~ NW & orient(minor~ NE ) // DxD
33- if (main.isNwm && ! minor.isRhw ) withResolvableRulesOnly { // T intersections are not defined for all network combinations
33+ if (main.isNwm) 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
3636 Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ NS ) // OxO T End
3737 Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ NEC ) // OxD T 1
3838 Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & orient(minor~ NWC ) // OxD T 2
39+ Rules += main~ NE ~ EN | (base ~> main)~ WS ~ SW & orient(minor~ NC ) // DxO T 1
40+ Rules += main~ NE ~ EN | (base ~> main)~ WS ~ SW & orient(minor~ SC ) // DxO T 2
41+ Rules += main~ SE ~ ES & minor~ WC ~ CW | (base ~> main)~ WN ~ NW & orient(minor~ WC ) // DxO T 1-2
42+ Rules += main~ SE ~ ES & minor~ CE ~ EC | (base ~> main)~ WN ~ NW & orient(minor~ CE ) // DxO T 2-1
43+ Rules += main~ SE ~ ES & minor~ CE ~ EC | base~ WN ~ NW & minor~ WE ~ EW | main~ SE ~ ES & minor~ CE ~ EC | main~ WN ~ NW & minor~ CE ~ EC // DxO T 2-1 Alt
44+ Rules += main~ NE ~ EN | (base ~> main)~ WS ~ SW & orient(minor~ ESC ) // DxD T 1
45+ Rules += main~ NE ~ EN | (base ~> main)~ WS ~ SW & orient(minor~ SEC ) // DxD T 2
46+ Rules += main~ SE ~ ES & minor~ NEC ~ CEN | (base ~> main)~ WN ~ NW & orient(minor~ WSC ) // DxD T 1-2
47+ Rules += main~ NE ~ EN & minor~ ESC ~ CSE | (base ~> main)~ WS ~ NS & orient(minor~ CWN ) // DxD T 2-1
48+ Rules += main~ SE ~ ES & minor~ NE ~ EN | base~ WN ~ NW & minor~ WSC ~ CSW | main~ SE ~ ES & minor~ NEC ~ CEN | main~ WN ~ NW & minor~ WSC ~ CSW // DxD T 2-1 Alt
49+ Rules += main~ SE ~ ES & minor~ NEC ~ CEN | base~ WN ~ NW | main~ SE ~ ES & minor~ NEC ~ CEN | main~ WN ~ NW & minor~ WSC ~ CSW // DxD T 1-2 Alt
50+
3951 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
52+ Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ SE ) // OxD T End 1
53+ Rules += main~ WC ~ CW & minor~ ES ~ SE | (base ~> main)~ WC ~ CW & orient(minor~ NW ) // OxD T End 2
54+ Rules += main~ WE ~ EW & minor~ ES ~ SE | base~ WC ~ CW & minor~ WN ~ NW | main~ WC ~ CW & minor~ ES ~ SE | main~ WC ~ CW & minor~ WN ~ NW // OxD T End 2 Alt
55+ Rules += main~ WE ~ EW & minor~ ES ~ SE | minor~ WN ~ NW | main~ WC ~ CW & minor~ ES ~ SE | main~ WC ~ CW & minor~ WN ~ NW // OxD T End 3 Alt
56+ Rules += main~ WC ~ CW & minor~ ES ~ SE | minor~ WN ~ NW | main~ WC ~ CW & minor~ ES ~ SE | main~ WC ~ CW & minor~ WN ~ NW // OxD T End 4 Alt
57+ Rules += main~ (0 ,0 ,11 ,3 ) | base~ WNC ~ CNW & minor~ NS ~ SN | main~ (0 ,0 ,11 ,3 ) | main~ WNC ~ CNW & minor~ NS ~ SN // DxO T End 1
58+ Rules += main~ SW ~ WS | base~ WNC ~ CNW & minor~ NS ~ SN | main~ (0 ,0 ,11 ,3 ) | main~ WNC ~ CNW & minor~ NS ~ SN // DxO T End 1 Alt
59+ Rules += main~ SE ~ ES | (base ~> main)~ WNC ~ CNW & orient(minor~ EN ) // DxD T End 1
60+ Rules += main~ CEN ~ NEC & minor~ SE ~ ES | (base ~> main)~ WSC ~ CSW & orient(minor~ WN ) // DxD T End 2
61+ Rules += main~ EN ~ NE & minor~ SE ~ ES | base~ WSC ~ CSW & minor~ WN ~ NW | main~ CEN ~ NEC & minor~ SE ~ ES | main~ WSC ~ CSW & minor~ WN ~ NW // DxD T End 2 Alt
62+ Rules += main~ EN ~ NE & minor~ SE ~ ES | minor~ WN ~ NW | main~ CEN ~ NEC & minor~ SE ~ ES | main~ WSC ~ CSW & minor~ WN ~ NW // DxD T End 2 Alt 2
63+ Rules += main~ CEN ~ NEC & minor~ SE ~ ES | minor~ WN ~ NW | main~ CEN ~ NEC & minor~ SE ~ ES | main~ WSC ~ CSW & minor~ WN ~ NW // DxD T End 2 Alt 3
4364 }
4465 if (minor == Avenue ) {
66+ Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & minor~ (0 ,0 ,3 ,0 ) // OxD T 1
67+ Rules += main~ WE ~ EW | (base ~> main)~ WE ~ EW & minor~ (1 ,0 ,0 ,0 ) // OxD T 3
68+ Rules += main~ WE ~ EW & minor~ (0 ,0 ,3 ,0 ) | (base ~> main)~ WE ~ EW & minor~ (0 ,0 ,3 ,1 ) // OxD T 1-2
69+ Rules += main~ WE ~ EW & minor~ (1 ,0 ,0 ,0 ) | (base ~> main)~ WE ~ EW & minor~ (3 ,1 ,0 ,0 ) // OxD T 3-2
70+ Rules += main~ WE ~ EW & minor~ (0 ,0 ,3 ,1 ) | (base ~> main)~ WE ~ EW & minor~ (0 ,0 ,1 ,0 ) // OxD T 2-3
71+ Rules += main~ WE ~ EW & minor~ (3 ,1 ,0 ,0 ) | (base ~> main)~ WE ~ EW & minor~ (3 ,0 ,0 ,0 ) // OxD T 2-1
72+ Rules += main~ SE ~ ES | (base ~> main)~ WN ~ NW & minor~ CS // DxO T-Thru 1
73+ Rules += main~ SE ~ ES | (base ~> main)~ WN ~ NW & minor~ NC // DxO T-Thru 4
74+ Rules += main~ NE ~ EN & minor~ CW | (base ~> main)~ WS ~ SW & minor~ CW // DxO T-Thru 1-2
75+ Rules += main~ NE ~ EN & minor~ CE | (base ~> main)~ WS ~ SW & minor~ CE // DxO T-Thru 2-1
76+ Rules += main~ SE ~ ES & minor~ CS | (base ~> main)~ WN ~ NW & minor~ SC // DxO T-Thru 2-3
77+ Rules += main~ SE ~ ES & minor~ NC | (base ~> main)~ WN ~ NW & minor~ CN // DxO T-Thru 3-2
78+ Rules += main~ NE ~ EN & minor~ WC | (base ~> main)~ WS ~ SW & minor~ WC // DxO T-Thru 3-4
79+ Rules += main~ NE ~ EN & minor~ WC | base~ WS ~ SW | main~ NE ~ EN & minor~ WC | main~ WS ~ SW & minor~ WC // DxO T-Thru 3-4 Stability 1
80+ Rules += main~ NE ~ EN & minor~ WC | main~ WS ~ SW | main~ NE ~ EN & minor~ WC | main~ WS ~ SW & minor~ WC // DxO T-Thru 3-4 Stability 2
81+ Rules += main~ NE ~ EN & minor~ EC | (base ~> main)~ WS ~ SW & minor~ EC // DxO T-Thru 4-3
82+ Rules += main~ NE ~ EN & minor~ EC | base~ WS ~ SW | main~ NE ~ EN & minor~ EC | main~ WS ~ SW & minor~ EC // DxO T-Thru 4-3 Stability 1
83+ Rules += main~ NE ~ EN & minor~ EC | main~ WS ~ SW | main~ NE ~ EN & minor~ EC | main~ WS ~ SW & minor~ EC // DxO T-Thru 4-3 Stability 2
84+ Rules += main~ NE ~ EN | base~ WS ~ SW & minor~ EC | main~ NE ~ EN & minor~ EC | main~ WS ~ SW & minor~ EC // DxO T-Thru 4-3 Stability 3
4585 Rules += main~ WE ~ EW | (base ~> main)~ WC ~ CW & orient(minor~ ES ) // OxD T End-Short 1
4686 Rules += main~ WC ~ CW & minor~ ES | (base ~> main)~ WC ~ CW & minor~ SharedDiagRight // OxD T End-Short 2
4787 Rules += main~ WE ~ EW & minor~ ES | (base ~> main)~ WC ~ CW & minor~ SharedDiagRight // OxD T End-Short 2 Alt
88+ Rules += main~ WE ~ EW & minor~ SharedDiagRight | base~ WC ~ CW & minor~ WN | main~ WC ~ CW & minor~ SharedDiagRight | main~ WC ~ CW & minor~ WN // OxD T End-Long
89+ Rules += main~ (0 ,0 ,11 ,3 ) | base~ WNC ~ CNW & minor~ NS ~ SN | main~ (0 ,0 ,11 ,3 ) | main~ WNC ~ CNW & minor~ NS ~ SN // DxO T End-Short 1
90+ Rules += main~ SW ~ WS | base~ WNC ~ CNW & minor~ NS ~ SN | main~ (0 ,0 ,11 ,3 ) | main~ WNC ~ CNW & minor~ NS ~ SN // DxO T End-Short 1 Alt
91+ Rules += main~ SE ~ ES & minor~ NS | (base ~> main)~ WNC ~ CNW & minor~ SN // DxO T End-Long 1
92+ Rules += main~ SEC ~ CES & minor~ EW | base~ WNC ~ CNW & minor~ EW | main~ SEC ~ CES & minor~ EW | main~ WNC ~ CNW & minor~ EW // DxO T End-Long 2
93+ Rules += main~ SE ~ ES & minor~ EW | base~ WNC ~ CNW & minor~ EW | main~ SEC ~ CES & minor~ EW | main~ WNC ~ CNW & minor~ EW // DxO T End-Long 2 Alt
94+ Rules += main~ SE ~ ES | (base ~> main)~ WNC ~ CNW & orient(minor~ EN ) // DxD T End-Short 1
95+ Rules += main~ SE ~ ES & minor~ SharedDiagLeft | base~ WNC ~ CNW & minor~ SW | main~ SEC ~ CES & minor~ SharedDiagLeft | main~ WNC ~ CNW & minor~ SW // DxD T End-Long
4896 }
4997 }
50- if (main.isNwm && ! minor.isRhw && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
98+ if (main.isNwm && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
5199 Rules += main~ WE | (base ~> main)~ WE & orient(minor~ CS ) // OxO T 1
52100 Rules += main~ WE | (base ~> main)~ WE & orient(minor~ NC ) // OxO T 2
53101 Rules += main~ WE & minor~ NC | (base ~> main)~ WE & minor~ CN // OxO T Tile 1-2
@@ -69,13 +117,19 @@ trait CrossingGenerator extends Adjacencies { this: RuleGenerator =>
69117 Rules += main~ SE ~ ES & orient(minor~ SN ) | (base ~> main)~ WN ~ NW // DxO
70118 Rules += main~ SE ~ ES & orient(minor~ SW ) | (base ~> main)~ WN ~ NW // DxD
71119 // 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
120+ if (main.isNwm) withResolvableRulesOnly { // T intersections are not defined for all network combinations
121+ Rules += main~ WE ~ EW & minor~ CS ~ SC | (base ~> main)~ WE ~ EW // OxO T 1
122+ Rules += main~ WE ~ EW & minor~ NC ~ CN | (base ~> main)~ WE ~ EW // OxO T 2
123+ Rules += main~ WE ~ EW & minor~ NEC ~ CEN | (base ~> main)~ WE ~ EW // OxD T 1
124+ Rules += main~ WE ~ EW & minor~ NWC ~ CWN | (base ~> main)~ WE ~ EW // OxD T 2
125+ Rules += main~ WE ~ EW & Avenue ~ (3 ,0 ,0 ,0 ) | (base ~> main)~ WE ~ EW // OxD T Ave 1
126+ Rules += main~ WE ~ EW & Avenue ~ (1 ,0 ,0 ,0 ) | (base ~> main)~ WE ~ EW // OxD T Ave 2
127+ Rules += main~ NE ~ EN & minor~ CS ~ SC | (base ~> main)~ WS ~ SW // DxO T 1
128+ Rules += main~ NE ~ EN & minor~ NC ~ CN | (base ~> main)~ WS ~ SW // DxO T 2
129+ Rules += main~ SE ~ ES & minor~ WSC ~ CSW | (base ~> main)~ WN ~ NW // DxD T 1
130+ Rules += main~ SE ~ ES & minor~ SWC ~ CWS | (base ~> main)~ WN ~ NW // DxD T 2
77131 }
78- // if (main.isNwm && !minor.isRhw && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
132+ // if (main.isNwm && minor.isNwmDual) withResolvableRulesOnly { // T intersections are not defined for all network combinations
79133 // Rules += main~WE | (base ~> main)~WE & orient(minor~CS) // OxO T 1
80134 // Rules += main~WE | (base ~> main)~WE & orient(minor~NC) // OxO T 2
81135 // Rules += main~WE & minor~NC | (base ~> main)~WE & minor~CN // OxO T Tile 1-2
0 commit comments