Rail3D*


 

New Pan Code



Build #100 introduces two new keywords for pantographs: pantograph and panarm. With these two new keywords, it is now possible to model pantographs where the elements rotate about the pivot points properly, instead of the old code which only distorted the elements.

Pantograph

Syntax: Pantograph w/l/h <ComponentName>

This component introduces the pantograph component. Syntax and use is the same as the include statement, however pantograph must be used instead of include:

  • The l value defines the l position of the contact point: this is used to calculate the appropriate height of the wire at this point. (L dimension in the above diagram.)
  • The h value defiens the height of the bottom pivot of the arms. This value is important as it is used to calculate the position of the pantograph arms. (H dimension in the above diagram.)
  • A pantograph component must be used, as this initialises the transforms used for the arm positioning.

panarm

Syntax: panarm w/l/h hyp <ComponentName>

This keyword includes a sub-component in the same way as an include keyword, but with the addition of a vertical rotation according to the wire height.

  • The sub-component is included such that the 0/0/0 point of the sub-component is at the specified w/l/h point of the parent component.
  • The hyp parameter determines the rotation as follows. (See diagram). Imagine a right-angle triangle from the base point of the pantograph (shown by L and H in the diagram) to the contact wire with the hypotenuese shown as the red arm. The hyp parameter specifes the length of this hypotenuese and hence the angle of the red arm.
  • In the diagram example, the red arm is the full length of the hypotenuese for the purposes of illustration, in practice you would only model the component as far as the pivot with the yellow arm, however, the hyp parameter is still the full length of the imaginary hypotenuese
  • Note that sub-component angles are also calculated against the full height from the pantograph base to the contact wire.

Example code

Name	PanTest
Length	400
Weight	50
Max	50
Power	50
gauge 48

fill 	 -40/0/30 40/0/30 40/400/30 -40/400/30 255.255.255
fill	 -40/0/100 40/0/100 40/400/100 -40/400/100 255.255.255

fill	-40/0/30 -40/0/100 -40/400/100 -40/400/30 192.192.192	
fill	-40/20/40 -40/20/90 -40/380/90 -40/380/40 192.0.0

fill 	40/0/30 40/0/100 40/400/100 40/400/30 192.192.192	
fill	-40/0/30 40/0/30 40/0/100 -40/0/100 128.128.128	
fill 	-40/400/30 40/400/30 40/400/100 -40/400/100 128.128.128

	Pantograph 0.300.105 TestPan


[end]

	Name	TestPan
	Component
	PANARM 0/0/0 200 TestArmLower
[end]
Name TestArmLower
Component	

	FILL 0/0/0 0/0/10 0/200/10 0/200/0 255.0.0 =

	PANARM 0/100/0 -200 TestArmUpper
[end]

Name TestArmUpper
Component	

	FILL 0/0/0 0/0/10 0/-100/10 0/-100/0 255.255.0 =





import