Draft Mirror/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav/ru
|[[Draft_Drawing|Drawing]]
|[[Draft_Scale/ru|Масштаб]]
|[[Draft_Stretch|Stretch]]
|[[Draft_Offset/ru|Смещение]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/ru|Верстак "Draft"]]
|IconL=Draft_Drawing.svg
|IconR=Draft_Stretch.svg
|IconL=Draft_Scale.svg
|IconR=Draft_Offset.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name=Draft Mirror
|Name/ru=Отразить
|Name/ru=Draft Mirror
|Name=Draft_Mirror
|MenuLocation=Modification → Отразить
|Workbenches=[[Draft Module/ru|Draft]], [[Arch Module/ru|Arch]]
|Workbenches=[[Draft_Workbench/ru|Draft]], [[Arch_Workbench/ru|Arch]]
|MenuLocation=Черчение → Отразить
|Shortcut={{KEY|M}} {{KEY|I}}
|SeeAlso=[[Draft Scale/ru|Draft Scale]]
|SeeAlso=[[Draft_Clone/ru|Клонировать]]
}}
}}
</div>


==Description==
<span id="Description"></span>
==Описание==


The {{Button|[[Image:Draft Mirror.svg|16px]] [[Draft_Mirror|Draft Mirror]]}} tool produces a mirrored copy of a selected object, using the [[Part_Mirror|Part Mirror]] operation. The copy, just like a [[Draft_Clone|Draft Clone]], is linked to the original object. This means that if the original object changes its shape and properties, the mirrored shape changes as well.
The [[Image:Draft_Mirror.svg|24px]] '''Draft Mirror''' command creates mirrored copies, [[Part_Mirror|Part Mirror]] objects, from selected objects. A [[Part_Mirror|Part Mirror]] object is parametric, it will update if its source object changes.


The Mirror tool can be used on 2D shapes created with the [[Draft Workbench|Draft Workbench]], but can also be used on many types of 3D objects such as those created with the [[Part Workbench|Part]], [[PartDesign Workbench|PartDesign]], or [[Arch Workbench|Arch Workbench]]es.
The command can be used on 2D objects created with the [[Draft_Workbench|Draft Workbench]] or [[Sketcher_Workbench|Sketcher Workbench]], but also on many 3D objects such as those created with the [[Part_Workbench|Part Workbench]], [[PartDesign_Workbench|PartDesign Workbench]] or [[Arch_Workbench|Arch Workbench]].

To create copies or clones, and manually place them use [[Draft Move|Draft Move]], [[Draft Rotate|Draft Rotate]], and [[Draft Clone|Draft Clone]].


[[Image:Draft_Mirror_example.jpg|400px]]
[[Image:Draft_Mirror_example.jpg|400px]]
{{Caption|Mirrored object created using a mirroring line}}
{{Caption|Mirroring an object}}


==Usage==
<span id="Usage"></span>
==Применение==


See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Select an object that you wish to mirror.
# Press the {{Button|[[Image:Draft Mirror.svg|16px]] [[Draft Mirror|Draft Mirror]]}} button. If no object is selected, you will be invited to select one.
# Click a first point on the 3D view, or type a [[Draft_Coordinates|coordinate]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button.
# Click a second point on the 3D view, or type a [[Draft_Coordinates|coordinate]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button. These points define a line, which together with the camera view, define a mirroring plane that is used to create the mirrored object.


# Optionally select one or more objects.
After creating the mirrored copy, its binding with the original object can be removed using the {{Button|[[Image:Part_SimpleCopy.svg|16px]] [[Part_SimpleCopy|Part Create simple copy]]}} tool.
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Draft_Mirror.svg|16px]] [[Draft_Mirror|Mirror]]}} button.
#* Select the {{MenuCommand|Modification → [[Image:Draft_Mirror.svg|16px]] Mirror}} option from the menu.
#* Use the keyboard shortcut: {{KEY|M}} then {{KEY|I}}.
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# The {{MenuCommand|Mirror}} task panel opens. See [[#Options|Options]] for more information.
# Pick the first point of the mirror plane in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# Pick the second point of the mirror plane in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# The mirror plane is defined by the selected points and the normal of the [[Draft_SelectPlane|Draft working plane]].


