Difference between revisions of "Draft Mirror/tr"

From FreeCAD Documentation
Jump to navigation Jump to search
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 7: Line 7:
  
 
==Description==
 
==Description==
The Mirror tool produces a mirrored copy of a selected object, using the [[Part Mirror]] operation. The copy, just like a [[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 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 Mirror tool can be used on 2D shapes created with the [[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]]es.
+
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.
  
To create copies or clones, and manually place them use [[Draft Move]], [[Draft Rotate]], and [[Draft Clone]].
+
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]]
Line 18: Line 18:
 
==How to use==
 
==How to use==
 
# Select an object that you wish to mirror.
 
# Select an object that you wish to mirror.
# Press the {{Button|[[Image:Draft Mirror.svg|16px]] [[Draft Mirror]]}} button. If no object is selected, you will be invited to select one.
+
# 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 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.
 
# 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.
Line 24: Line 24:
 
After creating the mirrored copy, its binding with the original object can be removed using the {{Button|[[Image:Tree_Part.svg|16px]] [[Part_CreateSimpleCopy|Part Create simple copy]]}} tool.
 
After creating the mirrored copy, its binding with the original object can be removed using the {{Button|[[Image:Tree_Part.svg|16px]] [[Part_CreateSimpleCopy|Part Create simple copy]]}} tool.
  
A mirrored copy of a Draft object can be turned into a [[Draft Wire]], by using {{Button|[[Image:Draft Downgrade.svg|16px]] [[Draft Downgrade]]}} then {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade]]}}.
+
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]]}}.
  
 
==Options==
 
==Options==
Line 41: Line 41:
  
 
==Scripting==
 
==Scripting==
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]].
+
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
  
The Mirror tool can be used in [[macros]] and from the [[Python]] console by using the following function:
+
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]] objects from {{incode|objlist}}, which can be a single object or a list of objects.
+
* Creates [[Part Mirror|Part Mirror]] objects from {{incode|objlist}}, which can be 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.
 
* The mirroring plane is defined by the line built with points {{incode|p1}} and {{incode|p2}}, and parallel to the current view.
 
* {{incode|mirrored_list}} is returned with the new objects.
 
* {{incode|mirrored_list}} is returned with the new objects.

Revision as of 09:25, 20 April 2019

Other languages:
Deutsch • ‎English • ‎Türkçe • ‎español • ‎français • ‎italiano • ‎polski • ‎português do Brasil • ‎română • ‎русский
Arrow-left.svg Previous: Draft Drawing.svg Drawing
Next: Stretch Draft Stretch.svg Arrow-right.svg

Draft Mirror.svg Yansıt

Menü konumu
Draft → Mirror
Tezgahlar
Draft, Arch
Varsayılan kısayol
Hiçbiri
Versiyonda tanıtıldı
-
Ayrıca bkz
Draft Scale

Description

The Mirror tool produces a mirrored copy of a selected object, using the Part Mirror operation. The copy, just like a 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 Mirror tool can be used on 2D shapes created with the Draft Workbench, but can also be used on many types of 3D objects such as those created with the Part, PartDesign, or Arch Workbenches.

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

Draft Mirror example.jpg

Mirrored object created using a mirroring line

How to use

  1. Select an object that you wish to mirror.
  2. Press the Draft Mirror.svg Draft Mirror button. If no object is selected, you will be invited to select one.
  3. Click a first point on the 3D view, or type a coordinate and press the Draft AddPoint.svg add point button.
  4. Click a second point on the 3D view, or type a coordinate and press the Draft AddPoint.svg 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.

After creating the mirrored copy, its binding with the original object can be removed using the Tree Part.svg Part Create simple copy tool.

A mirrored copy of a Draft object can be turned into a Draft Wire, by using Draft Downgrade.svg Draft Downgrade then Draft Upgrade.svg Draft Upgrade.

Options

  • Press X, Y or Z after the first point to constrain the second point on the given axis.
  • To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component.
  • Press 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 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 Ctrl while drawing to force snapping your point to the nearest snap location, independently of the distance.
  • Hold Shift while drawing to constrain your second point horizontally or vertically in relation to the first one.
  • Press Esc or the Close button to abort the current command.

Properties

  • VeriSource: specifies the object to mirror,
  • VeriBase: specifies the base point of the mirror plane.
  • VeriNormal: specifies the normal direction of the mirror plane.

Scripting

See also: Draft API and FreeCAD Scripting Basics.

The Mirror tool can be used in macros and from the Python console by using the following function:

mirrored_list = mirror(objlist, p1, p2)
  • Creates Part Mirror objects from objlist, which can be a single object or a list of objects.
  • The mirroring plane is defined by the line built with points p1 and p2, and parallel to the current view.
  • mirrored_list is returned with the new objects.
    • mirrored_list is either a single object or a list of objects, depending on the input objlist.

Example:

import FeeCAD, Draft

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)
p2 = FreeCAD.Vector(2000, 1000, 0)

Line1 = Draft.makeLine(p1, p2)
mirrored1 = Draft.mirror(Polygon1, p1, p2)

Line2 = Draft.makeLine(-p1, -p2)
mirrored2 = Draft.mirror([Polygon1, Polygon2], -p1, -p2)
Arrow-left.svg Previous: Draft Drawing.svg Drawing
Next: Stretch Draft Stretch.svg Arrow-right.svg