|
Menu location |
---|
Part → 2D Offset |
Workbenches |
Part |
Default shortcut |
None |
Introduced in version |
0.17 |
See also |
Part Offset 3D, Part Thickness, Draft Offset |
The Part Offset2D command 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.
f = App.ActiveDocument.addObject("Part::Offset2D", "Offset2D")
f.Source = #some object
f.Value = 10.0
2D offset is also available as a method of Part.Shape. Example:
import Part
circle = Part.Circle().toShape()
enlarged_circle = circle.makeOffset2D(10.0)
Part.show(circle)
Part.show(enlarged_circle)
# makeOffset2D(offset, join = 0, fill = False, openResult = false, intersection = false)
#
# * offset: distance to expand the shape by.
#
# * join: method of offsetting non-tangent joints. 0 = arcs, 1 = tangent, 2 =
# intersection
#
# * fill: if true, the output is a face filling the space covered by offset. If
# false, the output is a wire/face.
#
# * openResult: True for "Skin" mode; False for Pipe mode.
#
# * intersection: collective offset
#
# Returns: result of offsetting (wire or face or compound of those). Compounding
# structure follows that of source shape.