Draft Offset: Difference between revisions

From FreeCAD Documentation
m (template fr)
No edit summary
Line 1: Line 1:
{{GuiCommand|Name=Draft Offset|Workbenches=[[Draft Module|Draft]]|MenuLocation=Draft -> Offset|Shortcut=O S}}
{{GuiCommand|Name=Draft Offset|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Offset|Shortcut=O S}}


====Description====
==Description==


This tool offsets the selected object. If no object is selected, you will be invited to select one. You are then simply asked for one point, giving the distance to offsrt from the selected object.
The Offset tool offsets the selected object by a given distance on the current [[Draft Workingplane|work plane]]. If no object is selected, you will be invited to select one.


[[Image:Draft_Offset_example.jpg]]
[[Image:Draft_Offset_example.jpg|400px]]


====Usage====
==How to use==


# Select objects you wish to offset
* Picking a point on an empty area of the 3d view, or on an existing object.
# Press the {{KEY|[[Image:Draft Offset.png|16px]] [[Draft Offset]]}} button, or press {{KEY|O}} then {{KEY|S}} keys
* Pressing {{KEY|CTRL}} will [[Draft_Snap|snap]] your point to availible snap locations.
# Click a point on the 3D view, or type a distance.

==Options==

* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the Offset tool will restart after you finish or close it, allowing you to offset or copy the objects another time without pressing the Offset button again.
* Pressing {{KEY|ALT}} or {{KEY|C}} or clicking the {{KEY|'''Copy'''}} button will make a copy of the objects, instead of moving them. If you keep {{KEY|ALT}} pressed after clicking the second point, you will be able to place more copies, until you release the {{KEY|ALT}} key.
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Pressing {{KEY|SHIFT}} will [[Draft_Constrain|constrain]] you to the current segment, instead of picking the closest one.
* Pressing {{KEY|SHIFT}} will [[Draft_Constrain|constrain]] you to the current segment, instead of picking the closest one.
* Pressing {{KEY|ESC}} will cancel the operation.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.

* {{KEY|C}} switches the copy mode on/off. With Copy on, new objects will be created instead of offsets the existing objects.
==Scripting==
* Pressing {{KEY|ALT}} will make a copy, even if the Copy check button is off.

* If {{KEY|ALT}} is pressed, you will be able to make multiple copies until {{KEY|ALT}} is released.
The Offset tool can by used in [[macros]] and from the python console by using the following function:

'''offset (object,Vector,[copymode],[bind])''': Offsets the given wire by applying the given Vector to its first vertex.
If copymode is True, another object is created, otherwise the same object gets offsetted. If bind is True, and provided
the wire is open, the original and the offsetted wires will be bound by their endpoints, forming a face. If sym is True,
bind must be true too, and the offset is made on both sides, the total width being the length of the given vector. Returns
the offsetted object (or its copy if copymode as True).

Example:


import FreeCAD,Draft
Draft.offset(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,2,0))


{{languages | {{es|Draft Offset/es}} {{fr|Draft Offset/fr}} {{it|Draft Offset/it}} {{se|Draft Offset/se}} }}
{{languages | {{es|Draft Offset/es}} {{fr|Draft Offset/fr}} {{it|Draft Offset/it}} {{se|Draft Offset/se}} }}

Revision as of 21:49, 19 August 2012

Draft Offset

Menu location
Draft -> Offset
Workbenches
Draft, Arch
Default shortcut
O S
Introduced in version
-
See also
None

Description

The Offset tool offsets the selected object by a given distance on the current work plane. If no object is selected, you will be invited to select one.

How to use

  1. Select objects you wish to offset
  2. Press the Draft Offset button, or press O then S keys
  3. Click a point on the 3D view, or type a distance.

Options

  • Press T or click the checkbox to check/uncheck the Continue button. If continue mode is on, the Offset tool will restart after you finish or close it, allowing you to offset or copy the objects another time without pressing the Offset button again.
  • Pressing ALT or C or clicking the Copy button will make a copy of the objects, instead of moving them. If you keep ALT pressed after clicking the second point, you will be able to place more copies, until you release the ALT key.
  • Press CTRL while drawing to force snapping your point to the nearest snap location, independently of the distance.
  • Pressing SHIFT will constrain you to the current segment, instead of picking the closest one.
  • Press ESC or the Cancel button to abort the current command.

Scripting

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

offset (object,Vector,[copymode],[bind]): Offsets the given wire by applying the given Vector to its first vertex. 
If copymode is True, another object is created, otherwise the same object gets offsetted. If bind is True, and provided 
the wire is open, the original and the offsetted wires will be bound by their endpoints, forming a face. If sym is True, 
bind must be true too, and the offset is made on both sides, the total width being the length of the given vector. Returns
the offsetted object (or its copy if copymode as True).

Example:

import FreeCAD,Draft
Draft.offset(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,2,0))
Available translations of this page: Template:Se