<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "klayout_doc.dtd">

<doc>

  <title>Creating A Path</title>
  <keyword name="Drawing"/>
  <keyword name="Path"/>

  <p>
  Select "Path" mode from the toolbar. The editor options dialog will open that additionally prompts for 
  basic path parameters, such as width and extension scheme. When a path is being drawn, it will receive
  the settings entered into this dialog. The path properties can be changed, while the path is 
  being drawn. If the option page has been closed unintentionally, it can be reopened with the F3 shortcut.
  </p>

  <p>
  To actually draw a path, 
  choose a layer from the layer panel in which to create a new path. 
  Left click at the first vertex, move the mouse to the second vertex, click to place this one and continue 
  to the last vertex. Double-click at the last vertex or press the Enter key to finish the path. 
  Press the Escape key to cancel the operation.
  Use the Backspace key to remove the current segment and go back to the previous segment.
  </p>

  <p>
  To temporarily constrain the segment direction, press the Shift or Ctrl key or both while dragging
  the segment. Shift will apply Manhattan 
  constraints (vertical and horizontal only), Ctrl will allow diagonal directions in addition and 
  pressing Shift+Ctrl will allow all directions.
  </p>

  <p>
  While you drag a path segment, two edit boxes are shown at the top of the layout view.
  Press the Tab key to enter these edit boxes.
  Use the Tab and Shift+Tab keys to navigate between the boxes.
  You can specify a numerical values for the segment vector here. Pressing the Enter key will apply these
  relative coordinates and enter a new segment. Pressing the Escape key will leave the edit fields.
  </p>

  <p>
  For paths, as for polygons, the segments created are subject to certain direction restrictions as 
  imposed by the connection angle constraints. 
  See <link href="/manual/editor_options.xml"/> 
  for a detailed description of the modes. Use the "editor options" dialog (F3 shortcut) to change the mode,
  also during editing.
  </p>

  <p>
  <keyword name="Via"/>
  <keyword name="Vias"/>
  Paths are often used for wires. KLayout can be configured to provide 
  vias that allow switching from one layer to another and place a via 
  between the layers where the paths overlap. Before you can use the via feature,
  KLayout has to be equipped with via definitions. Vias are basically PCells which
  need to support a specific set of parameters. Via PCells need to expose a number
  of descriptors to define the options supported by a particular PCell (e.g. the
  layers which are connected or the type of via if multiple flavors are available).
  This scheme allows for a lot of flexibility, but needs some coding skills.
  In the macro IDE, a code sample is provided which implements two simple vias
  for a three-layer metal stack. For more details see <class_doc href="PCellDeclaration"/>,
  method "via_types" and <class_doc href="ViaType"/>.
  </p>

</doc>

