Draft Offset/ru: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(22 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Docnav |
|||
{{Docnav/ru |
|||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Mirror/ru|Зеркально отразить]] |
|||
|[[Draft_Trimex|Trim/Extend (Trimex)]] |
|||
|[[Draft_Trimex/ru|Укоротить / Растянуть]] |
|||
|[[Draft_Module|Draft]] |
|||
|[[Draft_Workbench/ru|Верстак Draft]] |
|||
|IconL=Draft_Rotate.svg |
|||
| |
|IconL=Draft_Mirror.svg |
||
|IconR=Draft_Trimex.svg |
|IconR=Draft_Trimex.svg |
||
|IconC=Workbench_Draft.svg |
|||
}} |
}} |
||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/ru |
{{GuiCommand/ru |
||
|Name= |
|Name/ru=Смещение |
||
|Name |
|Name=Draft_Offset |
||
|MenuLocation=Modification → Смещение |
|||
|Workbenches=[[Draft Module/ru|Draft]], [[Arch Module/ru|Arch]] |
|||
|Workbenches=[[Draft_Workbench/ru|Draft]], [[Arch_Workbench/ru|Arch]] |
|||
|MenuLocation=Черчение → Смещение |
|||
|Shortcut=O S |
|Shortcut={{KEY|O}} {{KEY|S}} |
||
|SeeAlso=[[Part_Offset2D/ru| |
|SeeAlso=[[Part_Offset2D/ru|2D смещение...]] |
||
}} |
}} |
||
</div> |
|||
= |
<span id="Description"></span> |
||
==Описание== |
|||
The Offset |
The [[Image:Draft_Offset.svg|24px]] '''Draft Offset''' command offsets each segment of a selected object over a given distance, or creates an offset copy of the selected object. |
||
Typically this tool is used in copy mode to create offset copies of a base wire while leaving this wire in the same place. The offset copies are scaled versions of the original object. To create other scaled copies use [[Draft Scale|Draft Scale]]. To produce exact copies shifted a distance use [[Draft Move|Draft Move]]. |
|||
[[Image:Draft_Offset_example.jpg|400px]] |
[[Image:Draft_Offset_example.jpg|400px]] |
||
{{Caption|Offsetting a |
{{Caption|Offsetting a Draft Wire}} |
||
= |
<span id="Usage"></span> |
||
==Применение== |
|||
See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]]. |
|||
# Select the object that you wish to offset. |
|||
# Press the {{Button|[[Image:Draft Offset.png|16px]] [[Draft Offset|Draft Offset]]}} button, or press {{KEY|O}} then {{KEY|S}} keys. If no object is selected, you will be invited to select one. |
|||
# Click a point on the 3D view, or type in a distance. |
|||
# Optionally select one object. The object must lie on the current [[Draft_SelectPlane|Draft working plane]]. |
|||
The distance used to create the offset is perpendicular to one of the edges of the original shape, depending on the position of the pointer. If the pointer is moved closer to another edge, this edge now becomes the reference for the distance. Hold the {{KEY|Shift}} key to keep the current reference edge despite moving the pointer closer to other edges. |
|||
# There are several ways to invoke the command: |
|||
#* Press the {{Button|[[Image:Draft_Offset.svg|16px]] [[Draft_Offset|Offset]]}} button. |
|||
#* Select the {{MenuCommand|Modification → [[Image:Draft_Offset.svg|16px]] Offset}} option from the menu. |
|||
#* Use the keyboard shortcut: {{KEY|O}} then {{KEY|S}}. |
|||
# If you have not yet selected an object: select an object in the [[3D_view|3D view]]. |
|||
# The {{MenuCommand|Offset}} task panel opens. See [[#Options|Options]] for more information. |
|||
# To define the offset distance do one of the following: |
|||
#* Pick a point in the [[3D_view|3D view]]. |
|||
#* Enter a numerical value: |
|||
#*# Make sure the pointer is on the correct side of the object in the [[3D_view|3D view]]. |
|||
#*# Do not move the pointer out of the [[3D_view|3D view]]. |
|||
#*# Enter a {{MenuCommand|Distance}}. |
|||
#*# Press {{KEY|Enter}} to finish the command. |
|||
==Options== |
==Options== |
||
The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts (for version 0.22). |
|||
* Press {{KEY|P}} or click the checkbox to toggle ''copy'' mode. If copy mode is on, the Offset tool will keep the original shape in its place but will make a scaled copy at the chosen point. |
|||
* Hold {{KEY|Alt}} while picking the point to also toggle copy mode. Keeping {{KEY|Alt}} pressed will allow you to continue placing offset copies; release {{KEY|Alt}} to finish the operation and see all offset shapes. |
|||
* Click the "OCC-style" checkbox to toggle ''OCC'' mode. This will create an offset from both sides of an line segment, which will produce a specially closed shape with rounded edges at the ends of the segments. |
|||
:{{Emphasis|Note:}} with this style the original segments will be removed, so use copy mode to preserve the original edges. |
|||
* Hold {{KEY|Ctrl}} while offsetting to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance. |
|||
* Hold {{KEY|Shift}} to keep the offset distance referred to the current segment, and avoid picking another reference. |
|||
* Press {{KEY|Esc}} or the {{button|Close}} button to abort the current command; offset copies already placed will remain. |
|||
* If the {{MenuCommand|OCC-style offset}} checkbox is checked a special offset style is used: open [[Draft_Wire|Draft Wires]] are offset on both sides, and new edges are connected with rounded corners. This only works for planar objects with at least two edges. Note that with this style a new non-parametric object is created, and if copy mode is off the original object is deleted. |
|||
==Scripting== |
|||
* Press {{KEY|C}} or click the {{MenuCommand|Copy}} checkbox to toggle copy mode. If copy mode is on, the command will create an offset copy instead of offsetting the original object. |
|||
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
* Holding down {{KEY|Alt}} before picking points in the [[3D_view|3D view]] will also toggle copy mode. While {{KEY|Alt}} is held down multiple offset points can be picked. Release {{KEY|Alt}} to finish the command and see the created copies. |
|||
* Hold down {{KEY|Shift}} to keep the offset distance linked to the current segment. |
|||
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off. |
|||
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command. |
|||
<span id="Notes"></span> |
|||
The Offset tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
|||
==Примечания== |
|||
* To create an offset version of a [[Draft_BSpline|Draft BSpline]] its points are offset individually, and from the new points a new spline is calculated. This new spline is not parallel to the original spline. For an exact parallel offset of a [[Draft_BSpline|Draft BSpline]] the [[Part_Offset2D|Part Offset2D]] command should be used. |
|||
* The Draft Offset command cannot handle [[Draft_BezCurve|Draft BezCurves]]. Use the [[Part_Offset2D|Part Offset2D]] command instead. |
|||
<span id="Scripting"></span> |
|||
==Программирование== |
|||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
To offset objects use the {{incode|offset}} method of the Draft module. The method can only handle [[Draft_Wire|Draft Wires]], [[Draft_Circle|Draft Circles]], [[Draft_Rectangle|Draft Rectangles]], [[Draft_Polygon|Draft Polygons]] and [[Draft_BSpline|Draft BSplines]]. |
|||
{{Code|code= |
{{Code|code= |
||
offset_obj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False) |
|||
}} |
}} |
||
* |
* {{incode|obj}} is the object to be offset. |
||
* {{incode|delta}} contains the offset information: |
|||
* If {{incode|copy}} is {{incode|True}} another object is created instead of offsetting the original object. |
|||
** For [[Draft_Wire|Draft Wires]], [[Draft_Rectangle|Draft Rectangles]] and [[Draft_Polygon|Draft Polygons]] it is an offset vector that must be perpendicular to the first segment of the object. |
|||
* If {{incode|bind}} is {{incode|True}}, and provided the wire object is open, the original and the offset wire will be tied at their endpoints, forming a face. |
|||
** For [[Draft_Circle|Draft Circles]] it is the new radius. |
|||
** If {{incode|sym}} is {{incode|True}}, {{incode|bind}} must be {{incode|True}} as well, and the offset is made on both sides of the wire, the total width being the length of the given vector. |
|||
** For [[Draft_BSpline|Draft BSplines]] it is a list of new points. |
|||
* If {{incode|occ}} is {{incode|True}}, it will use OCC-style offsetting: it will offset from both sides, then tie the new wires together, and round the corners. |
|||
* {{incode| |
* If {{incode|copy}} is {{incode|True}} the original object is kept and a new object is created. |
||
* If {{incode|bind}} is {{incode|True}} a face is created by connecting the shape of the original object and the shape of its offset. This only works for open [[Draft_Wire|Draft Wires]]. |
|||
* If {{incode|sym}} is {{incode|True}}, and {{incode|bind}} is {{incode|True}} as well, the offset is made on both sides of the original object, the total width being the length of the given vector. This only works for open [[Draft_Wire|Draft Wires]]. |
|||
* If {{incode|occ}} is {{incode|True}} OCC-style offsetting is used. See [[#Options|Options]]. If {{incode|occ}} is {{incode|True}} the {{incode|bind}} and {{incode|sym}} arguments are ignored. |
|||
* {{incode|offset_obj}} is returned with the original offset object, or with the new object. If {{incode|bind}} is {{incode|True}} or {{incode|occ}} is {{incode|True}}, the new object is a {{incode|[[Part_Feature|Part::Feature]]}} object. |
|||
Пример: |
|||
Example: |
|||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
doc = App.newDocument() |
|||
p1 = FreeCAD.Vector(0, 0, 0) |
|||
p2 = FreeCAD.Vector(1500, 2000, 0) |
|||
p3 = FreeCAD.Vector(4000, 0, 0) |
|||
p1 = App.Vector(0, 0, 0) |
|||
p2 = App.Vector(1500, 2000, 0) |
|||
p3 = App.Vector(4000, 0, 0) |
|||
wire = Draft.make_wire([p1, p2, p3]) |
|||
doc.recompute() |
|||
Offset_1 = Draft.offset(Wire, vector, copy=True) |
|||
Offset_2 = Draft.offset(Wire, 3*vector, copy=True) |
|||
vector = App.Vector(-200, 150, 0) |
|||
Offset_3 = Draft.offset(Wire, 6*vector, copy=True) |
|||
offset1 = Draft.offset(wire, vector, copy=True, bind=True, sym=True) |
|||
offset2 = Draft.offset(wire, 3*vector, copy=True) |
|||
offset3 = Draft.offset(wire, 6*vector, copy=True) |
|||
offset4 = Draft.offset(wire, 9*vector, copy=True) |
|||
offset5 = Draft.offset(wire, 1.5*vector, copy=True, occ=True) |
|||
doc.recompute() |
|||
}} |
}} |
||
{{Docnav |
|||
{{Docnav/ru |
|||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Mirror/ru|Зеркально отразить]] |
|||
|[[Draft_Trimex|Trim/Extend (Trimex)]] |
|||
|[[Draft_Trimex/ru|Укоротить / Растянуть]] |
|||
|[[Draft_Module|Draft]] |
|||
|[[Draft_Workbench/ru|Верстак Draft]] |
|||
|IconL=Draft_Rotate.svg |
|||
| |
|IconL=Draft_Mirror.svg |
||
|IconR=Draft_Trimex.svg |
|IconR=Draft_Trimex.svg |
||
|IconC=Workbench_Draft.svg |
|||
}} |
}} |
||
{{Draft Tools navi}} |
{{Draft Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
|||
{{Userdocnavi}} |
|||
{{clear}} |
Latest revision as of 04:59, 9 January 2024
Смещение |
Системное название |
---|
Draft_Offset |
Расположение в меню |
Modification → Смещение |
Верстаки |
Draft, Arch |
Быстрые клавиши |
O S |
Представлено в версии |
- |
См. также |
2D смещение... |
Описание
The Draft Offset command offsets each segment of a selected object over a given distance, or creates an offset copy of the selected object.
Offsetting a Draft Wire
Применение
See also: Draft Snap and Draft Constrain.
- Optionally select one object. The object must lie on the current Draft working plane.
- There are several ways to invoke the command:
- Press the Offset button.
- Select the Modification → Offset option from the menu.
- Use the keyboard shortcut: O then S.
- If you have not yet selected an object: select an object in the 3D view.
- The Offset task panel opens. See Options for more information.
- To define the offset distance do one of the following:
Options
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 0.22).
- If the OCC-style offset checkbox is checked a special offset style is used: open Draft Wires are offset on both sides, and new edges are connected with rounded corners. This only works for planar objects with at least two edges. Note that with this style a new non-parametric object is created, and if copy mode is off the original object is deleted.
- Press C or click the Copy checkbox to toggle copy mode. If copy mode is on, the command will create an offset copy instead of offsetting the original object.
- Holding down Alt before picking points in the 3D view will also toggle copy mode. While Alt is held down multiple offset points can be picked. Release Alt to finish the command and see the created copies.
- Hold down Shift to keep the offset distance linked to the current segment.
- Press S to switch Draft snapping on or off.
- Press Esc or the Close button to abort the command.
Примечания
- To create an offset version of a Draft BSpline its points are offset individually, and from the new points a new spline is calculated. This new spline is not parallel to the original spline. For an exact parallel offset of a Draft BSpline the Part Offset2D command should be used.
- The Draft Offset command cannot handle Draft BezCurves. Use the Part Offset2D command instead.
Программирование
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To offset objects use the offset
method of the Draft module. The method can only handle Draft Wires, Draft Circles, Draft Rectangles, Draft Polygons and Draft BSplines.
offset_obj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False)
obj
is the object to be offset.delta
contains the offset information:- For Draft Wires, Draft Rectangles and Draft Polygons it is an offset vector that must be perpendicular to the first segment of the object.
- For Draft Circles it is the new radius.
- For Draft BSplines it is a list of new points.
- If
copy
isTrue
the original object is kept and a new object is created. - If
bind
isTrue
a face is created by connecting the shape of the original object and the shape of its offset. This only works for open Draft Wires. - If
sym
isTrue
, andbind
isTrue
as well, the offset is made on both sides of the original object, the total width being the length of the given vector. This only works for open Draft Wires. - If
occ
isTrue
OCC-style offsetting is used. See Options. Ifocc
isTrue
thebind
andsym
arguments are ignored. offset_obj
is returned with the original offset object, or with the new object. Ifbind
isTrue
orocc
isTrue
, the new object is aPart::Feature
object.
Пример:
import FreeCAD as App
import Draft
doc = App.newDocument()
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1500, 2000, 0)
p3 = App.Vector(4000, 0, 0)
wire = Draft.make_wire([p1, p2, p3])
doc.recompute()
vector = App.Vector(-200, 150, 0)
offset1 = Draft.offset(wire, vector, copy=True, bind=True, sym=True)
offset2 = Draft.offset(wire, 3*vector, copy=True)
offset3 = Draft.offset(wire, 6*vector, copy=True)
offset4 = Draft.offset(wire, 9*vector, copy=True)
offset5 = Draft.offset(wire, 1.5*vector, copy=True, occ=True)
doc.recompute()
Draft
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
Документация пользователя
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework