summaryrefslogtreecommitdiff
path: root/app/lib/demos/dmlines.xtr
blob: 9f2b66febf90dfea3d80a331fb74aacc10829cff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
VERSION 2
DEMOINIT
ORIG 2.000 0.000 0.000
PARAMETER display labelenable 4
STRAIGHT 1 DEMO 1
	E 0.051703 4.160000 270.000000
	T 2 4.533333 4.160000 90.000000
	END
TURNOUT 2 DEMO 1 4.533333 4.160000 0.000000 "Peco-55	Medium Left	SL-E395F"
	T 1 4.533333 4.160000 270.000000
	T 3 9.938333 4.160000 90.000000
	T 6 9.903333 3.638000 99.686000
	P "Normal" 1 2
	P "Reverse" 1 3 4
	S 0 0 0.000000 0.000000 0.353000 0.000000
	S 0 0 0.353000 0.000000 5.405000 0.000000
	C 0 0 23.136000 0.351000 -23.136000 0.004000 9.700000
	S 0 0 4.251000 -0.331000 5.370000 -0.522000
	END
STRAIGHT 3 DEMO 1
	E 31.466667 4.160000 90.000000
	T 2 9.938333 4.160000 270.000000
	END
STRAIGHT 4 DEMO 1
	E 31.466667 2.660000 90.000000
	T 5 16.693333 2.660000 270.000000
	END
CURVE 5 DEMO 1 16.693333 15.171003 12.511003
	T 4 16.693333 2.660000 90.000000
	T 6 14.588376 2.838349 279.686000
	END
STRAIGHT 6 DEMO 1
	T 2 9.903333 3.638000 279.686000
	T 5 14.588376 2.838349 99.686000
	END
REDRAW
RESET
MESSAGE
The Draw Commands are used to draw straight and curved lines on the layout.

END
STEP
COMMAND DrawLine
PARAMETER draw linewidth 0
PARAMETER draw linecolor 0
MESSAGE
_________________________________________

Lines are drawn by clicking at the starting postion and dragging to the final position.

By default, the new line will snap to existing objects.  Hold down the <Ctrl> and <Alt> keys to prevent this from happening.
END
STEP
KEYSTATE 12
MOUSE 2 0.533 4.693
KEYSTATE 12
MOUSE 3 4.320 4.693
KEYSTATE 12
MOUSE 4 4.320 4.693
KEYSTATE 12
MOUSE 2 4.373 4.693
KEYSTATE 12
MOUSE 3 4.533 5.120
KEYSTATE 12
MOUSE 4 4.533 5.120
KEYSTATE 12
MOUSE 2 0.533 4.693
KEYSTATE 12
MOUSE 3 0.533 4.693
KEYSTATE 12
MOUSE 4 0.267 5.120
KEYSTATE 12
MOUSE 2 0.267 3.253
KEYSTATE 12
MOUSE 3 0.533 3.787
KEYSTATE 12
MOUSE 4 0.533 3.787
STEP
KEYSTATE 12
MOUSE 2 0.533 3.787
KEYSTATE 12
MOUSE 3 4.320 3.787
KEYSTATE 12
MOUSE 4 4.320 3.787
KEYSTATE 12
MOUSE 2 4.320 3.787
KEYSTATE 12
MOUSE 3 4.533 3.307
KEYSTATE 12
MOUSE 4 4.533 3.307
MESSAGE
_________________________________________

You also draw in various colors and line widths.
END
PARAMETER draw linecolor 255
PARAMETER draw linewidth 6
STEP
MOUSE 2 0.747 4.800
MOUSE 4 0.693 6.560
MOUSE 2 0.693 6.560
MOUSE 4 1.493 7.573
MOUSE 2 1.547 7.573
MOUSE 4 3.147 7.467
MOUSE 2 3.147 7.467
MOUSE 4 4.213 5.813
MOUSE 2 4.207 5.800
MOUSE 4 4.107 4.693
MESSAGE
_________________________________________

Like Curved Tracks, Curved Lines can be drawn by a variety of methods.

Here we will draw a Curve by dragging from one End-Point to the other to define the chord of the Curve.  Then we will drag from the center to shape the curve.
END
STEP
COMMAND DrawCurveChord
KEYSTATE 12
MOUSE 2 0.800 3.680
#MOUSE 3 0.800 3.573
#MOUSE 3 0.853 3.467
#MOUSE 3 0.853 3.360
#MOUSE 3 0.853 3.253
#MOUSE 3 0.853 3.147
#MOUSE 3 0.853 2.987
#MOUSE 3 0.853 2.880
#MOUSE 3 0.747 2.560
#MOUSE 3 0.747 2.133
#MOUSE 3 0.747 1.707
#MOUSE 3 0.747 1.547
#MOUSE 3 0.800 1.493
#MOUSE 3 0.800 1.440
#MOUSE 3 0.800 1.387
#MOUSE 3 0.853 1.280
#MOUSE 3 0.907 1.173
#MOUSE 3 1.120 0.960
#MOUSE 3 1.173 0.907
#MOUSE 3 1.173 0.853
#MOUSE 3 1.173 0.800
#MOUSE 3 1.173 0.747
#MOUSE 4 1.173 0.747
#BIGPAUSE
#MOUSE 2 1.173 0.747
#MOUSE 3 1.280 0.747
#MOUSE 3 1.600 0.533
#MOUSE 3 2.133 0.427
#MOUSE 3 2.773 0.427
#MOUSE 3 3.520 0.533
#MOUSE 3 4.053 0.747
#MOUSE 3 4.480 0.960
#MOUSE 3 4.693 1.173
#MOUSE 3 4.800 1.493
#MOUSE 3 4.800 1.920
#MOUSE 3 4.800 2.347
#MOUSE 3 4.907 2.773
#MOUSE 3 4.853 2.880
#MOUSE 3 4.747 3.200
#MOUSE 3 4.693 3.253
#MOUSE 3 4.640 3.307
#MOUSE 3 4.533 3.307
#MOUSE 3 4.480 3.307
#MOUSE 3 4.427 3.307
#MOUSE 3 4.373 3.360
#MOUSE 3 4.267 3.360
#MOUSE 3 4.160 3.413
#MOUSE 3 4.107 3.467
#MOUSE 3 4.053 3.520
#MOUSE 3 4.000 3.520
#MOUSE 3 4.000 3.467
#MOUSE 3 4.000 3.520
#MOUSE 3 4.053 3.573
#MOUSE 3 4.000 3.627
#MOUSE 3 4.000 3.680
#MOUSE 3 3.947 3.680
#MOUSE 3 3.947 3.733
#MOUSE 3 3.947 3.787
KEYSTATE 12
MOUSE 4 4.107 3.787
BIGPAUSE
KEYSTATE 12
MOUSE 2 2.9 3.78
KEYSTATE 12
MOUSE 4 2.9 1.5
MESSAGE
_________________________________________

