Part Offset2D

Description
Part 2D Offset constructs a wire, parallel to the original wire, at a certain distance from it. Or enlarges/shrinks a planar face, similarly.

The wire/face must be planar. There can be multiple wires in one object, not necessarily coplanar.



Usage

 * 1) Select an object to offset
 * 2) Press the  Offset2D button.
 * 3) Set up the offset in Task Panel.
 * 4) Press.

A 2D Offset parametric object is created. Original objects are switched to wireframe display mode.

Properties

 * : Link to original shape


 * The distance to enlarge the wire/face by. If negative, the wire/face is shrunk instead.


 * ("Pipe" or "Skin"): sets how non-closed wires are processed. If "Pipe", the wire is outlined as if it was an extremely thin closed contour. If "Skin", an open wire is created.


 * [[image:Part Offset2D Mode.png|600px]]


 * ("Arc", "Tangent", "Intersection"): sets the behavior around kinks. If "Arc", offset segments are connected with an arc of circle, centered at the vertex. "Tangent" is unsupported on OCC7.0.0. "Intersection": offset segments are extended till they intersect.


 * [[image:Part Offset2D Join.png|600px]]


 * ("false", "true"): sets if multiple wires are treated collectively or independently. If "false", wires are offset independently, intersections between resulting wires are ignored. If "true", the wires are offset in collective manner.


 * [[image:Part Offset2D Intersection.png|600px]]


 * Only wires within a compound are coupled. For example, if the structure is like compound(wire1, wire2, compound(wire3, wire4)), wire1 and wire2 will be treated collectively, but independently from wire3 and wire4. Likewise, wire3 and wire4 are treated collectively, but independently of wire1+wire2.


 * Also, in collective mode, directions of wires are important, and influence direction of offset. This is in tight relationship with how holes in faces are treated.


 * Wires being treated collectively must be coplanar. Wires being offset independently don't have to be coplanar.


 * ("false", "true"): if "true", the space between original wire/face and the offset is filled with a face.


 * [[image:Part Offset2D Fill.png|600px]]

Known issues

 * Most of non-default modes will only work with OCC 7.0.0 or later.


 * Using the tool can crash FreeCAD (see next point). On Windows, these crashes are converted to exceptions and don't generally cause FreeCAD to close; on other OS'es it is not the case, so it is advisable to save project before attempting to use the tool. Ellipses are not handled either.


 * Enlarging faces with circular holes by an amount large enough to cause holes to close up, a crash occurs (OCC 7.0.0). The problem seems to be specific to circles; other shapes seem to close out properly.


 * when offsetting circles that have non-zero Placement, the result is placed wrongly. (OCC 7.0.0)


 * when offsetting circles, sometimes they are offset in unexpected direction (e.g. inward instead of outward). (OCC 7.0.0)


 * Fill="true" doesn't work when collectively offsetting open wires in "Skin" mode


 * "Tangent" join mode doesn't work (OCC 7.0.0)


 * Offsetting wires made of single line segment is not supported (because line segment doesn't define a plane). Single line segments cannot participate in collective offset either.

Scripting
The tool can by used in macros and from the python console by using the following function:

2D offset is also available as a method of Part.Shape. Example: