Draft FlipDimension: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 34: Line 34:
#* Select the {{MenuCommand|Modification → [[Image:Draft_FlipDimension.svg|16px]] Flip dimension}} option from the menu.
#* Select the {{MenuCommand|Modification → [[Image:Draft_FlipDimension.svg|16px]] Flip dimension}} option from the menu.


== Notes ==
==Notes==


<!--T:5-->
<!--T:5-->
* [[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.
* [[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 ==
==Scripting==


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

Revision as of 10:16, 15 June 2021

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Draft FlipDimension

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

Description

This tool flips the Draft Dimension text around the dimension line. It can be done to adjust the appearance of the dimension. 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 button.
    • Select the Modification → 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()