layer 10
-abs midx_m 930 700 90
-part midx cross_peco_s m
-
define(`pt_main_r',`pt_peco_mr')
defobj dualjn_peco_r
part dualjn_tr ^dualjn_peco_r ib -right
enddef
-#abs demos_right 200 1200 0
-#part demos demos right
+#---------- main line figure-of-8
+
+abs midx_m 930 700 90
+part midx cross_peco_s m
extend midx_tr -l0_jtr_b parallel demos!right_main_up 315
part l0_jtr ^pt_main_r b
extend l23_dj_oa l3_sh uptoang 180 -315
+#---------- box
+
layer l5
extend l3_pbl sq_bl_o upto l3_lst
rel sq_bl_o sq_bl_i 0 0 -90
extend sq_br_i sq_bl_o2 upto sq_bl_o
+
+#---------- station branch curve
+
layer 10
rel sq_tl_i l4_ct 352 37 180
extend -l2_ptl -l2_tcl7 ang 60 -352
extend -l0_jtl_c -l0_tcl7 ang 60 -315
-# top level
+#---------- hill branch (figure of 8)
layer 20
extend -h_brh -h_8m uptoang -35 230
extend -h_8m -h_8b uptoang 245 -230
-rel l0_tlc5 h_ub 0 45
-join h_ub h_8b 230
-
-#extend -h_ub -h_pbl_c parallel l0_jbl_c -270
rel l0_jbl_c -h_pbl_c 0 -45
rel l0_jbl_b -h_pbl_b 0 -45
-join h_pbl_c h_ub 230
join h_pbl_b h_pbl_c 230
extend -h_pbl_b -hj_p ang 40 -270
join hj_b hj_p 230
+extend h_pbl_c h_ub upto h_brh 270
+join h_ub h_8b 230
-#extend -h_pbl_c -h_pbl_p parallel l0_jbl_c -278
-#extend -h_ub -hj_p parallel hj_b -278
-#join hj_b hj_p 230
-
-eof
-
-layer 20s
-extend -sq_bl_o
-
-extend -sq_bl_o h_bbll_c len 150
-part h_bbll ^pt_peco_sr c
-extend h_bbll_b -h_bll_b uptoang 80 -230
-part h_bll pt_peco_sr b
-
-eof
+#---------- hill stations turntable
-#silent:
-extend h_bll_a -demo_h_bbl_b parallel demos!right_short_down -230
-part demo_h_bbl pt_peco_sr b
+layer s5
+rel sq_br_i sq_br_diag 0 0 -45
-extend hj_b hj_s1 len 0.0040
-extend hj_s1 hj_s2 uptoang 135 -230
-#extend hj_s2 hj_ct uptoang 180 -230
+layer 20
+rel sq_br_diag htt_mid 127 0 90
+extend htt_mid htt_1 len 80
+extend -htt_mid -htt_0 len 80
-extend -h_bll_c -hj_s9 ang 40 -230
-#join hj_s2 hj_s9 230
-#join hj_s2 hj_s9 0
+layer l20
+rel htt_0 htt_forcirc0 80 80 0
+rel htt_forcirc0 htt_forcirc1 0 -160 180
+join htt_forcirc0 htt_forcirc1 0
+join htt_forcirc1 htt_forcirc0 0
-extend -hj_s9 -hj_s9_e ang 180 230
+layer 20
+extend -htt_0 -htt_s0 uptoang 180 230
+extend htt_1 htt_s1 uptoang 90 -230
eof