# Template application

When you add templates to the tunnel definition, you must add template positions to specify the station at which the Tunnels software starts to apply each template. For station values between applied templates, the template element values are interpolated.

The templates applied must have the same number of elements.

Interpolation methods

The following interpolation methods are supported.

Norwegian interpolation method

This method maintains the radii of the first and last arcs (referred to as wall arcs), as well as the radii of the second and fourth 'transition' arcs when present, and computes a new radius for the central (or roof) arc. It uses interpolation of the arc angles rather than the radii values.

This method is automatically used if the templates applied at the previous and next stations fulfill the following requirements:

- Each template consists of 3 or 5 arcs in sequence joined tangentially
- There is no 'tilt' to the defined section (template)

If the above requirements are not met the Linear interpolation method is used.

Linear interpolation

For this method, the template element values are interpolated linearly (applied on a pro rata basis), from a template applied at the previous station to the station where the next template is applied.

This method is used if the requirements for the Norwegian method are not met.

Applying templates to the vertical alignment

Templates can be applied vertical or perpendicular to the vertical alignment. See the following diagram where the red linework indicates the template applied perpendicular and the blue linework a template applied vertically.

The station and offset display of points relative to a tunnel using Point manager or Review job are only calculated vertical to the alignment. If the templates were applied perpendicular in Tunnel positioning then the station and offsets will be different.

Example alignment using templates

The following discussion explains how the template assignments, including the <None> template, and the Surfaces to use option can be used to control a tunnel definition. See the plan in the following figure where the tunnel is a consistent width from station 0 to 20, has a gap between stations 20 and 40, widens from station 60 to 80 and then is a constant width to station 140.

See also the two templates in the following figure where template 1 (on the left side in the figure) has two surfaces and template 2 has three surfaces:

To define this design you need to assign the templates with the appropriate surfaces selected as shown in the following table:

Start station | Templates | Surface 1 | Surface 2 | Surface 3
--- | --- | --- | --- | ---
0.000 | Template 1 | On | On | –
20.000 | Template 1 | On | On | –
20.005 | <None> | – | – | –
40.000 | Template 1 | On | On | –
60.000 | Template 2 | On | On | Off
80.000 | Template 2 | On | On | On
120.000 | Template 2 | On | On | Off
140.00 | Template 2 | On | On | Off