|Modification → Mirror|
|Introduced in version|
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
- Optionally select one or more objects.
- There are several ways to invoke the command:
- If you have not yet selected an object: select an object in the 3D view.
- The Mirror task panel opens. See Options for more information.
- Pick the first point of the mirror plane in the 3D view, or type coordinates and press the button.
- Pick the second point of the mirror plane in the 3D view, or type coordinates and press the button.
- The mirror plane is defined by the selected points and the normal of the Draft working plane.
The single character keyboard shortcuts mentioned here can be changed. See Draft Preferences.
- To manually enter coordinates enter the X, Y and Z component, and press 3D view before entering coordinates. after each. Or you can press the button when you have the desired values. It is advisable to move the pointer out of the
- Press 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 working plane coordinate system. introduced in version 0.20 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
- The Continue checkbox, displayed in FreeCAD version 0.19 and earlier, has no purpose for this command.
- The Modify subelements checkbox, displayed in FreeCAD version 0.19 and earlier, has no purpose for this command.
- Press Draft snapping on or off. to switch
- Press or the button to abort the command.
- Mirrored copies of Draft Lines, Draft Wires, Draft Arcs and Draft Circles can be turned into independent editable Draft objects by using Draft Downgrade and then Draft Upgrade.
- The Part SimpleCopy command can be used to create a copy of a mirrored object that is not linked to its source object.
- To change the number of decimals used for the input of coordinates: Edit → Preferences... → General → Units → Units settings → Number of decimals.
See also: Property editor.
- DataSource (
Link): specifies the object that is mirrored.
- DataBase (
Vector): specifies the base point of the mirror plane.
- DataNormal (
Vector): specifies the normal direction of the mirror plane.
To mirror objects use the
mirror method of the Draft module.
mirrored_list = mirror(objlist, p1, p2)
objlistcontains the objects to be mirrored. It is either a single object or a list of objects.
p1is the first point of the mirror plane.
p2is 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_listis returned with the new
Part::Mirroringobjects. It is either a single object or a list of objects, depending on
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()