Draft Clone/ru: Difference between revisions

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

{{Docnav
{{Docnav/ru
|[[Draft_PointArray|Point Array]]
|[[Draft_Drawing|Drawing]]
|[[Draft_Stretch/ru|Stretch]]
|[[Draft_OrthoArray/ru|OrthoArray]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/ru|Верстак Draft]]
|IconL=Draft_PointArray.svg
|IconR=Draft_Drawing.svg
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name=Draft Clone
|Name=Draft Clone
|Name/ru=Draft Clone
|Name/ru=Клонировать
|Workbenches=[[Draft Module/ru|Draft]], [[Arch Module/ru|Arch]]
|MenuLocation=Черчение → Клонировать
|MenuLocation=Черчение → Клонировать
|Workbenches=[[Draft_Workbench/ru|Draft]], [[Arch_Workbench/ru|Arch]]
|Shortcut={{KEY|C}} {{KEY|L}}
|SeeAlso=[[Draft Scale/ru|Масштаб]]
|SeeAlso=[[Draft Scale/ru|Масштаб]]
}}
}}
</div>


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


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
== Описание ==
Этот инструмент создает клон (копию, параметрически связанную с исходным объектом) выбранного объекта. Если исходный объект изменяется, клон тоже меняется, но сохраняет свое положение, поворот и масштаб.
Этот инструмент создает клон (копию, параметрически связанную с исходным объектом) выбранного объекта. Если исходный объект изменяется, клон тоже меняется, но сохраняет свое положение, поворот и масштаб.
</div>
</div>


Команду можно применить к 2D-объектам, созданным в [[Draft_Workbench/ru|верстаке Draft]] или [[Sketcher_Workbench/ru|верстаке Sketcher]], а также на многих 3D-объектах, которые созданы в [[Part_Workbench/ru|верстаке Part]], [[PartDesign_Workbench/ru|верстаке PartDesign]] или [[Arch_Workbench/ru|верстаке Arch]]. Клоны 2D-объектов могут быть использованы при [[PartDesign_Body/ru|создании тел]].
The Clone 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.

To create simple copies, that are completely independent from an original object, use [[Draft Move|Draft Move]], [[Draft Rotate|Draft Rotate]], and [[Draft Scale|Draft Scale]]. To position copies in an orthogonal array use [[Draft Array|Draft Array]]; to position copies along a path use [[Draft PathArray|Draft PathArray]]; to position copies at specified points use [[Draft PointArray|Draft PointArray]].


[[Image:Draft_Clone_example.jpg|400px]]
[[Image:Draft_Clone_example.jpg|400px]]
{{Caption|Клонированная копия рядом с исходным объектом}}
<div class="mw-translate-fuzzy">
[[Image:Draft_Clone_example.jpg|400px]]
</div>


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


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
# Выберите один или несколько объектов.
== Использование ==
# Есть несколько способов вызвать команду:
# Выберите объекты, которые вы хотите клонировать
#* Нажатием кнопки {{Button|[[Image:Draft_Clone.svg|16px]][[Draft_Clone/ru|Клонировать]]}}.
# Нажмите кнопку {{KEY | [[Изображение: Черновик Clone.png | 16px]] [[Черновик]]}}
#* Через меню {{MenuCommand|Modification → [[Image:Draft_Clone.svg|16px]] Клонировать}}.
#* Используйте сочетание клавиатуры: {{KEY|C}} затем {{KEY|L}}.
# Если вы еще не выбрали объект: выберите его в окне [[3D_view/ru|3D Вида]].
</div>
</div>


<span id="Properties"></span>
Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[Draft Scale|Draft Scale]]}} tool also creates a clone at a specified scale.
==Свойства==


Смотрите также: [[property_editor/ru|Редактор свойств]].
Clones of 2D objects created with the [[Draft Workbench|Draft]] or [[Sketcher Workbench|Sketcher Workbench]]es will also be 2D objects, and therefore can be used as such for the [[PartDesign Workbench|PartDesign Workbench]].


An object created with the Draft Clone command is derived from a [[Part_Part2DObject|Part Part2DObject]], a [[Part_Feature|Part Feature]] object or, if an Arch Clone is created, from the object type of the source object. It inherits all properties from that object. A clone derived from one of the first two objects also has the following additional properties:
All [[Arch Workbench|Arch Workbench]] objects have the possibility to behave as clones by using their {{PropertyData|CloneOf}} property. If you use the Draft Clone tool on a selected Arch object, you will produce such an Arch clone instead of a regular Draft clone.


<span id="Data"></span>
===Limitations ===
===Данные===
Currently, [[Sketcher Workbench|Sketcher Sketches]] cannot be mapped to the faces of a clone.


{{TitleProperty|Draft}}
<div class="mw-translate-fuzzy">
== Oпции ==
* Клоны 2D-объектов (черновик или эскиз) также будут двумерными объектами и поэтому могут использоваться как таковые для [[PartDesign Workbench | Part Design]].
* Все объекты [[Arch Workbench | Arch]] имеют возможность вести себя как клон (используя их свойство CloneOf). Если вы используете инструмент «Черновик клонирования» для выбранного объекта Arch, вы создадите такой клонированный объект Arch вместо обычного клонирования проекта.
</div>


