Difference between revisions of "Draft FlipDimension/en"

From FreeCAD Documentation
Jump to navigation Jump to search
(Updating to match new version of source page)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{GuiCommand/en|Name=Draft FlipDimension|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Utilities -> Flip Dimension|SeeAlso=[[Draft Dimension|Dimension]]}}
+
<languages/>
 +
 
 +
{{Docnav
 +
|[[Draft_Slope|Slope]]
 +
|[[Draft_Shape2DView|Shape2DView]]
 +
|[[Draft_Workbench|Draft]]
 +
|IconL=Draft_Slope.svg
 +
|IconR=Draft_Shape2DView.svg
 +
|IconC=Workbench_Draft.svg
 +
}}
 +
 
 +
{{GuiCommand
 +
|Name=Draft FlipDimension
 +
|MenuLocation=Modification → Flip dimension
 +
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
 +
}}
 +
 
 +
==Description==
 +
 
 +
The [[Image:Draft_FlipDimension.svg|24px]] '''Draft FlipDimension''' command rotates the dimension text of selected [[Draft_Dimension|Draft Dimensions]] 180° around the dimension line. It can be used to correct dimensions whose text appears mirrored. The command does not work properly for angular dimensions.
 +
 
 +
==Usage==  
 +
 
 +
# Select one or more [[Draft_Dimension|Draft Dimensions]].
 +
# There are several ways to invoke the command:
 +
#* Press the {{Button|[[Image:Draft_FlipDimension.svg|16px]] [[Draft_FlipDimension|Draft FlipDimension]]}} button.
 +
#* Select the {{MenuCommand|Modification → [[Image:Draft_FlipDimension.svg|16px]] Flip dimension}} option from the menu.
 +
 
 +
==Notes==
 +
 
 +
* [[Draft_Dimension|Draft Dimensions]] also have a {{PropertyData|Flip Text}} property. When set to {{TRUE}} the text is rotated 180° around the normal direction. This can be combined with the effect of this command.
 +
 
 +
==Scripting==
  
==Description==
+
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
When in 2D mode, the text of the [[Draft Dimension|Draft dimensions]] is displayed aligned to the dimension line. The Dimension tool always tries to show you the dimension text on the correct side of the dimension line, depending on where you are viewing it from. In some cases, though, the viewing direction might not reflect the intent of the viewer, and the orientation of the dimension text might be inverted. This tool inverts that orientation on selected [[Draft Dimension|dimension]] objects.
 
  
==How to use==
+
To flip a [[Draft_Dimension|Draft Dimension]] invert its {{incode|Normal}} property.
# Select one or more [[Draft Dimension|dimension]] objects
 
# Press the {{KEY|[[Image:Draft_FlipDimension.png|16px]] [[Draft FlipDimension|Flip Dimension]]}} button
 
  
{{clear}}
+
Example:
<languages/>
+
 
 +
{{Code|code=
 +
import FreeCAD as App
 +
import Draft
 +
 
 +
doc = App.newDocument()
 +
 
 +
p1 = App.Vector(0, 0, 0)
 +
p2 = App.Vector(1000, 0, 0)
 +
p3 = App.Vector(500, 300, 0)
 +
dimension = Draft.make_dimension(p1, p2, p3)
 +
dimension.ViewObject.FontSize = 200
 +
 
 +
dimension.Normal = dimension.Normal.negative()
 +
doc.recompute()
 +
}}
 +
 
 +
 
 +
{{Docnav
 +
|[[Draft_Slope|Slope]]
 +
|[[Draft_Shape2DView|Shape2DView]]
 +
|[[Draft_Workbench|Draft]]
 +
|IconL=Draft_Slope.svg
 +
|IconR=Draft_Shape2DView.svg
 +
|IconC=Workbench_Draft.svg
 +
}}
 +
 
 +
{{Draft Tools navi{{#translation:}}}}
 +
{{Userdocnavi{{#translation:}}}}

Latest revision as of 09:28, 3 September 2021

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

Draft FlipDimension.svg Draft FlipDimension

Menu location
Modification → Flip dimension
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
None

Description

The Draft FlipDimension.svg Draft FlipDimension command rotates the dimension text of selected Draft Dimensions 180° around the dimension line. It can be used to correct dimensions whose text appears mirrored. The command does not work properly for angular dimensions.

Usage

  1. Select one or more Draft Dimensions.
  2. There are several ways to invoke the command:
    • Press the Draft FlipDimension.svg Draft FlipDimension button.
    • Select the Modification → Draft FlipDimension.svg Flip dimension option from the menu.

Notes

  • Draft Dimensions also have a DataFlip Text property. When set to true the text is rotated 180° around the normal direction. This can be combined with the effect of this command.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To flip a Draft Dimension invert its Normal property.

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 0, 0)
p3 = App.Vector(500, 300, 0)
dimension = Draft.make_dimension(p1, p2, p3)
dimension.ViewObject.FontSize = 200

dimension.Normal = dimension.Normal.negative()
doc.recompute()


Arrow-left.svg Previous: Draft Slope.svg Slope