summaryrefslogtreecommitdiff
path: root/app/lib/demos/dmrotate.xtr
blob: 074aea5e21d9577167ca7c08548e640e7ef60157 (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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
VERSION 10
DEMOINIT
ORIG 4.000 0.000 0.000
STRUCTURE 1 0 0 0 0 N 2 2.000000 3.062500 0 0.000000 "Walthers	Interstate Fuel - Loading Rack	933-32000a"
	D 0.000000 0.000000
	L3 0 0.000000 0.750000 0.000000 0 3.750000 0.000000 0
	L3 0 0.000000 3.750000 0.000000 0 3.750000 3.125000 0
	L3 0 0.000000 3.750000 3.125000 0 0.750000 3.125000 0
	L3 0 0.000000 3.687500 0.062500 0 1.687500 0.062500 0
	L3 0 0.000000 1.687500 0.062500 0 1.687500 0.812500 0
	L3 0 0.000000 1.687500 0.812500 0 3.687500 0.812500 0
	L3 0 0.000000 3.687500 0.812500 0 3.687500 0.062500 0
	L3 0 0.000000 3.687500 3.062500 0 1.687500 3.062500 0
	L3 0 0.000000 1.687500 3.062500 0 1.687500 2.312500 0
	L3 0 0.000000 1.687500 2.312500 0 3.687500 2.312500 0
	L3 0 0.000000 3.687500 2.312500 0 3.687500 3.062500 0
	L3 0 0.000000 3.687500 1.187500 0 1.687500 1.187500 0
	L3 0 0.000000 1.687500 1.187500 0 1.687500 1.937500 0
	L3 0 0.000000 1.687500 1.937500 0 3.687500 1.937500 0
	L3 0 0.000000 3.687500 1.937500 0 3.687500 1.187500 0
	A3 0 0.000000 0.088388 3.000000 2.687500 0 0.000000 360.000000
	A3 0 0.000000 0.088388 3.000000 1.562500 0 0.000000 360.000000
	A3 0 0.000000 0.088388 3.000000 0.437500 0 0.000000 360.000000
	L3 0 0.000000 0.750000 2.875000 0 0.000000 2.875000 0
	L3 0 0.000000 0.000000 2.875000 0 0.000000 0.250000 0
	L3 0 0.000000 0.000000 0.250000 0 0.750000 0.250000 0
	L3 0 0.000000 1.500000 2.187500 0 0.437500 2.187500 0
	L3 0 0.000000 0.437500 2.187500 0 0.437500 0.937500 0
	L3 0 0.000000 0.437500 0.937500 0 1.500000 0.937500 0
	L3 0 0.000000 1.500000 0.937500 0 1.500000 2.187500 0
	L3 0 0.000000 0.750000 3.125000 0 0.750000 2.187500 0
	L3 0 0.000000 0.750000 0.000000 0 0.750000 0.937500 0
	END
STRAIGHT 2 0 0 0 0 N 2
	E 2.250000 0.062500 236.697715
	E 19.375000 11.312500 56.697715
	END
CURVE 3 0 0 0 0 N 2 22.859949 -1.206745 0 11.250000 0 0.000000 0.000000
	E 11.625000 -0.625000 182.964125
	E 20.250359 9.736405 76.587298
	END
STRUCTURE 4 0 0 0 0 N 2 8.625000 7.750000 0 0.000000 "Walthers	Shady Jct Water Tower	933-3205a"
	D 0.000000 0.000000
	L3 0 0.000000 0.000000 0.000000 0 1.562500 0.000000 0
	L3 0 0.000000 1.562500 0.000000 0 1.562500 1.562500 0
	L3 0 0.000000 1.562500 1.562500 0 0.000000 1.562500 0
	L3 0 0.000000 0.000000 1.562500 0 0.000000 0.000000 0
	L3 0 0.000000 0.000000 0.375000 0 1.250000 0.375000 0
	L3 0 0.000000 1.250000 0.375000 0 1.250000 1.562500 0
	L3 0 0.000000 0.625000 1.000000 0 0.625000 0.375000 0
	L3 0 0.000000 0.625000 1.000000 0 1.250000 1.000000 0
	L3 0 0.000000 0.625000 1.000000 0 0.000000 1.000000 0
	L3 0 0.000000 0.625000 1.000000 0 0.625000 1.562500 0
	L3 0 0.000000 0.625000 1.000000 0 1.062500 1.437500 0
	L3 0 0.000000 0.625000 1.000000 0 1.062500 0.562500 0
	L3 0 0.000000 0.625000 1.000000 0 0.187500 0.562500 0
	L3 0 0.000000 0.625000 1.000000 0 0.187500 1.437500 0
	L3 0 0.000000 0.625000 1.562500 0 1.062500 1.437500 0
	L3 0 0.000000 1.062500 1.437500 0 1.250000 1.000000 0
	L3 0 0.000000 1.250000 1.000000 0 1.062500 0.562500 0
	L3 0 0.000000 1.062500 0.562500 0 0.625000 0.375000 0
	L3 0 0.000000 0.625000 0.375000 0 0.187500 0.562500 0
	L3 0 0.000000 0.187500 0.562500 0 0.000000 1.000000 0
	L3 0 0.000000 0.000000 1.000000 0 0.187500 1.437500 0
	L3 0 0.000000 0.187500 1.437500 0 0.625000 1.562500 0
	L3 0 0.000000 1.250000 1.500000 0 1.750000 1.500000 0
	L3 0 0.000000 1.750000 1.500000 0 1.750000 1.062500 0
	L3 0 0.000000 1.750000 1.062500 0 1.250000 1.062500 0
	END
REDRAW
RESET
MESSAGE
The <Rotate> command will pivot the Selected objects.  First Click on the pivot point and then drag to Rotate the objects.
In this example we will rotate the selected structure about it's center.
END
STEP
RESET
COMMAND Select
MOUSE 2 5.562 5.000
MOUSE 4 5.562 5.000
COMMAND Rotate
MOUSE 5 4.062 4.500
MOUSE 6 4.062 4.438
MOUSE 7 4.062 4.438
MOUSE 2 4.062 4.625
MOUSE 3 4.062 4.625
MOUSE 3 4.062 4.688
MOUSE 3 4.062 4.812
MOUSE 3 4.125 4.938
MOUSE 3 4.125 5.000
MOUSE 3 4.125 5.000
MOUSE 3 4.125 5.062
MOUSE 3 4.125 5.125
MOUSE 3 4.125 5.188
MOUSE 3 4.125 5.250
MOUSE 3 4.188 5.312
MOUSE 3 4.188 5.312
MOUSE 3 4.188 5.375
MOUSE 3 4.188 5.438
MOUSE 3 4.188 5.500
MOUSE 3 4.250 5.500
MOUSE 3 4.250 5.562
MOUSE 3 4.250 5.625
MOUSE 3 4.312 5.625
MOUSE 3 4.312 5.688
MOUSE 3 4.312 5.750
MOUSE 3 4.312 5.812
MOUSE 3 4.312 5.812
MOUSE 3 4.312 5.875
MOUSE 3 4.312 5.938
MOUSE 3 4.375 5.938
MOUSE 3 4.375 6.000
MOUSE 3 4.375 6.000
MOUSE 3 4.438 6.000
MOUSE 3 4.500 6.000
MOUSE 3 4.562 6.000
MOUSE 3 4.562 6.062
MOUSE 3 4.625 6.062
MOUSE 3 4.625 6.062
MOUSE 3 4.688 6.062
MOUSE 3 4.688 6.125
MOUSE 3 4.750 6.125
MOUSE 3 4.812 6.125
MOUSE 3 4.938 6.125
MOUSE 3 5.000 6.125
MOUSE 4 5.000 6.125
MESSAGE
_________________________________________

The <Rotate> command will restrict the rotation to increments of 15° if you hold down the Control key.
END
STEP
PARAMETER misc cmdUndo
RESET
COMMAND Rotate
KEYSTATE 4
MOUSE 2 4.125 4.625
KEYSTATE 4
MOUSE 3 4.125 4.688
KEYSTATE 4
MOUSE 3 4.188 4.688
KEYSTATE 4
MOUSE 3 4.188 4.750
KEYSTATE 4
MOUSE 3 4.188 4.812
KEYSTATE 4
MOUSE 3 4.188 4.875
KEYSTATE 4
MOUSE 3 4.125 4.875
KEYSTATE 4
MOUSE 3 4.125 4.938
KEYSTATE 4
MOUSE 3 4.125 5.000
KEYSTATE 4
MOUSE 3 4.125 5.000
KEYSTATE 4
MOUSE 3 4.125 5.062
KEYSTATE 4
MOUSE 3 4.125 5.125
KEYSTATE 4
MOUSE 3 4.125 5.188
KEYSTATE 4
MOUSE 3 4.125 5.312
KEYSTATE 4
MOUSE 3 4.125 5.312
KEYSTATE 4
MOUSE 3 4.188 5.438
KEYSTATE 4
MOUSE 3 4.188 5.500
KEYSTATE 4
MOUSE 3 4.188 5.562
KEYSTATE 4
MOUSE 3 4.188 5.625
KEYSTATE 4
MOUSE 3 4.188 5.625
KEYSTATE 4
MOUSE 3 4.188 5.688
KEYSTATE 4
MOUSE 3 4.188 5.750
KEYSTATE 4
MOUSE 3 4.250 5.812
KEYSTATE 4
MOUSE 3 4.250 5.875
KEYSTATE 4
MOUSE 3 4.250 6.000
KEYSTATE 4
MOUSE 3 4.312 6.000
KEYSTATE 4
MOUSE 3 4.312 6.062
KEYSTATE 4
MOUSE 3 4.312 6.125
KEYSTATE 4
MOUSE 3 4.312 6.188
KEYSTATE 4
MOUSE 3 4.312 6.250
KEYSTATE 4
MOUSE 3 4.375 6.250
KEYSTATE 4
MOUSE 3 4.438 6.250
KEYSTATE 4
MOUSE 3 4.500 6.250
KEYSTATE 4
MOUSE 3 4.562 6.312
KEYSTATE 4
MOUSE 3 4.625 6.312
KEYSTATE 4
MOUSE 3 4.625 6.375
KEYSTATE 4
MOUSE 3 4.688 6.375
KEYSTATE 4
MOUSE 3 4.750 6.375
KEYSTATE 4
MOUSE 3 4.750 6.438
KEYSTATE 4
MOUSE 3 4.750 6.500
KEYSTATE 4
MOUSE 3 4.812 6.500
KEYSTATE 4
MOUSE 3 4.812 6.562
KEYSTATE 4
MOUSE 3 4.875 6.562
KEYSTATE 4
MOUSE 3 4.938 6.562
KEYSTATE 4
MOUSE 3 5.000 6.562
KEYSTATE 4
MOUSE 3 5.000 6.562
KEYSTATE 4
MOUSE 3 5.062 6.562
KEYSTATE 4
MOUSE 3 5.125 6.562
KEYSTATE 4
MOUSE 3 5.188 6.562
KEYSTATE 4
MOUSE 3 5.250 6.562
KEYSTATE 4
MOUSE 3 5.312 6.562
KEYSTATE 4
MOUSE 3 5.312 6.500
KEYSTATE 4
MOUSE 3 5.312 6.438
KEYSTATE 4
MOUSE 3 5.312 6.375
KEYSTATE 4
MOUSE 3 5.375 6.375
KEYSTATE 4
MOUSE 3 5.438 6.375
KEYSTATE 4
MOUSE 3 5.438 6.312
KEYSTATE 4
MOUSE 3 5.438 6.312
KEYSTATE 4
MOUSE 3 5.500 6.312
KEYSTATE 4
MOUSE 3 5.500 6.250
KEYSTATE 4
MOUSE 3 5.562 6.250
KEYSTATE 4
MOUSE 3 5.562 6.188
KEYSTATE 4
MOUSE 3 5.562 6.125
KEYSTATE 4
MOUSE 3 5.625 6.125
KEYSTATE 4
MOUSE 3 5.625 6.062
KEYSTATE 4
MOUSE 3 5.625 6.062
KEYSTATE 4
MOUSE 3 5.625 6.000
KEYSTATE 4
MOUSE 3 5.625 6.000
KEYSTATE 4
MOUSE 3 5.688 6.000
KEYSTATE 4
MOUSE 3 5.688 5.938
KEYSTATE 4
MOUSE 3 5.750 5.938
KEYSTATE 4
MOUSE 3 5.750 5.875
KEYSTATE 4
MOUSE 3 5.812 5.875
KEYSTATE 4
MOUSE 3 5.812 5.812
KEYSTATE 4
MOUSE 3 5.875 5.750
KEYSTATE 4
MOUSE 3 5.875 5.688
KEYSTATE 4
MOUSE 3 5.938 5.688
KEYSTATE 4
MOUSE 3 5.938 5.625
KEYSTATE 4
MOUSE 3 5.938 5.625
KEYSTATE 4
MOUSE 3 6.000 5.625
KEYSTATE 4
MOUSE 4 6.000 5.625
MESSAGE
_________________________________________

Shift-Right-Click will display a popup-menu that you can use to rotate by fixed amount (15°, 30°, 45°, 90° or 180°).  The demonstration cannot show the popup-menu but it can show the effects.

Here we will rotate by 90° clockwise (CW).
END
STEP
KEYSTATE 2
MOUSE 5 3.812 4.688
KEYSTATE 2
MOUSE 7 3.812 4.688
MENU 3.812 4.688 "Move Draw Mode " "90  CW"
MESSAGE
_________________________________________

Another option of the <Rotate> command popup-menu is to Align the Selected object with some other object.

First we will click on one line of the Selected object.  The angle of this part of the object will be Aligned.
END
STEP
KEYSTATE 2
MOUSE 5 5.875 5.000
KEYSTATE 2
MOUSE 7 5.875 5.000
MENU 5.875 5.000 "Move Draw Mode " "Align"
MOUSE 2 5.812 5.125
MOUSE 4 5.812 5.125
MESSAGE
_________________________________________

Next, we click on an Unselected object.  The Selected structure will be rotated so that the line we clicked on will be parallel to the straight track.
END
STEP
MOUSE 2 6.625 3.062
MESSAGE
_________________________________________

If we drag the mouse across the track, we can flip the structure by 180°.  This is similar to how we place turnouts.
END
STEP
MOUSE 3 6.750 2.750
BIGPAUSE
MOUSE 3 6.625 3.062
BIGPAUSE
MOUSE 3 6.750 2.750
MESSAGE
_________________________________________

We can also align to curved shapes.  The Selected object will be rotated to be parallel to the curve under the cursor.
END
STEP
MOUSE 3 12.250 3.250
MESSAGE
_________________________________________

As we drag along the curved track the Selected object rotates to follow the curve.
END
STEP
MOUSE 3 12.250 3.312
MOUSE 3 12.312 3.312
MOUSE 3 12.312 3.438
MOUSE 3 12.312 3.562
MOUSE 3 12.312 3.625
MOUSE 3 12.312 3.750
MOUSE 3 12.375 3.812
MOUSE 3 12.375 3.938
MOUSE 3 12.500 4.000
MOUSE 3 12.562 4.062
MOUSE 3 12.625 4.125
MOUSE 3 12.688 4.250
MOUSE 3 12.750 4.312
MOUSE 3 12.812 4.312
MOUSE 3 12.875 4.375
MOUSE 3 12.938 4.438
MOUSE 3 13.000 4.500
MOUSE 3 13.062 4.625
MOUSE 3 13.125 4.625
MOUSE 3 13.188 4.688
MOUSE 3 13.250 4.812
MOUSE 3 13.312 4.875
MOUSE 3 13.312 4.938
MOUSE 3 13.312 5.000
MOUSE 3 13.375 5.125
MOUSE 3 13.438 5.250
MOUSE 3 13.500 5.312
MOUSE 3 13.500 5.438
MOUSE 3 13.562 5.500
MOUSE 3 13.625 5.562
MOUSE 3 13.625 5.625
MOUSE 3 13.625 5.688
MOUSE 3 13.625 5.812
MOUSE 3 13.688 5.938
MOUSE 3 13.750 6.000
MOUSE 3 13.812 6.125
MOUSE 3 13.812 6.250
MOUSE 3 13.875 6.312
MOUSE 3 13.938 6.312
MOUSE 3 14.000 6.375
MOUSE 3 14.062 6.375
MOUSE 3 14.188 6.438
MOUSE 3 14.250 6.500
MOUSE 3 14.312 6.562
MOUSE 3 14.438 6.562
MESSAGE
_________________________________________

Again, if we drag across the track we can flip the stucture.
END
STEP
MOUSE 3 14.600 6.200
BIGPAUSE
MESSAGE
_________________________________________

We can also Align to another Structure or any object.

END
STEP
MOUSE 3 8.500 7.812
MOUSE 3 8.500 7.875
MOUSE 3 8.500 7.938
MOUSE 3 8.500 8.000
MOUSE 3 8.500 8.000
MOUSE 3 8.500 8.062
MOUSE 3 8.500 8.125
MOUSE 3 8.500 8.188
MOUSE 3 8.500 8.250
MOUSE 3 8.500 8.312
MOUSE 3 8.500 8.312
MOUSE 3 8.500 8.375
MOUSE 3 8.500 8.438
MOUSE 3 8.500 8.500
MOUSE 3 8.500 8.562
MOUSE 3 8.500 8.625
MOUSE 3 8.500 8.625
MOUSE 3 8.500 8.688
MOUSE 3 8.500 8.750
MOUSE 3 8.562 8.812
MOUSE 3 8.562 8.875
MOUSE 3 8.562 8.938
MOUSE 3 8.562 9.000
MOUSE 3 8.625 9.000
MOUSE 3 8.625 9.000
MOUSE 3 8.625 9.062
MOUSE 3 8.625 9.125
MOUSE 3 8.625 9.188
MOUSE 3 8.625 9.250
MOUSE 3 8.625 9.312
MOUSE 3 8.625 9.312
MOUSE 3 8.625 9.375
MOUSE 3 8.625 9.438
MOUSE 3 8.625 9.375
MOUSE 3 8.625 9.375
MOUSE 3 8.688 9.312
MOUSE 3 8.750 9.312
MOUSE 3 8.750 9.312
MOUSE 3 8.875 9.312
MOUSE 3 8.938 9.312
MOUSE 3 9.000 9.312
MOUSE 3 9.000 9.312
MOUSE 3 9.062 9.312
MOUSE 3 9.062 9.312
MOUSE 3 9.125 9.312
MOUSE 3 9.188 9.312
MOUSE 3 9.250 9.312
MOUSE 3 9.312 9.312
MOUSE 3 9.312 9.312
MOUSE 3 9.375 9.312
MOUSE 3 9.438 9.312
MOUSE 3 9.500 9.312
MOUSE 3 9.562 9.312
MOUSE 3 9.625 9.312
MOUSE 3 9.625 9.312
MOUSE 3 9.688 9.312
MOUSE 3 9.750 9.312
MOUSE 3 9.812 9.312
MOUSE 3 9.875 9.312
MOUSE 3 9.938 9.312
MOUSE 3 10.000 9.312
MOUSE 3 10.000 9.312
MOUSE 3 10.062 9.312
MOUSE 3 10.125 9.312
MOUSE 3 10.125 9.312
MOUSE 3 10.125 9.250
MOUSE 3 10.125 9.188
MOUSE 3 10.125 9.125
MOUSE 3 10.125 9.062
MOUSE 3 10.062 9.062
MOUSE 3 10.062 9.000
MOUSE 3 10.062 9.000
MOUSE 3 10.062 8.938
MOUSE 3 10.062 8.875
MOUSE 3 10.062 8.812
MOUSE 3 10.125 8.812
MOUSE 3 10.125 8.750
MOUSE 3 10.125 8.688
MOUSE 3 10.125 8.625
MOUSE 3 10.125 8.625
MOUSE 3 10.125 8.562
MOUSE 3 10.125 8.500
MOUSE 4 10.125 8.500
MESSAGE
=========================================
END
STEP
CLEAR