* {{PropertyData|Fuse|Bool}}: specifies if overlapping shapes in the clone are fused or not.
==Properties==
* {{PropertyData|Objects}}: specifies a list of base objects which are being cloned.
* {{PropertyData|Objects|LinkListGlobal}}: specifies the objects that are cloned.
* {{PropertyData|Scale}}: specifies the scaling factor for the clone, in each X, Y, and Z direction.
* {{PropertyData|Scale|Vector}}: specifies the X, Y and Z scale factors.
* {{PropertyData|Fuse}}: if it is {{TRUE}} and {{PropertyData|Objects}} includes many shapes that intersect each other, the resulting clone will be fuse them together into a single shape, or make a compound of them. {{Version|0.17}}


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


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
The Clone tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:

To create a clone use the {{incode|make_clone}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|clone}} method.


{{Code|code=
{{Code|code=
cloned_object = clone(obj, delta=None, forcedraft=False)
cloned_object = make_clone(obj, delta=None, forcedraft=False)
}}
}}


* Creates a {{incode|cloned_object}} from {{incode|obj}}, which can be a single object or a list of objects.
* {{incode|obj}} contains the objects to be cloned. It is either a single object or a list of objects.
* If given, {{incode|delta}} is a {{incode|FreeCAD.Vector}} that moves the new clone away from the original position of the base object.
* {{incode|delta}} is the displacement vector to be applied to the clone.
* If {{incode|forcedraft}} is {{incode|True}}, the resulting object will be a Draft clone, and not an Arch clone, even if {{incode|obj}} is an [[Arch Workbench|Arch Workbench]] object.
* If {{incode|forcedraft}} is {{incode|False}} and {{incode|obj}} contains a single [[Arch_Workbench|Arch object]] an Arch Clone is created. Set {{incode|forcedraft}} to {{incode|True}} to create a Draft Clone instead.
* {{incode|cloned_object}} is returned with the clone object.


Пример:
The fusion of the objects that are part of the clone can be achieved by setting its {{incode|Fuse}} attribute to {{incode|True}}.

Example:


{{Code|code=
{{Code|code=
import FreeCAD, 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)


place = App.Placement(App.Vector(1000, 0, 0), App.Rotation())
obj = [Polygon1, Polygon2]
polygon1 = Draft.make_polygon(3, 750)
vector = FreeCAD.Vector(2600, 500, 0)
cloned_object = Draft.clone(obj, delta=vector)
polygon2 = Draft.make_polygon(5, 750, placement=place)

vector = App.Vector(2600, 500, 0)
cloned_object = Draft.clone([polygon1, polygon2], delta=vector)


cloned_object.Fuse = True
cloned_object.Fuse = True

FreeCAD.ActiveDocument.recompute()
doc.recompute()
}}
}}



{{Docnav
{{Docnav/ru
|[[Draft_PointArray|Point Array]]
|[[Draft_Drawing|Drawing]]
|[[Draft_Stretch/ru|Stretch]]
|[[Draft_OrthoArray/ru|OrthoArray]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/ru|Верстак Draft]]
|IconL=Draft_PointArray.svg
|IconR=Draft_Drawing.svg
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}
Line 106: Line 107:
{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 19:47, 7 December 2023

Клонировать

Системное название
Draft Clone
Расположение в меню
Черчение → Клонировать
Верстаки
Draft, Arch
Быстрые клавиши
C L
Представлено в версии
-
См. также
Масштаб

Описание

Этот инструмент создает клон (копию, параметрически связанную с исходным объектом) выбранного объекта. Если исходный объект изменяется, клон тоже меняется, но сохраняет свое положение, поворот и масштаб.

Команду можно применить к 2D-объектам, созданным в верстаке Draft или верстаке Sketcher, а также на многих 3D-объектах, которые созданы в верстаке Part, верстаке PartDesign или верстаке Arch. Клоны 2D-объектов могут быть использованы при создании тел.

Клонированная копия рядом с исходным объектом

Применение

  1. Выберите один или несколько объектов.
  2. Есть несколько способов вызвать команду:
    • Нажатием кнопки Клонировать.
    • Через меню Modification → Клонировать.
    • Используйте сочетание клавиатуры: C затем L.
  3. Если вы еще не выбрали объект: выберите его в окне 3D Вида.

Свойства

Смотрите также: Редактор свойств.

An object created with the Draft Clone command is derived from a Part Part2DObject, a Part Feature object or, if an Arch Clone is created, from the object type of the source object. It inherits all properties from that object. A clone derived from one of the first two objects also has the following additional properties:

Данные

Draft

  • ДанныеFuse (Bool): specifies if overlapping shapes in the clone are fused or not.
  • ДанныеObjects (LinkListGlobal): specifies the objects that are cloned.
  • ДанныеScale (Vector): specifies the X, Y and Z scale factors.

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

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a clone use the make_clone method (introduced in version 0.19) of the Draft module. This method replaces the deprecated clone method.

cloned_object = make_clone(obj, delta=None, forcedraft=False)
  • obj contains the objects to be cloned. It is either a single object or a list of objects.
  • delta is the displacement vector to be applied to the clone.
  • If forcedraft is False and obj contains a single Arch object an Arch Clone is created. Set forcedraft to True to create a Draft Clone instead.
  • cloned_object is returned with the clone object.

Пример:

import FreeCAD as App
import Draft

doc = App.newDocument()

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

vector = App.Vector(2600, 500, 0)
cloned_object = Draft.clone([polygon1, polygon2], delta=vector)

cloned_object.Fuse = True

doc.recompute()