DraftTools Namespace Reference

GUI Commands of the Draft workbench. More...

Classes

class  AddPoint
 
class  AddToGroup
 
class  ApplyStyle
 
class  Arc
 
class  Array
 
class  BezCurve
 
class  BSpline
 
class  Circle
 
class  CloseLine
 
class  Creator
 
class  DelPoint
 
class  Dimension
 
class  Downgrade
 
class  Draft2Sketch
 
class  Draft_Clone
 
class  Draft_Facebinder
 
class  Draft_FlipDimension
 
class  Draft_Slope
 
class  Draft_Snap_Angle
 
class  Draft_Snap_Center
 
class  Draft_Snap_Dimensions
 
class  Draft_Snap_Endpoint
 
class  Draft_Snap_Extension
 
class  Draft_Snap_Grid
 
class  Draft_Snap_Intersection
 
class  Draft_Snap_Lock
 
class  Draft_Snap_Midpoint
 
class  Draft_Snap_Near
 
class  Draft_Snap_Ortho
 
class  Draft_Snap_Parallel
 
class  Draft_Snap_Perpendicular
 
class  Draft_Snap_Special
 
class  Draft_Snap_WorkingPlane
 
class  DraftTool
 
class  Drawing
 
class  Edit
 
class  Ellipse
 
class  FinishLine
 
class  Heal
 
class  Line
 
class  Mirror
 
class  Modifier
 
class  Move
 
class  Offset
 
class  PathArray
 
class  Point
 
class  Polygon
 
class  Rectangle
 
class  Rotate
 
class  Scale
 
class  SelectGroup
 
class  SelectPlane
 
class  SetAutoGroup
 
class  Shape2DView
 
class  ShapeString
 
class  ShowSnapBar
 
class  Stretch
 
class  Text
 
class  ToggleConstructionMode
 
class  ToggleContinueMode
 
class  ToggleDisplayMode
 
class  ToggleGrid
 
class  Trimex
 
class  UndoLine
 
class  Upgrade
 
class  VisGroup
 
class  Wire
 
class  WireToBSpline
 

Functions

def formatUnit (exp, unit="mm")
 
def getPoint (target, args, mobile=False, sym=False, workingplane=True, noTracker=False)
 
def getSupport (args=None)
 
def hasMod (args, mod)
 
def msg (text=None, mode=None)
 
def selectObject (arg)
 
def setMod (args, mod, state)
 
def translate (context, text)
 

Variables

 defaultWP = Draft.getParam("defaultWP",1)
 
 DraftWorkingPlane
 
list lastObj = [0,0]
 
 MODALT = MODS[Draft.getParam("modalt",2)]
 
 MODCONSTRAIN = MODS[Draft.getParam("modconstrain",0)]
 
list MODS = ["shift","ctrl","alt"]
 
 MODSNAP = MODS[Draft.getParam("modsnap",1)]
 
 plane = WorkingPlane.plane()
 

Detailed Description

GUI Commands of the Draft workbench.

This module contains all the FreeCAD commands of the Draft module

Function Documentation

def DraftTools.formatUnit (   exp,
  unit = "mm" 
)
returns a formatting string to set a number to the correct unit
def DraftTools.getPoint (   target,
  args,
  mobile = False,
  sym = False,
  workingplane = True,
  noTracker = False 
)
Function used by the Draft Tools.
returns a constrained 3d point and its original point.
if mobile=True, the constraining occurs from the location of
mouse cursor when Shift is pressed, otherwise from last entered
point. If sym=True, x and y values stay always equal. If workingplane=False,
the point wont be projected on the Working Plane. if noTracker is True, the
tracking line will not be displayed

References Draft.get3DView(), and hasMod().

Referenced by DraftTools.Line.action(), DraftTools.BSpline.action(), DraftTools.BezCurve.action(), DraftTools.Rectangle.action(), DraftTools.Arc.action(), DraftTools.Polygon.action(), DraftTools.Ellipse.action(), DraftTools.Text.action(), DraftTools.Dimension.action(), DraftTools.ShapeString.action(), DraftTools.Move.action(), DraftTools.Rotate.action(), DraftTools.Offset.action(), DraftTools.Stretch.action(), DraftTools.Scale.action(), DraftTools.Edit.action(), and DraftTools.Mirror.action().

def DraftTools.selectObject (   arg)
this is a scene even handler, to be called from the Draft tools
when they need to select an object

References Draft.get3DView().

def DraftTools.setMod (   args,
  mod,
  state 
)
def DraftTools.translate (   context,
  text 
)

Referenced by DraftTools.Offset.action(), DraftTools.Wire.Activated(), DraftTools.BSpline.Activated(), DraftTools.BezCurve.Activated(), DraftTools.Rectangle.Activated(), DraftTools.Polygon.Activated(), DraftTools.Ellipse.Activated(), DraftTools.Text.Activated(), DraftTools.Dimension.Activated(), DraftTools.ShapeString.Activated(), DraftTools.Stretch.Activated(), DraftTools.Upgrade.Activated(), DraftTools.Downgrade.Activated(), DraftTools.Shape2DView.Activated(), DraftTools.Draft2Sketch.Activated(), DraftTools.Array.Activated(), DraftTools.PathArray.Activated(), DraftTools.Draft_Clone.Activated(), DraftTools.Draft_Facebinder.Activated(), DraftTools.Draft_Slope.Activated(), DraftTools.Stretch.addPoint(), DraftTools.Rectangle.appendPoint(), DraftTools.Ellipse.appendPoint(), DraftTools.Point.click(), DraftTools.Rectangle.createObject(), DraftTools.Ellipse.createObject(), DraftTools.Text.createObject(), DraftTools.Dimension.createObject(), DraftTools.ShapeString.createObject(), DraftTools.Dimension.createOnMeasures(), DraftTools.Edit.delPoint(), DraftTools.Stretch.doStretch(), DraftTools.Arc.drawArc(), DraftTools.Polygon.drawPolygon(), DraftTools.Line.drawSegment(), DraftTools.BSpline.drawUpdate(), DraftTools.BezCurve.drawUpdate(), DraftTools.Line.finish(), DraftTools.BSpline.finish(), DraftTools.BezCurve.finish(), DraftTools.Mirror.mirror(), DraftTools.Move.move(), DraftTools.Arc.numericInput(), DraftTools.Polygon.numericInput(), DraftTools.Rotate.numericInput(), DraftTools.Arc.numericRadius(), DraftTools.Rotate.numericRadius(), DraftTools.Offset.numericRadius(), DraftTools.Upgrade.proceed(), DraftTools.Downgrade.proceed(), DraftTools.Draft2Sketch.proceed(), DraftTools.Array.proceed(), DraftTools.Rotate.rot(), DraftTools.Scale.scale(), DraftTools.Edit.smoothBezPoint(), DraftTools.Trimex.trimObjects(), DraftTools.Line.undolast(), DraftTools.BSpline.undolast(), and DraftTools.BezCurve.undolast().

Variable Documentation

DraftTools.defaultWP = Draft.getParam("defaultWP",1)
DraftTools.DraftWorkingPlane
list DraftTools.lastObj = [0,0]
DraftTools.MODALT = MODS[Draft.getParam("modalt",2)]
DraftTools.MODCONSTRAIN = MODS[Draft.getParam("modconstrain",0)]
list DraftTools.MODS = ["shift","ctrl","alt"]
DraftTools.MODSNAP = MODS[Draft.getParam("modsnap",1)]
DraftTools.plane = WorkingPlane.plane()