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