Boxes are useful for drawing rectangular shapes.
END
STEP
PARAMETER draw linecolor 8355584
COMMAND DrawBox
MOUSE 2 11.413 4.960
MOUSE 4 20.640 7.840
MESSAGE
_________________________________________

Circles can be drawn by clicking on the center or edge and dragging to set the radius.
Here we will drag from the Center.
END
STEP
COMMAND DrawCircleCenter
MOUSE 2 7.360 6.453
MOUSE 4 8.533 5.920
MESSAGE
_________________________________________

Lines and Shapes can be deleted by Selecting and Deleting.
END
STEP
COMMAND Select
MOUSE 2 11.307 6.400
MOUSE 4 11.307 6.400
#BIGPAUSE
#PARAMETER misc cmdDelete
KEYSTATE 4
MOUSE 2 4.160 5.493
KEYSTATE 4
MOUSE 4 4.160 5.493
#BIGPAUSE
#PARAMETER misc cmdDelete
KEYSTATE 4
MOUSE 2 3.467 6.933
KEYSTATE 4
MOUSE 4 3.467 6.933
BIGPAUSE
PARAMETER misc cmdDelete
MESSAGE
=========================================
END
REGRESSION START 10 - lines
STRAIGHT 1 0 0 0 0 DEMO 2
	E4 0.051703 4.160000 270.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 2 4.533333 4.160000 90.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	END
TURNOUT  2 0 0 0 0 DEMO 2 4.533333 4.160000 0 0.000000 "Peco-55	Medium Left	SL-E395F"
	T4 1 4.533333 4.160000 270.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 3 9.938333 4.160000 90.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 6 9.903333 3.638000 99.686000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	D 0.000000 0.000000
	P "Normal" 1 2
	P "Reverse" 1 3 4
	S 0 0.000000 0.000000 0.000000 0.353000 0.000000
	S 0 0.000000 0.353000 0.000000 5.405000 0.000000
	C 0 0.000000 23.136000 0.351000 -23.136000 0.004000 9.700000
	S 0 0.000000 4.251000 -0.331000 5.370000 -0.522000
	END
STRAIGHT 3 0 0 0 0 DEMO 2
	E4 31.466667 4.160000 90.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 2 9.938333 4.160000 270.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	END
STRAIGHT 4 0 0 0 0 DEMO 2
	E4 31.466667 2.660000 90.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 5 16.693333 2.660000 270.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	END
CURVE 5 0 0 0 0 DEMO 2 16.693333 15.171003 0 12.511003 0 0.000000 0.000000
	T4 4 16.693333 2.660000 90.000000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 6 14.588376 2.838349 279.686000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	END
STRAIGHT 6 0 0 0 0 DEMO 2
	T4 2 9.903333 3.638000 279.686000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	T4 5 14.588376 2.838349 99.686000 0 0.0 0.0 0.0 0.0 0 0 0 0.000000 
	END
DRAW 7 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 0.533000 4.693000 0 4.320000 4.693000 0
	END
DRAW 8 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 4.373000 4.693000 0 4.533000 5.120000 0
	END
DRAW 9 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 0.533000 4.693000 0 0.267000 5.120000 0
	END
DRAW 10 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 0.267000 3.253000 0 0.533000 3.787000 0
	END
DRAW 11 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 0.533000 3.787000 0 4.320000 3.787000 0
	END
DRAW 12 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 0 0.000000 4.320000 3.787000 0 4.533000 3.307000 0
	END
DRAW 13 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 255 0.083333 0.747000 4.693000 0 0.693000 6.560000 0
	END
DRAW 14 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 255 0.083333 0.693000 6.560000 0 1.493000 7.573000 0
	END
DRAW 15 0 0 0 0 0.000000 0.000000 0 0.000000
	L3 255 0.083333 1.493000 7.573000 0 3.147000 7.467000 0
	END
DRAW 18 0 0 0 0 0.000000 0.000000 0 0.000000
	A3 255 0.083333 1.732465 2.470132 3.219463 0 70.877480 214.538653
	END
DRAW 20 0 0 0 0 0.000000 0.000000 0 0.000000
	A3 8421376 0.083333 1.288417 8.533000 5.920000 0 0.000000 360.000000
	END
REGRESSION END
STEP
CLEAR
RESET