Shape syntax

 

The track section shapes are described using a specific syntax in the track palette editor shape edit field:

 

 

The general shape description is either

-          an array of point coordinates in library units separated by any kind of separators except points (.) which is a decimal separator

-          a track section function followed by a set of attributes

 

The track section shape coordinate system is defined from left to right (X axis) and from top to bottom (Y axis). Shape coordinates are always given in library units.

 

 

These shape parameters are detailed below

 

Standard rectangle

 

syntax: track section width, track section length in library units.

 

Example:

15.5;35 with a library units in cm defines a 15.5 x 35 cm rectangle track section

 

 

Standard curve

 

syntax: Curve, inner radius in lib unit, track section width in lib unit, track section angle in degrees

 

Example:

curve, 37.3, 15.5, 22.5 

defines a 22.5° curve track with a lib unit in cm section. Its width is 15.5 cm and its inner radius is 37.3 cm.

 

Squiggle

 

syntax: squiggle, track width, track length, track height, squiggle strength

 

The track length is the left to right length of the track in lib units.

The track height is the distance from a side track bottom to the same track top. This value can be either positive or negative.

 

The squiggle strength controls how tied is the squiggle. Higher is value, more tied it is.

 

Example:

squiggle,15.5,50.0,-10.0,20.0

 

Cross

 

syntax: cross, track width, track length, X offset, Y offset

X offset and Y offset defines the red circled point on the left example.

 

Example:

. cross,15.5,35,3.3,3.3

 

Free shape

 

syntax: array of points in shape coordinate system

A free shape is an array of point in library units

 

Example:

(0, 0)(35.0, 0)(35.0, 15.5)(24.1, 26.4)(4.0, 15.5)(0, 15.5)

This example uses parenthesis to separate points to make the shape definition more readable.

 

Hairpin

 

syntax: hairpin, hairpin width, hairpin length

 

The hairpin length corresponds to the horizontal side length of the hairpin. The circle part of the hairpin has a radius therefore a length equal to half on the hairpin width.

 

Example:

hairpin, 31, 35.0