|
Posizione nel menu |
---|
Parte → Offset 2D... |
Ambiente |
Part |
Avvio veloce |
Nessuno |
Introdotto nella versione |
0.17 |
Vedere anche |
Part Offset 3D, Part Spessore, Draft Offset |
Lo strumento Part Offset 2D costruisce una polilinea, parallela alla polilinea originale, ad una certa distanza da essa. Oppure ingrandisce/rimpicciolisce una faccia planare, in modo simile.
La polilinea/faccia deve essere planare. In un oggetto ci possono essere più contorni, non necessariamente complanari.
Lo strumento può essere utilizzato nelle macro e dalla console Python utilizzando la seguente funzione:
f = App.ActiveDocument.addObject("Part::Offset2D", "Offset2D")
f.Source = #some object
f.Value = 10.0
Offset 2D è anche disponibile come metodo di Part.Shape. Esempio:
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.