chiark / gitweb /
pecof slip2
[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
71
72 def_crossing(`atlas_15',   7.5, 64)
73 def_crossing(`atlas_15m',  7.5, 61)
74 def_crossing(`atlas_90',  45,   62.4)
75 def_crossing(`atlas_90m', 45,    8.5)
76 def_crossing(`atlas_30',  15,   32.9)
77 def_crossing(`atlas_30m', 15,   30.9)
78 def_crossing(`atlas_60',  30,   48.5)
79 def_crossing(`atlas_60m', 30,   14.5)
80 def_crossing(`atlas_20',  10,   63.5)
81 def_crossing(`atlas_20m', 10,   46.0)
82 def_crossing(`atlas_45',  22.5, 50.9)
83 def_crossing(`atlas_45m', 22.5, 19.5)
84
85 define(`def_point_shino',`
86 dnl OBJNAME-EXCLUDING-PT-L($1) A($2) B($3) Q($4)
87 dnl not R($5)
88  defpart pt_$1l
89   abs c 200 200 0
90   layer s
91   rel c strintersect $3 0 $4
92   rel strintersect strbackanal -$3
93   layer =
94   rel strbackanal b $2
95   join c b 240 arcline
96   extend c a len $2
97  enddef
98  def_thing_l_r(`pt_$1')
99 ')
100
101 def_point_shino(`shino_4', 136, 45, 14.25)
102 def_point_shino(`shino_6', 177, 49,  9.50)
103 def_point_y(`shino_y', 7.125, 140, 10.9, 750) # not minr 500 ?
104
105 defpart pt_shino_x3
106   abs c 200 200 0
107   layer s
108   rel c strintersectc  74 0   9.5
109   rel c strintersectb 103 0 -12
110   layer =
111   rel strintersectc l 141
112   rel strintersectb r 112
113   extend c m len 215
114   join c l 315 arcline
115   join c r 315 arcline
116 enddef
117
118 define(`def_slip2',`
119 dnl OBJNAME-EXCLUDING-SLIP2 HALF-LEN HALF-ANG
120  defpart slip2_$1
121   abs m 200 200 0
122   rel m ml 0 0  $3
123   rel m mr 0 0 -$3
124   extend ml tl len $2
125   extend mr tr len $2
126   extend ml br len -$2
127   extend mr bl len -$2
128   join bl tl 500
129   join br tr 500
130  enddef
131 ')
132
133 def_slip2(`shino', 114, 4.75)
134 def_slip2(`pecof',  77, 5.00)
135
136 define(`def_scis',`
137 dnl OBJNAME-EXCLUDING-SCIS HALF-LENGTH HALF-SPACING HALF-ANG MIN-R
138  defpart scis_$1
139   abs bl 200 200 0
140   rel bl m $2 $3
141   rel m br -$2 $3
142   extend bl ml len $2
143   extend ml tl len $2
144   extend br mr len $2
145   extend mr tr len $2
146   layer s
147   rel m mxl 0 0 $4
148   rel m mxr 0 0 -$4
149   layer =
150   join bl mxr $5
151   join mxr tr $5
152   join br mxl $5
153   join mxl tl $5
154  enddef
155 ')
156
157 def_scis(`pecof', 135.42, 13.5,  10, 315)
158 def_scis(`shino', 154,    13.5, 9.5, 315)
159
160 define(`tt_do_circle',`
161  layer s
162  rel mid forcirc0$2 0 $1 0
163  rel mid forcirc1$2 0 -$1 180
164  layer l
165  join forcirc0$2 forcirc1$2 0
166  join forcirc1$2 forcirc0$2 0
167  layer =
168 ')
169
170 defpart tt_peco
171  layer =
172  abs mid 200 200 0
173  extend mid out len 80
174  extend -mid -in len 80
175
176  tt_do_circle(80, `')
177 enddef
178
179 define(`tt_atlas_out',`
180  layer s
181  rel mid mid$1 0 0 $1
182  layer =
183  rel mid$1 out$1 109 0
184 ')
185
186 defpart tt_atlas
187  layer =
188  abs mid 200 200 0
189  extend mid out len 109
190  extend -mid -in len 109
191
192  tt_atlas_out(`0')
193  tt_atlas_out(`15')
194  tt_atlas_out(`30')
195  tt_atlas_out(`45')
196  tt_atlas_out(`60')
197  tt_atlas_out(`75')
198  tt_atlas_out(`90')
199  tt_atlas_out(`105')
200  tt_atlas_out(`120')
201  tt_atlas_out(`135')
202  tt_atlas_out(`150')
203  tt_atlas_out(`165')
204  tt_atlas_out(`180')
205  tt_atlas_out(`195')
206  tt_atlas_out(`210')
207  tt_atlas_out(`225')
208  tt_atlas_out(`240')
209  tt_atlas_out(`255')
210  tt_atlas_out(`270')
211  tt_atlas_out(`285')
212  tt_atlas_out(`300')
213  tt_atlas_out(`315')
214  tt_atlas_out(`330')
215  tt_atlas_out(`345')
216
217  tt_do_circle(95.25, i)
218  tt_do_circle(109, `')
219 enddef
220
221 defpart tt_atlas_motor
222  abs cout 200 200 0
223  layer p
224  rel cout bl -40 -40
225  rel cout br -40  40
226  extend bl tl len 100
227  extend br tr len 100
228  join tl -tr 0.1
229 enddef