enddef
')
+# Conventionally, points' toes are c, the straight through is a
+# and the curve is b. Segments run from c towards a and b.
+#
+# Crossings (including slips) run `vertically' and have
+# tl, tr, bl, br. Segments run from b* to t*.
+
define(`def_point_ord',`
-dnl OBJNAME-EXCLUDING-PT-L ANGLE STRAIGHT-L CURVE-LONGER CURVE-DIVERGE-Y
+dnl OBJNAME-EXCLUDING-PT-L ANGLE STRAIGHT-L CURVE-LONGER CURVE-DIVERGE-Y MIN-R
defpart pt_$1l
abs c 200 200 0
+ segment /P0
extend c a len $3
rel a b $4 -$5 $2
- join c b 0
+ segment /P1
+ join c b $6
enddef
def_thing_l_r(`pt_$1')
')
define(`def_point_curve',`
-dnl OBJNAME-EXCLUDING-PT-L TIGHT-ANG TIGHT-RECT TIGHT-DIVERGE-Y SHALLOW...
+dnl OBJNAME-EXCLUDING-PT-L TIGHT-ANG TIGHT-RECT TIGHT-DIVERGE-Y SHALLOW.. MIN-R
defpart pt_$1l
abs c 200 200 0
rel c a $6 -$7 $5
rel c b $3 -$4 $2
- join c a 0
- join c b 0
+ segment /P0
+ join c a $8
+ segment /P1
+ join c b $8
enddef
def_thing_l_r(`pt_$1')
')
define(`def_point_y',`
-dnl OBJNAME-EXCLUDING-PT HALF-ANG RECT HALF-DIVERGE-Y
+dnl OBJNAME-EXCLUDING-PT HALF-ANG RECT HALF-DIVERGE-Y MIN-R
defpart pt_$1
abs c 200 200 0
rel c l $3 -$4 $2
rel c r $3 $4 -$2
- join c l 0
- join c r 0
+ segment /P0
+ join c l $5
+ segment /P1
+ join c r $5
enddef
')
abs m 200 200 0
rel m ml 0 0 $2
rel m mr 0 0 -$2
- extend ml tl len $3
+ segment F
extend mr tr len $3
extend mr bl len -$3
+ segment B
+ extend ml tl len $3
extend ml br len -$3
enddef
')
-def_point_ord(`peco_s', 22.5, 87, -0.5, 17)
-def_point_ord(`peco_m', 14, 126.5,-1.55,13.21)
-def_point_ord(`peco_l', 8, 160, -0.4, 13.21)
+def_point_ord(`peco_s', 22.5, 87, -0.5, 17, 200) #ST-5,6 not minr 230 ?
+def_point_ord(`peco_m', 14, 126.5,-1.55,13.21, 315) #SL-395,396 not minr 457 ?
+def_point_ord(`peco_l', 8, 160, -0.4, 13.21, 914) #SL-388,389
# catalogue says 123.7 for STRAIGHT-L ?!
+ # SL-<n> and SL-E<n> have the same geometry
-def_point_curve(`peco_c', 10, 154.4, 13.8, 3, 156.0, 0.8)
+def_point_ord(`pecofguess_l', 10, 160, -1.0, 13.21, 800) #SLE-388F,389F
+ # not minr 914 ?
+ # 36 sleepers just like 36
+ # has 5.2mm gauge, 8.15mm rails offset:
+ # unlike 4.9mm gauge, 7.15mm rails offset:
+ # SL-<n>F and SL-<n> do NOT have the same geometry
+
+def_point_curve(`peco_c', 10, 154.4, 13.8, 3, 156.0, 0.8, 457)
dnl 163.2- } dist to markings on paper cribsheet from c
dnl 32.8- }
-def_point_y(`peco_y', 4, 127, 8.4)
+def_point_y(`peco_y', 4, 127, 8.4, 800) # not minr 762 ?
+
+#def_crossing(`mythical',7, 80)
+def_crossing(`peco_l', 4, 93.75) # SL-394
+def_crossing(`peco_s', 12.5, 46) # ST-7
+def_crossing(`pecof_s', 10, 51.85) # SL-E391F,E392F
+def_crossing(`pecof_l', 5, 77.00) # SL-E394F
-def_crossing(`mythical',7, 80)
-def_crossing(`peco_l', 4, 93.75)
-def_crossing(`peco_s', 12.5, 46)
+def_crossing(`atlas_15', 7.5, 64)
+def_crossing(`atlas_15m', 7.5, 61)
+def_crossing(`atlas_90', 45, 62.4)
+def_crossing(`atlas_90m', 45, 8.5)
+def_crossing(`atlas_30', 15, 32.9)
+def_crossing(`atlas_30m', 15, 30.9)
+def_crossing(`atlas_60', 30, 48.5)
+def_crossing(`atlas_60m', 30, 14.5)
+def_crossing(`atlas_20', 10, 63.5)
+def_crossing(`atlas_20m', 10, 46.0)
+def_crossing(`atlas_45', 22.5, 50.9)
+def_crossing(`atlas_45m', 22.5, 19.5)
define(`def_point_shino',`
dnl OBJNAME-EXCLUDING-PT-L($1) A($2) B($3) Q($4)
rel strintersect strbackanal -$3
layer =
rel strbackanal b $2
- join c b 1 arcline
+ segment /P1
+ join c b 240 arcline
+ segment /P0
extend c a len $2
enddef
def_thing_l_r(`pt_$1')
def_point_shino(`shino_4', 136, 45, 14.25)
def_point_shino(`shino_6', 177, 49, 9.50)
-def_point_y(`shino_y', 7.125, 140, 10.9)
+def_point_y(`shino_y', 7.125, 140, 10.9, 750) # not minr 500 ?
defpart pt_shino_x3
abs c 200 200 0
layer =
rel strintersectc l 141
rel strintersectb r 112
+ segment /P1
extend c m len 215
- join c l 1 arcline
- join c r 1 arcline
+ segment /P0
+ join c l 315 arcline
+ segment /P2
+ join c r 315 arcline
enddef
-defpart pt_shino_cl
- abs c 200 200 -20
- extend c a len 268 -315
- extend c b upto a -285
+define(`def_slip2',`
+dnl OBJNAME-EXCLUDING-SLIP2 HALF-LEN HALF-ANG
+ defpart slip2_$1
+ # configurations: bl-tl 0 bl-tr 1 br-tl 2 br-tr 3
+ abs m 200 200 0
+ rel m ml 0 0 $3
+ rel m mr 0 0 -$3
+ segment /S2
+ extend ml tl len $2
+ segment -/S2
+ extend ml br len -$2
+ segment /S1
+ extend mr tr len $2
+ segment -/S1
+ extend mr bl len -$2
+ segment /S0
+ join bl tl 500
+ segment /S3
+ join br tr 500
+ enddef
+')
+
+def_slip2(`shino', 114, 4.75)
+def_slip2(`pecof', 77, 5.00)
+
+define(`def_scis',`
+dnl OBJNAME-EXCLUDING-SCIS HALF-LENGTH HALF-SPACING HALF-ANG MIN-R
+ defpart scis_$1
+ abs bl 200 200 0
+ rel bl m $2 $3
+ rel m br -$2 $3
+ extend bl ml len $2
+ extend ml tl len $2
+ extend br mr len $2
+ extend mr tr len $2
+ layer s
+ rel m mxl 0 0 $4
+ rel m mxr 0 0 -$4
+ layer =
+ join bl mxr $5
+ join mxr tr $5
+ join br mxl $5
+ join mxl tl $5
+ enddef
+')
+
+def_scis(`pecof', 135.42, 13.5, 10, 315)
+def_scis(`shino', 154, 13.5, 9.5, 315)
+
+define(`tt_do_circle',`
+ layer s
+ rel mid forcirc0$2 0 $1 0
+ rel mid forcirc1$2 0 -$1 180
+ layer l
+ join forcirc0$2 forcirc1$2 0
+ join forcirc1$2 forcirc0$2 0
+ layer =
+')
+
+defpart tt_peco
+ layer =
+ abs mid 200 200 0
+ extend mid out len 80
+ extend -mid -in len 80
+
+ tt_do_circle(80, `')
enddef
-defpart pt_shino_cr
- abs c 200 200 20
- objflip pt_shino_cl c c =
+
+define(`tt_atlas_out',`
+ layer s
+ rel mid mid$1 0 0 $1
+ layer =
+ rel mid$1 out$1 109 0
+')
+
+defpart tt_atlas
+ layer =
+ abs mid 200 200 0
+ extend mid out len 109
+ extend -mid -in len 109
+
+ tt_atlas_out(`0')
+ tt_atlas_out(`15')
+ tt_atlas_out(`30')
+ tt_atlas_out(`45')
+ tt_atlas_out(`60')
+ tt_atlas_out(`75')
+ tt_atlas_out(`90')
+ tt_atlas_out(`105')
+ tt_atlas_out(`120')
+ tt_atlas_out(`135')
+ tt_atlas_out(`150')
+ tt_atlas_out(`165')
+ tt_atlas_out(`180')
+ tt_atlas_out(`195')
+ tt_atlas_out(`210')
+ tt_atlas_out(`225')
+ tt_atlas_out(`240')
+ tt_atlas_out(`255')
+ tt_atlas_out(`270')
+ tt_atlas_out(`285')
+ tt_atlas_out(`300')
+ tt_atlas_out(`315')
+ tt_atlas_out(`330')
+ tt_atlas_out(`345')
+
+ tt_do_circle(95.25, i)
+ tt_do_circle(109, `')
enddef
-defpart slip2_shino
- abs m 200 200 0
- rel m ml 0 0 4.75
- rel m mr 0 0 -4.75
- extend ml tl len 114
- extend mr tr len 114
- extend ml br len -114
- extend mr bl len -114
- join bl tl 500
- join br tr 500
+defpart tt_atlas_motor
+ abs cout 200 200 0
+ layer p
+ rel cout bl -40 -40
+ rel cout br -40 40
+ extend bl tl len 89
+ extend br tr len 89
+ join tl -tr 0.1
enddef