chiark / gitweb /
hostside: more length for bavarian
[trains.git] / layout / parts.i4
1 define(`def_thing_l_r',`
2 dnl OBJNAME-EXCLUDING-L
3  defpart $1r
4   abs c 200 200 0
5   objflip $1l c c =
6  enddef
7 ')
8
9 # Conventionally, points' toes are c, the straight through is a
10 # and the curve is b.  Segments run from c towards a and b.
11 #
12 # Crossings (including slips) run `vertically' and have
13 # tl, tr, bl, br.  Segments run from b* to t*.
14
15 define(`def_point_ord',`
16 dnl OBJNAME-EXCLUDING-PT-L ANGLE STRAIGHT-L CURVE-LONGER CURVE-DIVERGE-Y MIN-R
17  defpart pt_$1l
18   abs c 200 200 0
19   segment /P0
20   extend c a len $3
21   rel a b $4 -$5 $2
22   segment /P1
23   join c b $6
24  enddef
25  def_thing_l_r(`pt_$1')
26 ')
27
28 define(`def_point_curve',`
29 dnl OBJNAME-EXCLUDING-PT-L TIGHT-ANG TIGHT-RECT TIGHT-DIVERGE-Y SHALLOW.. MIN-R START-OFFSET-ANG
30  defpart pt_$1l
31   abs c 200 200 0
32   layer s
33   rel c cbase 0 0 $9
34   layer =
35   rel cbase a $6 -$7 $5
36   rel cbase b $3 -$4 $2
37   segment /P0
38   join c a $8
39   segment /P1
40   join c b $8
41  enddef
42  def_thing_l_r(`pt_$1')
43 ')
44
45 define(`def_point_y',`
46 dnl OBJNAME-EXCLUDING-PT HALF-ANG RECT HALF-DIVERGE-Y MIN-R
47  defpart pt_$1
48   abs c 200 200 0
49   rel c l $3 -$4  $2
50   rel c r $3  $4 -$2
51   segment /P0
52   join c l $5
53   segment /P1
54   join c r $5
55  enddef
56 ')
57
58 define(`def_crossing',`
59 dnl OBJNAME-EXCLUDING-CROSS HALF-ANG HALF-LENGTH
60  defpart cross_$1
61   abs m 200 200 0
62   rel m ml 0 0 $2
63   rel m mr 0 0 -$2
64   segment F
65   extend mr tr len $3
66   extend mr bl len -$3
67   segment B
68   extend ml tl len $3
69   extend ml br len -$3
70  enddef
71 ')
72
73 def_point_ord(`peco_s', 22.5, 87,  -0.5, 17,    200) #ST-5,6     not minr 230 ?
74 def_point_ord(`peco_m', 14,  126.5,-1.55,13.21, 315) #SL-395,396 not minr 457 ?
75 def_point_ord(`peco_l',  8,  160,  -0.4, 13.21, 914) #SL-388,389
76  # catalogue says 123.7 for STRAIGHT-L ?!
77  # SL-<n> and SL-E<n> have the same geometry
78
79 def_point_ord(`pecofguess_l',  10,  160,  -1.0, 13.21, 800) #SLE-388F,389F
80  # not minr 914 ?
81  # 36 sleepers just like 36
82  # has 5.2mm gauge, 8.15mm rails offset:
83  # unlike 4.9mm gauge, 7.15mm rails offset: 
84  # SL-<n>F and SL-<n> do NOT have the same geometry
85
86 def_point_curve(`peco_c', 17, 155.8, 23.0,  7, 158.3, 9.0, 457, 1) #SL-386,387
87
88 def_point_y(`peco_y', 8, 124.2, 7.9, 800) # not minr 762 ?
89
90 #def_crossing(`mythical',7,   80)
91 def_crossing(`peco_l',  4,   93.75) # SL-394
92 def_crossing(`peco_s', 12.5, 46)    # ST-7
93 def_crossing(`pecof_s', 10,  51.85) # SL-E391F,E392F
94 def_crossing(`pecof_l',  5,  77.00) # SL-E394F
95
96
97 def_crossing(`atlas_15',   7.5, 64)
98 def_crossing(`atlas_15m',  7.5, 61)
99 def_crossing(`atlas_90',  45,   62.4)
100 def_crossing(`atlas_90m', 45,    8.5)
101 def_crossing(`atlas_30',  15,   32.9)
102 def_crossing(`atlas_30m', 15,   30.9)
103 def_crossing(`atlas_60',  30,   48.5)
104 def_crossing(`atlas_60m', 30,   14.5)
105 def_crossing(`atlas_20',  10,   63.5)
106 def_crossing(`atlas_20m', 10,   46.0)
107 def_crossing(`atlas_45',  22.5, 50.9)
108 def_crossing(`atlas_45m', 22.5, 19.5)
109
110 define(`def_point_shino',`
111 dnl OBJNAME-EXCLUDING-PT-L($1) A($2) B($3) Q($4)
112 dnl not R($5)
113  defpart pt_$1l
114   abs c 200 200 0
115   layer s
116   rel c strintersect $3 0 $4
117   rel strintersect strbackanal -$3
118   layer =
119   rel strbackanal b $2
120   segment /P1
121   join c b 240 arcline
122   segment /P0
123   extend c a len $2
124  enddef
125  def_thing_l_r(`pt_$1')
126 ')
127
128 def_point_shino(`shino_4', 136, 45, 14.25)
129 def_point_shino(`shino_6', 177, 49,  9.50)
130 def_point_y(`shino_y', 7.125, 140, 10.9, 750) # not minr 500 ?
131
132 defpart pt_shino_x3
133   abs c 200 200 0
134   layer s
135   rel c strintersectc  74 0   9.5
136   rel c strintersectb 103 0 -12
137   layer =
138   rel strintersectc l 141
139   rel strintersectb r 112
140   segment /P1
141   extend c m len 215
142   segment /P0
143   join c l 315 arcline
144   segment /P2
145   join c r 315 arcline
146 enddef
147
148 define(`def_slip2',`
149 dnl OBJNAME-EXCLUDING-SLIP2 HALF-LEN HALF-ANG
150  defpart slip2_$1
151   # configurations:  )  bl-tl  S0
152   #                  /  bl-tr  S1
153   #                  \  br-tl  S2
154   #                  (  br-tr  S3
155   abs m 200 200 0
156   rel m ml 0 0  $3
157   rel m mr 0 0 -$3
158   rel ml tl  $2
159   rel ml br -$2
160   rel mr tr  $2
161   rel mr bl -$2
162   segment /S0
163   join bl tl 500
164   segment /S1
165   join bl tr 500
166   segment /S2
167   join br tl 500
168   segment /S3
169   join br tr 500
170  enddef
171 ')
172
173 def_slip2(`shino', 114, 4.75)
174 def_slip2(`pecof',  77, 5.00)
175
176 define(`def_scis',`
177 dnl OBJNAME-EXCLUDING-SCIS HALF-LENGTH HALF-SPACING HALF-ANG MIN-R
178  defpart scis_$1
179   abs bl 200 200 0
180   rel bl m $2 $3
181   rel m br -$2 $3
182   extend bl ml len $2
183   extend ml tl len $2
184   extend br mr len $2
185   extend mr tr len $2
186   layer s
187   rel m mxl 0 0 $4
188   rel m mxr 0 0 -$4
189   layer =
190   join bl mxr $5
191   join mxr tr $5
192   join br mxl $5
193   join mxl tl $5
194  enddef
195 ')
196
197 def_scis(`pecof', 135.42, 13.5,  10, 315)
198 def_scis(`shino', 154,    13.5, 9.5, 315)
199
200 define(`tt_do_circle',`
201  layer s
202  rel mid forcirc0$2 0 $1 0
203  rel mid forcirc1$2 0 -$1 180
204  layer l
205  join forcirc0$2 forcirc1$2 0
206  join forcirc1$2 forcirc0$2 0
207  layer =
208 ')
209
210 defpart tt_peco
211  layer =
212  abs mid 200 200 0
213  extend mid out len 80
214  extend -mid -in len 80
215
216  tt_do_circle(80, `')
217 enddef
218
219 define(`tt_atlas_out',`
220  layer s
221  rel mid mid$1 0 0 $1
222  layer =
223  rel mid$1 out$1 109 0
224 ')
225
226 defpart tt_atlas
227  layer =
228  abs mid 200 200 0
229  extend mid out len 109
230  extend -mid -in len 109
231
232  tt_atlas_out(`0')
233  tt_atlas_out(`15')
234  tt_atlas_out(`30')
235  tt_atlas_out(`45')
236  tt_atlas_out(`60')
237  tt_atlas_out(`75')
238  tt_atlas_out(`90')
239  tt_atlas_out(`105')
240  tt_atlas_out(`120')
241  tt_atlas_out(`135')
242  tt_atlas_out(`150')
243  tt_atlas_out(`165')
244  tt_atlas_out(`180')
245  tt_atlas_out(`195')
246  tt_atlas_out(`210')
247  tt_atlas_out(`225')
248  tt_atlas_out(`240')
249  tt_atlas_out(`255')
250  tt_atlas_out(`270')
251  tt_atlas_out(`285')
252  tt_atlas_out(`300')
253  tt_atlas_out(`315')
254  tt_atlas_out(`330')
255  tt_atlas_out(`345')
256
257  tt_do_circle(95.25, i)
258  tt_do_circle(109, `')
259 enddef
260
261 defpart tt_atlas_motor
262  abs cout 200 200 0
263  layer p
264  rel cout bl -40 -40
265  rel cout br -40  40
266  extend bl tl len 89
267  extend br tr len 89
268  join tl -tr 0.1
269 enddef
270
271 ident
272