Conductor - Wire
The source code for a wire describes the current path in three-dimensional space. For this description object coordinates are used, before Euler angle rotation and translation to the position determined by the position parameter. We begin a wire by giving the starting point (in object coordinates)
start 2 2 0 ; we begin here
As always, the default length unit is meters. To draw a straight line segment we simply say where to go:
goto 0.5 0 0
To make an arc, we can specify a center and normal. For example, if we are in the x-y plane and want to turn about the z-axis, we set
center 0 0 0 normal 0 0 1
and then turn, starting at the present position. Before making the arc, we must first specify the finesse of the turn:
dtheta 20 ; stepsize in degrees
Then the turn command is used to create the arc:
turn 90; angle in degrees
Note that the normal command specifies the axis of the cylinder on which the winding is done. Giving a center which is along the normal with respect to the current position will result in a skew winding.
Another way to make an arc is use the axis command, which uses two points to specify an axis. For example, to make the axis of rotation parallel to the z-axis, but passing through x=y=2, the command is
axis 2 2 0 2 2 1
The distance between the two points is immaterial. After an axis command, the turn command makes a circular arc about the specified axis.
To make a helix you specify a pitch prior to making a turn. The pitch is specified by giving the length per turn
pitch 1mm
Since the main use of pitch is to make multi-turn windings, the turn command will accept turn units:
turn 5t
Finally, to close the wire (this is optional) the command is
close
The wireRadius command can be used to suppress divergence of magnetic fields near the conductor. This does not affect the appearance of the wire on the configuration window; it is always drawn as a filament.