chiark / gitweb /
pecof_s
[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 define(`def_point_ord',`
10 dnl OBJNAME-EXCLUDING-PT-L ANGLE STRAIGHT-L CURVE-LONGER CURVE-DIVERGE-Y MIN-R
11  defpart pt_$1l
12   abs c 200 200 0
13   extend c a len $3
14   rel a b $4 -$5 $2
15   join c b $6
16  enddef
17  def_thing_l_r(`pt_$1')
18 ')
19
20 define(`def_point_curve',`
21 dnl OBJNAME-EXCLUDING-PT-L TIGHT-ANG TIGHT-RECT TIGHT-DIVERGE-Y SHALLOW.. MIN-R
22  defpart pt_$1l
23   abs c 200 200 0
24   rel c a $6 -$7 $5
25   rel c b $3 -$4 $2
26   join c a $8
27   join c b $8
28  enddef
29  def_thing_l_r(`pt_$1')
30 ')
31
32 define(`def_point_y',`
33 dnl OBJNAME-EXCLUDING-PT HALF-ANG RECT HALF-DIVERGE-Y MIN-R
34  defpart pt_$1
35   abs c 200 200 0
36   rel c l $3 -$4  $2
37   rel c r $3  $4 -$2
38   join c l $5
39   join c r $5
40  enddef
41 ')
42
43 define(`def_crossing',`
44 dnl OBJNAME-EXCLUDING-CROSS HALF-ANG HALF-LENGTH
45  defpart cross_$1
46   abs m 200 200 0
47   rel m ml 0 0 $2
48   rel m mr 0 0 -$2
49   extend ml tl len $3
50   extend mr tr len $3
51   extend mr bl len -$3
52   extend ml br len -$3
53  enddef
54 ')
55
56 def_point_ord(`peco_s', 22.5, 87,  -0.5, 17,    200) # not minr 230 ?
57 def_point_ord(`peco_m', 14,  126.5,-1.55,13.21, 315) # not minr 457 ?
58 def_point_ord(`peco_l',  8,  160,  -0.4, 13.21, 914)
59  # catalogue says 123.7 for STRAIGHT-L ?!
60
61 def_point_curve(`peco_c',  10, 154.4, 13.8,  3, 156.0, 0.8, 457)
62  dnl 163.2-  } dist to markings on paper cribsheet from c
63  dnl 32.8-   }
64
65 def_point_y(`peco_y', 4, 127, 8.4, 800) # not minr 762 ?
66
67 #def_crossing(`mythical',7,   80)
68 def_crossing(`peco_l',  4,   93.75)
69 def_crossing(`peco_s', 12.5, 46)
70 def_crossing(`pecof_s', 10,  51.85)
71
72
73 def_crossing(`atlas_15',   7.5, 64)
74 def_crossing(`atlas_15m',  7.5, 61)
75 def_crossing(`atlas_90',  45,   62.4)
76 def_crossing(`atlas_90m', 45,    8.5)
77 def_crossing(`atlas_30',  15,   32.9)
78 def_crossing(`atlas_30m', 15,   30.9)
79 def_crossing(`atlas_60',  30,   48.5)
80 def_crossing(`atlas_60m', 30,   14.5)
81 def_crossing(`atlas_20',  10,   63.5)
82 def_crossing(`atlas_20m', 10,   46.0)
83 def_crossing(`atlas_45',  22.5, 50.9)
84 def_crossing(`atlas_45m', 22.5, 19.5)
85
86 define(`def_point_shino',`
87 dnl OBJNAME-EXCLUDING-PT-L($1) A($2) B($3) Q($4)
88 dnl not R($5)
89  defpart pt_$1l
90   abs c 200 200 0
91   layer s
92   rel c strintersect $3 0 $4
93   rel strintersect strbackanal -$3
94   layer =
95   rel strbackanal b $2
96   join c b 240 arcline
97   extend c a len $2
98  enddef
99  def_thing_l_r(`pt_$1')
100 ')
101
102 def_point_shino(`shino_4', 136, 45, 14.25)
103 def_point_shino(`shino_6', 177, 49,  9.50)
104 def_point_y(`shino_y', 7.125, 140, 10.9, 750) # not minr 500 ?
105
106 defpart pt_shino_x3
107   abs c 200 200 0
108   layer s
109   rel c strintersectc  74 0   9.5
110   rel c strintersectb 103 0 -12
111   layer =
112   rel strintersectc l 141
113   rel strintersectb r 112
114   extend c m len 215
115   join c l 315 arcline
116   join c r 315 arcline
117 enddef
118
119 define(`def_slip2',`
120 dnl OBJNAME-EXCLUDING-SLIP2 HALF-LEN HALF-ANG
121  defpart slip2_$1
122   abs m 200 200 0
123   rel m ml 0 0  $3
124   rel m mr 0 0 -$3
125   extend ml tl len $2
126   extend mr tr len $2
127   extend ml br len -$2
128   extend mr bl len -$2
129   join bl tl 500
130   join br tr 500
131  enddef
132 ')
133
134 def_slip2(`shino', 114, 4.75)
135 def_slip2(`pecof',  77, 5.00)
136
137 define(`def_scis',`
138 dnl OBJNAME-EXCLUDING-SCIS HALF-LENGTH HALF-SPACING HALF-ANG MIN-R
139  defpart scis_$1
140   abs bl 200 200 0
141   rel bl m $2 $3
142   rel m br -$2 $3
143   extend bl ml len $2
144   extend ml tl len $2
145   extend br mr len $2
146   extend mr tr len $2
147   layer s
148   rel m mxl 0 0 $4
149   rel m mxr 0 0 -$4
150   layer =
151   join bl mxr $5
152   join mxr tr $5
153   join br mxl $5
154   join mxl tl $5
155  enddef
156 ')
157
158 def_scis(`pecof', 135.42, 13.5,  10, 315)
159 def_scis(`shino', 154,    13.5, 9.5, 315)
160
161 define(`tt_do_circle',`
162  layer s
163  rel mid forcirc0$2 0 $1 0
164  rel mid forcirc1$2 0 -$1 180
165  layer l
166  join forcirc0$2 forcirc1$2 0
167  join forcirc1$2 forcirc0$2 0
168  layer =
169 ')
170
171 defpart tt_peco
172  layer =
173  abs mid 200 200 0
174  extend mid out len 80
175  extend -mid -in len 80
176
177  tt_do_circle(80, `')
178 enddef
179
180 define(`tt_atlas_out',`
181  layer s
182  rel mid mid$1 0 0 $1
183  layer =
184  rel mid$1 out$1 109 0
185 ')
186
187 defpart tt_atlas
188  layer =
189  abs mid 200 200 0
190  extend mid out len 109
191  extend -mid -in len 109
192
193  tt_atlas_out(`0')
194  tt_atlas_out(`15')
195  tt_atlas_out(`30')
196  tt_atlas_out(`45')
197  tt_atlas_out(`60')
198  tt_atlas_out(`75')
199  tt_atlas_out(`90')
200  tt_atlas_out(`105')
201  tt_atlas_out(`120')
202  tt_atlas_out(`135')
203  tt_atlas_out(`150')
204  tt_atlas_out(`165')
205  tt_atlas_out(`180')
206  tt_atlas_out(`195')
207  tt_atlas_out(`210')
208  tt_atlas_out(`225')
209  tt_atlas_out(`240')
210  tt_atlas_out(`255')
211  tt_atlas_out(`270')
212  tt_atlas_out(`285')
213  tt_atlas_out(`300')
214  tt_atlas_out(`315')
215  tt_atlas_out(`330')
216  tt_atlas_out(`345')
217
218  tt_do_circle(95.25, i)
219  tt_do_circle(109, `')
220 enddef
221
222 defpart tt_atlas_motor
223  abs cout 200 200 0
224  layer p
225  rel cout bl -40 -40
226  rel cout br -40  40
227  extend bl tl len 100
228  extend br tr len 100
229  join tl -tr 0.1
230 enddef