<span id="Options"></span>
A mirrored copy of a Draft object can be turned into a [[Draft Wire|Draft Wire]], by using {{Button|[[Image:Draft Downgrade.svg|16px]] [[Draft Downgrade]]}} then {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade|Draft Upgrade]]}}.
==Опции==


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.
==Options==
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after the first point to constrain the second point on the given axis.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component.
* Press {{KEY|R}} or click the checkbox to toggle ''relative'' mode. If relative mode is on, the coordinates of the second point are relative to the first one; if not, they are absolute, taken from the origin (0,0,0).
* Press {{KEY|T}} or click the checkbox to toggle ''continue'' mode. If continue mode is on, the Mirror tool will restart after you give the second point, allowing you to put another object without pressing the tool button again.
* Hold {{KEY|Ctrl}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Hold {{KEY|Shift}} while drawing to [[Draft_Constrain|constrain]] your second point horizontally or vertically in relation to the first one.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the current command.


* To manually enter coordinates enter the X, Y and Z component, and press {{KEY|Enter}} after each. Or you can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button when you have the desired values. It is advisable to move the pointer out of the [[3D_view|3D view]] before entering coordinates.
==Properties==
* Press {{KEY|R}} or click the {{MenuCommand|Relative}} checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first point, else they are relative to the coordinate system origin.
* {{PropertyData|Source}}: specifies the object to mirror,
* Press {{KEY|G}} or click the {{MenuCommand|Global}} checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the [[Draft_SelectPlane|working plane]] coordinate system. {{Version|0.20}}
* {{PropertyData|Base}}: specifies the base point of the mirror plane.
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off.
* {{PropertyData|Normal}}: specifies the normal direction of the mirror plane.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command.


<span id="Notes"></span>
==Scripting==
==Примечания==
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].

* Mirrored copies of [[Draft_Line|Draft Lines]], [[Draft_Wire|Draft Wires]], [[Draft_Arc|Draft Arcs]] and [[Draft_Circle|Draft Circles]] can be turned into independent editable Draft objects by using [[Draft_Downgrade|Draft Downgrade]] and then [[Draft_Upgrade|Draft Upgrade]].
* The [[Part_SimpleCopy|Part SimpleCopy]] command can be used to create a copy of a mirrored object that is not linked to its source object.

<span id="Properties"></span>
==Свойства==

See also: [[property_editor|Property editor]].

A [[Part_Mirror|Part Mirror]] object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:

<span id="Data"></span>
===Данные===

{{TitleProperty|Основные}}

* {{PropertyData|Source|Link}}: specifies the object that is mirrored.

{{TitleProperty|Plane}}

* {{PropertyData|Base|Vector}}: specifies the base point of the mirror plane.
* {{PropertyData|Normal|Vector}}: specifies the normal direction of the mirror plane.

<span id="Scripting"></span>
==Программирование==

See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].

To mirror objects use the {{incode|mirror}} method of the Draft module.


The Mirror tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
mirrored_list = mirror(objlist, p1, p2)
mirrored_list = mirror(objlist, p1, p2)
}}
}}


* Creates [[Part Mirror|Part Mirror]] objects from {{incode|objlist}}, which can be a single object or a list of objects.
* {{incode|objlist}} contains the objects to be mirrored. It is either a single object or a list of objects.
* The mirroring plane is defined by the line built with points {{incode|p1}} and {{incode|p2}}, and parallel to the current view.
* {{incode|p1}} is the first point of the mirror plane.
* {{incode|mirrored_list}} is returned with the new objects.
* {{incode|p2}} is the second point of the mirror plane.
* If the [[Draft_SelectPlane|Draft working plane]] is available the alignment of the mirror plane is determined by its normal, else the view direction of the camera in the active [[3D_view|3D view]] is used. If the graphical interface is not available the Z axis is used.
** {{incode|mirrored_list}} is either a single object or a list of objects, depending on the input {{incode|objlist}}.
* {{incode|mirrored_list}} is returned with the new {{incode|Part::Mirroring}} objects. It is either a single object or a list of objects, depending on {{incode|objlist}}.


Пример:
Example:


