1 .. |offset.icon| image:: images/offset.png
6 Offset operation offsets sketch entities on a given distance.
7 Offset is performed outside a closed contour or to the right
8 of an open one, unless the **Reversed** flag is not set.
10 Edges junctions are filled in accordance with selected offset mode.
11 The following modes are implemented:
12 - **Keep distance** mode, enabled by default. It keeps the distance from initial
13 contour to the resulting one, creating additional arcs where it is needed.
14 - **Arcs mode**, where on connection of straight segments, tangent arcs are created.
15 Only connection of straight lines is supported; with other types of curves,
16 offset will work as in **Keep distance** mode. Radius of arcs equals to the offset value.
17 These arcs cut off the initially connected lines, so, if in result at least one
18 such line becomes invalid (removed from the result), the arc is not created
19 in this connection, the line is created in this point as in the **Lines** mode.
20 - **Lines** mode, where no arcs is created on the connection of the resulting lines.
21 Adjacent lines are prolonged to the point of their intersection. If the offset
22 arguments are not straigh lines (arcs, bspline, etc), the offset will work
23 as in the **Keep distance** mode in these locations.
25 To create an Offset in the active Sketch:
27 #. select in the Main Menu *Sketch - > Offset* item or
28 #. click |offset.icon| **Offset** button in Sketch toolbar:
32 .. image:: images/Offset_panel.png
40 - Offset mode can be **Keep distance**, **Arcs** or **Lines**
41 - **Approx by segments and arcs** converts the input geometry of the offset algorithm to segments and arcs.
42 - **Edges** is the list of segments (lines, circles, arcs) selected in the view.
43 - **Offset value** is the offset distance.
44 - **Reversed** sets the reversed offset side (inside a closed contour or to the left of an open one).
48 - **Select wire** button adds edges connected by coincident boundary constraint
49 and composing a wire with the already selected segments.
50 Not more than 2 edges can be connected with one coincident point.
54 .. py:function:: Sketch_1.addOffset(Objects, Distance, isReversed, Mode)
56 :param list: A list of objects.
57 :param real: An offset distance.
58 :param boolean: Reversed flag.
59 :param string: Offset mode. Can be "KeepDistance", "Arcs" or "Lines".
60 :return: Result object.
65 Created Offset appears in the view.
67 | The original and the offset objects are marked with a special sign.
68 | Offset object is drawn with a thinner line.
70 .. image:: images/Offset_res.png
76 **See Also** a sample TUI Script of :ref:`tui_create_offset` operation.