Sandbox:Macro dimensions

Description
Macro for easy add dimension to Draft ... objects ...



How to install

 * Copy and paste the code into a macro (see Ho to install macro)
 * Save with a meaningful name (for me "dm")

Start

 * In FreeCAD Python Console digit "import dm" -> Return
 * In FreeCAD Python Console digit "dm.showup" -> Return
 * set path for .ttf
 * in its latest tested version, the path must be defined on line 1112, replacing path = "/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf" 
 * set other options

Usage

 * Auto: Vertical + parallel. Point1 and point2 you click decide the string, and the point3 decide direction and the position.
 * 2Point: The string is the distance of the point1 and point2. Point3 decide the position of the string.
 * Vertical: Just like auto, but the direction must be vertical.
 * Parallel: Just like auto, but the direction must be parallel.
 * Orthogonal:
 * Angle: To click line1 and line2. They will decide a angle. And last point decide the position of the string.
 * Custom: Mmake a String what you enter. Point1 is the start. point2 is the end.
 * Del obj: It can delete the dimension you make. Just click it and what you clicked will be deleted.

Limitations and things to improve

 * When lines are moved, the dimensions do not follow the design
 * parallel functions as "orthogonal" (to me) solved, parallel has been removed
 * path for .ttf is lost when exit, or Freecad is closed solved, now the path is set in the code
 * It can not be paused, but it is always active, or exit
 * It works only in the xy plane, or planes parallel to the xy
 * When you break a dimension, disappear all properties

Script

 * download from the forum, here it is not accepted
 * if it is present, remove the line 9 "import GSDraftGeomUtils"

Links

 * Discussion in the forum