{{Code|code=
{{Code|code=
import FeeCAD, Draft
import FreeCAD as App
import Draft


doc = App.newDocument()
place = FreeCAD.Placement(FreeCAD.Vector(1000, 0, 0), FreeCAD.Rotation())
Polygon1 = Draft.makePolygon(3, 750)
Polygon2 = Draft.makePolygon(5, 750, placement=place)


p1 = FreeCAD.Vector(2000, -1000, 0)
place = App.Placement(FreeCAD.Vector(1000, 0, 0), App.Rotation())
polygon1 = Draft.make_polygon(3, 750)
p2 = FreeCAD.Vector(2000, 1000, 0)
polygon2 = Draft.make_polygon(5, 750, placement=place)


Line1 = Draft.makeLine(p1, p2)
p1 = App.Vector(2000, -1000, 0)
mirrored1 = Draft.mirror(Polygon1, p1, p2)
p2 = App.Vector(2000, 1000, 0)


Line2 = Draft.makeLine(-p1, -p2)
line1 = Draft.make_line(p1, p2)
mirrored2 = Draft.mirror([Polygon1, Polygon2], -p1, -p2)
mirrored1 = Draft.mirror(polygon1, p1, p2)

Line2 = Draft.make_line(-p1, -p2)
mirrored2 = Draft.mirror([polygon1, polygon2], -p1, -p2)

doc.recompute()
}}
}}



{{Docnav
{{Docnav/ru
|[[Draft_Drawing|Drawing]]
|[[Draft_Scale/ru|Масштаб]]
|[[Draft_Stretch|Stretch]]
|[[Draft_Offset/ru|Смещение]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/ru|Верстак "Draft"]]
|IconL=Draft_Drawing.svg
|IconR=Draft_Stretch.svg
|IconL=Draft_Scale.svg
|IconR=Draft_Offset.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}
Line 98: Line 134:
{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 04:58, 9 January 2024

Отразить

Системное название
Draft_Mirror
Расположение в меню
Modification → Отразить
Верстаки
Draft, Arch
Быстрые клавиши
M I
Представлено в версии
-
См. также
Клонировать

Описание

The Draft Mirror command creates mirrored copies, Part Mirror objects, from selected objects. A Part Mirror object is parametric, it will update if its source object changes.

The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or Arch Workbench.

Mirroring an object

Применение

See also: Draft Snap and Draft Constrain.

  1. Optionally select one or more objects.
  2. There are several ways to invoke the command:
    • Press the Mirror button.
    • Select the Modification → Mirror option from the menu.
    • Use the keyboard shortcut: M then I.
  3. If you have not yet selected an object: select an object in the 3D view.
  4. The Mirror task panel opens. See Options for more information.
  5. Pick the first point of the mirror plane in the 3D view, or type coordinates and press the Enter point button.
  6. Pick the second point of the mirror plane in the 3D view, or type coordinates and press the Enter point button.
  7. The mirror plane is defined by the selected points and the normal of the Draft working plane.

Опции

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.

  • To manually enter coordinates enter the X, Y and Z component, and press Enter after each. Or you can press the Enter point button when you have the desired values. It is advisable to move the pointer out of the 3D view before entering coordinates.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first point, else they are relative to the coordinate system origin.
  • Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system. introduced in version 0.20
  • Press S to switch Draft snapping on or off.
  • Press Esc or the Close button to abort the command.

Примечания

Свойства

See also: Property editor.

A Part Mirror object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Данные

Основные

  • ДанныеSource (Link): specifies the object that is mirrored.

Plane

  • ДанныеBase (Vector): specifies the base point of the mirror plane.
  • ДанныеNormal (Vector): specifies the normal direction of the mirror plane.

Программирование

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To mirror objects use the mirror method of the Draft module.

mirrored_list = mirror(objlist, p1, p2)
  • objlist contains the objects to be mirrored. It is either a single object or a list of objects.
  • p1 is the first point of the mirror plane.
  • p2 is the second point of the mirror plane.
  • If the Draft working plane is available the alignment of the mirror plane is determined by its normal, else the view direction of the camera in the active 3D view is used. If the graphical interface is not available the Z axis is used.
  • mirrored_list is returned with the new Part::Mirroring objects. It is either a single object or a list of objects, depending on objlist.

Пример:

import FreeCAD as App
import Draft

doc = App.newDocument()

place = App.Placement(FreeCAD.Vector(1000, 0, 0), App.Rotation())
polygon1 = Draft.make_polygon(3, 750)
polygon2 = Draft.make_polygon(5, 750, placement=place)

p1 = App.Vector(2000, -1000, 0)
p2 = App.Vector(2000, 1000, 0)

line1 = Draft.make_line(p1, p2)
mirrored1 = Draft.mirror(polygon1, p1, p2)

Line2 = Draft.make_line(-p1, -p2)
mirrored2 = Draft.mirror([polygon1, polygon2], -p1, -p2)

doc.recompute()