Utility modules that are used throughout the workbench. More...

Classes

class  draftutils.todo.ToDo
 

Namespaces

namespace  groups
 Provides utility functions to do operations with groups.
 
namespace  gui_utils
 Provides utility functions that deal with GUI interactions.
 
namespace  init_draft_statusbar
 Provides the initialization code for the workbench's status bar.
 
namespace  init_tools
 Provides lists of commands to set up toolbars of the workbench.
 
namespace  messages
 Provides utility functions that wrap around the Console methods.
 
namespace  todo
 Provides the ToDo static class to run commands with a time delay.
 
namespace  translate
 Provides utility functions that wrap around the Qt translate function.
 
namespace  units
 Provides utility functions to handle quantities and units.
 
namespace  utils
 Provides general utility functions used throughout the workbench.
 

Functions

def draftutils.gui_utils.autogroup (obj)
 
def draftutils.utils.compare_objects (obj1, obj2)
 
def draftutils.gui_utils.dim_dash (p1, p2)
 
def draftutils.gui_utils.dim_symbol (symbol=None, invert=False)
 
def draftutils.units.display_external (internal_value, decimals=None, dim='Length', showUnit=True, unit=None)
 
def draftutils.utils.epsilon ()
 
def draftutils.utils.filter_objects_for_modifiers (objects, isCopied=False)
 
def draftutils.utils.find_doc (doc=None)
 
def draftutils.utils.find_object (obj, doc=None)
 
def draftutils.gui_utils.format_object (target, origin=None)
 
def draftutils.gui_utils.get_3d_view ()
 
def draftutils.gui_utils.get_bbox (obj, debug=False)
 
def draftutils.utils.get_clone_base (obj, strict=False, recursive=True)
 
def draftutils.units.get_default_unit (dim)
 
def draftutils.init_tools.get_draft_annotation_commands ()
 
def draftutils.init_tools.get_draft_context_commands ()
 
def draftutils.init_tools.get_draft_drawing_commands ()
 
def draftutils.init_tools.get_draft_modification_commands ()
 
def draftutils.init_tools.get_draft_snap_commands ()
 
def draftutils.init_tools.get_draft_snap_tooltips ()
 
def draftutils.init_tools.get_draft_utility_commands_menu ()
 
def draftutils.init_tools.get_draft_utility_commands_toolbar ()
 
def draftutils.groups.get_group_contents (objectslist, walls=False, addgroups=False, spaces=False, noarchchild=False)
 
def draftutils.groups.get_group_names (doc=None)
 
def draftutils.groups.get_movable_children (objectslist, recursive=True)
 
def draftutils.utils.get_objects_of_type (objects, typ)
 
def draftutils.utils.get_param (param, default=None)
 
def draftutils.utils.get_param_type (param)
 
def draftutils.utils.get_real_name (name)
 
def draftutils.utils.get_rgb (color, testbw=True)
 
def draftutils.init_draft_statusbar.get_scales (unit_system=0)
 
def draftutils.gui_utils.get_selection (gui=App.GuiUp)
 
def draftutils.gui_utils.get_selection_ex (gui=App.GuiUp)
 
def draftutils.utils.get_type (obj)
 
def draftutils.groups.get_windows (obj)
 
def draftutils.groups.getGroupContents (objectslist, walls=False, addgroups=False, spaces=False, noarchchild=False)
 
def draftutils.groups.getGroupNames ()
 
def draftutils.groups.getMovableChildren (objectslist, recursive=True)
 
def draftutils.init_draft_statusbar.hide_draft_statusbar ()
 
def draftutils.init_draft_statusbar.init_draft_statusbar_scale ()
 
def draftutils.init_draft_statusbar.init_draft_statusbar_snap ()
 
def draftutils.init_tools.init_menu (workbench, menu_list, cmd_list)
 
def draftutils.init_tools.init_toolbar (workbench, toolbar, cmd_list)
 
def draftutils.utils.is_clone (obj, objtype=None, recursive=False)
 
def draftutils.utils.is_closed_edge (edge_index, object)
 
def draftutils.groups.is_group (obj)
 
def draftutils.init_draft_statusbar.label_to_scale (label)
 
def draftutils.utils.load_svg_patterns ()
 
def draftutils.gui_utils.load_texture (filename, size=None, gui=App.GuiUp)
 
def draftutils.units.make_format_spec (decimals=4, dim='Length')
 
def draftutils.gui_utils.migrate_text_display_mode (obj_type="Text", mode="3D text", doc=None)
 
def draftutils.utils.precision ()
 
def draftutils.utils.print_header (name, description, debug=True)
 
def draftutils.utils.print_shape (shape)
 
def draftutils.gui_utils.remove_hidden (objectslist)
 
def draftutils.init_draft_statusbar.scale_to_label (scale)
 
def draftutils.gui_utils.select (objs=None, gui=App.GuiUp)
 
def draftutils.utils.set_param (param, value)
 
def draftutils.utils.shapify (obj)
 
def draftutils.init_draft_statusbar.show_draft_statusbar ()
 
def draftutils.utils.string_encode_coin (ustr)
 
def draftutils.utils.svg_patterns ()
 
def draftutils.utils.tolerance ()
 
def draftutils.translate.translate (context, text, utf8_decode=False)
 
def draftutils.utils.type_check (args_and_types, name="?")
 
def draftutils.groups.ungroup (obj)
 
def draftutils.utils.use_instead (function, version="")
 
def draftutils.utils.utf8_decode (text)
 

Variables

dictionary draftutils.utils.ANNOTATION_STYLE
 
list draftutils.utils.ARROW_TYPES = ["Dot", "Circle", "Arrow", "Tick", "Tick-2"]
 
list draftutils.utils.arrowtypes = ARROW_TYPES
 
def draftutils.utils.compareObjects = compare_objects
 
def draftutils.gui_utils.dimDash = dim_dash
 
def draftutils.gui_utils.dimSymbol = dim_symbol
 
def draftutils.units.displayExternal = display_external
 
list draftutils.init_draft_statusbar.draft_scales_arch_imperial
 
list draftutils.init_draft_statusbar.draft_scales_eng_imperial
 
list draftutils.init_draft_statusbar.draft_scales_metrics
 
def draftutils.utils.filterObjectsForModifiers = filter_objects_for_modifiers
 
def draftutils.gui_utils.formatObject = format_object
 
def draftutils.gui_utils.get3DView = get_3d_view
 
def draftutils.utils.getCloneBase = get_clone_base
 
def draftutils.units.getDefaultUnit = get_default_unit
 
def draftutils.utils.getObjectsOfType = get_objects_of_type
 
def draftutils.utils.getParam = get_param
 
def draftutils.utils.getParamType = get_param_type
 
def draftutils.utils.getRealName = get_real_name
 
def draftutils.utils.getrgb = get_rgb
 
def draftutils.gui_utils.getSelection = get_selection
 
def draftutils.gui_utils.getSelectionEx = get_selection_ex
 
def draftutils.utils.getType = get_type
 
def draftutils.utils.isClone = is_clone
 
def draftutils.utils.isClosedEdge = is_closed_edge
 
def draftutils.utils.loadSvgPatterns = load_svg_patterns
 
def draftutils.gui_utils.loadTexture = load_texture
 
def draftutils.units.makeFormatSpec = make_format_spec
 
 draftutils.utils.param = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
 
def draftutils.utils.printShape = print_shape
 
 draftutils.translate.QT_TRANSLATE_NOOP = QtCore.QT_TRANSLATE_NOOP
 
 draftutils.translate.Qtranslate = QtCore.QCoreApplication.translate
 
def draftutils.gui_utils.removeHidden = remove_hidden
 
def draftutils.utils.setParam = set_param
 
def draftutils.utils.stringencodecoin = string_encode_coin
 
def draftutils.utils.svgpatterns = svg_patterns
 
 draftutils.todo.todo = ToDo
 
def draftutils.utils.typecheck = type_check
 

Detailed Description

Utility modules that are used throughout the workbench.

Function Documentation

◆ autogroup()

def draftutils.gui_utils.autogroup (   obj)
Add a given object to the defined Draft autogroup, if applicable.

This function only works if the graphical interface is available.
It checks that the `App.draftToolBar` class is available,
which contains the group to use to automatically store
new created objects.

Originally, it worked with standard groups (`App::DocumentObjectGroup`),
and Arch Workbench containers like `'Site'`, `'Building'`, `'Floor'`,
and `'BuildingPart'`.

Now it works with Draft Layers.

Parameters
----------
obj: App::DocumentObject
    Any type of object that will be stored in the group.

◆ compare_objects()

def draftutils.utils.compare_objects (   obj1,
  obj2 
)
Print the differences between 2 objects.

The two objects are compared through their `TypeId` attribute,
or by using the `get_type` function.

If they are the same type their properties are compared
looking for differences.

Neither `Shape` nor `Label` attributes are compared.

Parameters
----------
obj1 : App::DocumentObject
    Any type of scripted object.
obj2 : App::DocumentObject
    Any type of scripted object.

References draftutils.utils.get_type(), and draftutils.utils.getType.

◆ dim_dash()

def draftutils.gui_utils.dim_dash (   p1,
  p2 
)
Return a SoSeparator with a line used to make dimension dashes.

It is used by `dim_symbol` to create line end symbols
like `'Tick-2'`, `'DimOvershoot'`, and `'ExtOvershoot'` dashes.

Parameters
----------
p1: tuple of three floats or Base::Vector3
    A point to define a line vertex.

p2: tuple of three floats or Base::Vector3
    A point to define a line vertex.

Returns
-------
Coin.SoSeparator
    A Coin object with a `SoLineSet` created from `p1` and `p2`
    as vertices.

Referenced by draftutils.gui_utils.dim_symbol().

◆ dim_symbol()

def draftutils.gui_utils.dim_symbol (   symbol = None,
  invert = False 
)
Return the specified dimension symbol.

Parameters
----------
symbol: int, optional
    It defaults to `None`, in which it gets the value from the parameter
    database, `get_param("dimsymbol", 0)`.

    A numerical value defines different markers
     * 0, `SoSphere`
     * 1, `SoSeparator` with a `SoLineSet`, a circle (in fact a 24 sided polygon)
     * 2, `SoSeparator` with a `soCone`
     * 3, `SoSeparator` with a `SoFaceSet`
     * 4, `SoSeparator` with a `SoLineSet`, calling `dim_dash`
     * Otherwise, `SoSphere`

invert: bool, optional
    It defaults to `False`.
    If it is `True` and `symbol=2`, the cone will be rotated
    -90 degrees around the Z axis, otherwise the rotation is positive,
    +90 degrees.

Returns
-------
Coin.SoNode
    A `Coin.SoSphere`, or `Coin.SoSeparator` (circle, cone, face, line)
    that will be used as a dimension symbol.

References draftutils.gui_utils.dim_dash(), and draftutils.utils.get_param().

◆ display_external()

def draftutils.units.display_external (   internal_value,
  decimals = None,
  dim = 'Length',
  showUnit = True,
  unit = None 
)
Return a converted value for display, according to the unit schema.

Parameters
----------
internal_value: float
    A value that will be transformed depending on the other parameters.

decimals: float, optional
    It defaults ot `None`, in which case, the decimals are 2.

dim: str, optional
    It defaults to `'Length'`. It can also be `'Angle'`.

showUnit: bool, optional
    It defaults to `True`.
    If it is `False` it won't show the unit.

unit: str, optional
    A unit string such as `'mm'`, `'cm'`, `'m'`, `'in'`, `'ft'`,
    in which to express the returned value.

◆ epsilon()

◆ filter_objects_for_modifiers()

def draftutils.utils.filter_objects_for_modifiers (   objects,
  isCopied = False 
)

References Gui.getMainWindow().

◆ find_doc()

def draftutils.utils.find_doc (   doc = None)
Return the active document or find a document by name.

Parameters
----------
doc: App::Document or str, optional
    The document that will be searched in the session.
    It defaults to `None`, in which case it tries to find
    the active document.
    If `doc` is a string, it will try to get the document by `Name`.

Returns
-------
bool, App::Document
    A tuple containing the information on whether the search
    was successful. In this case, the boolean is `True`,
    and the second value is the document instance.

False, None
    If there is no active document, or the string in `doc`
    doesn't correspond to an open document in the session.

Referenced by draftutils.utils.find_object().

◆ find_object()

def draftutils.utils.find_object (   obj,
  doc = None 
)
Find object in the document, inclusive by Label.

Parameters
----------
obj: App::DocumentObject or str
    The object to search in `doc`.
    Or if the `obj` is a string, it will search the object by `Label`.
    Since Labels are not guaranteed to be unique, it will get the first
    object with that label in the document.

doc: App::Document or str, optional
    The document in which the object will be searched.
    It defaults to `None`, in which case it tries to search in the
    active document.
    If `doc` is a string, it will search the document by `Name`.

Returns
-------
bool, App::DocumentObject
    A tuple containing the information on whether the search
    was successful. In this case, the boolean is `True`,
    and the second value is the object found.

False, None
    If the object doesn't exist in the document.

References draftutils.utils.find_doc().

◆ format_object()

def draftutils.gui_utils.format_object (   target,
  origin = None 
)
Apply visual properties from the Draft toolbar or another object.

This function only works if the graphical interface is available
as the visual properties are attributes of the view provider
(`obj.ViewObject`).

Parameters
----------
target: App::DocumentObject
    Any type of scripted object.

    This object will adopt the applicable visual properties,
    `FontSize`, `TextColor`, `LineWidth`, `PointColor`, `LineColor`,
    and `ShapeColor`, defined in the Draft toolbar
    (`Gui.draftToolBar`) or will adopt
    the properties from the `origin` object.

    The `target` is also placed in the construction group
    if the construction mode in the Draft toolbar is active.

origin: App::DocumentObject, optional
    It defaults to `None`.
    If it exists, it will provide the visual properties to assign
    to `target`, with the exception of `BoundingBox`, `Proxy`,
    `RootNode` and `Visibility`.

◆ get_3d_view()

def draftutils.gui_utils.get_3d_view ( )
Return the current 3D view.

Returns
-------
Gui::View3DInventor
    Return the current `ActiveView` in the active document,
    or the first `Gui::View3DInventor` view found.

    Return `None` if the graphical interface is not available.

◆ get_bbox()

def draftutils.gui_utils.get_bbox (   obj,
  debug = False 
)
Return a BoundBox from any object that has a Coin RootNode.

Normally the bounding box of an object can be taken
from its `Part::TopoShape`.
::
    >>> print(obj.Shape.BoundBox)

However, for objects without a `Shape`, such as those
derived from `App::FeaturePython` like `Draft Text` and `Draft Dimension`,
the bounding box can be calculated from the `RootNode` of the viewprovider.

Parameters
----------
obj: App::DocumentObject
    Any object that has a `ViewObject.RootNode`.

Returns
-------
Base::BoundBox
    It returns a `BoundBox` object which has information like
    minimum and maximum values of X, Y, and Z, as well as bounding box
    center.

None
    If there is a problem it will return `None`.

◆ get_clone_base()

def draftutils.utils.get_clone_base (   obj,
  strict = False,
  recursive = True 
)
Return the object cloned by this object, if any.

Parameters
----------
obj: App::DocumentObject
    Any type of object.

strict: bool, optional
    It defaults to `False`.
    If it is `True`, and this object is not a clone,
    this function will return `False`.

recursive: bool, optional
    It defaults to `True`
    If it is `True`, it call recursively to itself to
    get base object and if it is `False` then it just
    return base object, not call recursively to find
    base object.

Returns
-------
App::DocumentObject
    It `obj` is a `Draft Clone`, it will return the first object
    that is in its `Objects` property.

    If `obj` has a `CloneOf` property, it will search iteratively
    inside the object pointed to by this property.

obj
    If `obj` is not a `Draft Clone`, nor it has a `CloneOf` property,
    it will return the same `obj`, as long as `strict` is `False`.

False
    It will return `False` if `obj` is not a clone,
    and `strict` is `True`.

References draftutils.utils.get_clone_base(), and draftutils.utils.get_type().

Referenced by draftutils.utils.get_clone_base().

◆ get_default_unit()

def draftutils.units.get_default_unit (   dim)
Return default Unit of Measure for a dimension.

It is based on the user preferences.

Referenced by draftutils.units.make_format_spec().

◆ get_draft_annotation_commands()

def draftutils.init_tools.get_draft_annotation_commands ( )
Return the annotation commands list.

◆ get_draft_context_commands()

def draftutils.init_tools.get_draft_context_commands ( )
Return the context menu commands list.

◆ get_draft_drawing_commands()

def draftutils.init_tools.get_draft_drawing_commands ( )
Return the drawing commands list.

References draftutils.translate.QT_TRANSLATE_NOOP.

◆ get_draft_modification_commands()

def draftutils.init_tools.get_draft_modification_commands ( )
Return the modification commands list.

References draftutils.translate.QT_TRANSLATE_NOOP.

◆ get_draft_snap_commands()

def draftutils.init_tools.get_draft_snap_commands ( )

◆ get_draft_snap_tooltips()

def draftutils.init_tools.get_draft_snap_tooltips ( )
Return a dictionary with tooltips for the snapping commands.

For the snapping commands in the default toolbar and in the statusbar the
tooltips from the `GetResources` functions in gui_snaps.py are not used.

Referenced by draftguitools.gui_snapper.Snapper.init_draft_snap_buttons().

◆ get_draft_utility_commands_menu()

def draftutils.init_tools.get_draft_utility_commands_menu ( )
Return the utility commands list for the menu.

◆ get_draft_utility_commands_toolbar()

def draftutils.init_tools.get_draft_utility_commands_toolbar ( )
Return the utility commands list for the toolbar.

◆ get_group_contents()

def draftutils.groups.get_group_contents (   objectslist,
  walls = False,
  addgroups = False,
  spaces = False,
  noarchchild = False 
)
Return a list of objects from expanding the input groups.

The function accepts any type of object, although it is most useful
with "groups", as it is meant to unpack the objects inside these groups.

Parameters
----------
objectslist: list
    If any object in the list is considered a group, see the `is_group`
    function, its contents (`obj.Group`) are extracted and added to the
    output list.

    Single items that aren't groups are added to the output list
    as is.

walls: bool, optional
    It defaults to `False`.
    If it is `True`, Wall and Structure objects (Arch Workbench)
    are treated as groups; they are scanned for Window, Door,
    and Rebar objects, and these are added to the output list.

addgroups: bool, optional
    It defaults to `False`.
    If it is `True`, the group itself is kept as part of the output list.

spaces: bool, optional
    It defaults to `False`.
    If it is `True`, Arch Spaces are added to the output list even
    when addgroups is False (their contents are always added).

noarchchild: bool, optional
    It defaults to `False`.
    If it is `True`, the objects inside Building and BuildingParts
    (Arch Workbench) aren't added to the output list.

Returns
-------
list
    The list of objects from each group present in `objectslist`,
    plus any other individual object given in `objectslist`.

References draftutils.groups.get_group_contents(), draftutils.groups.get_windows(), and draftutils.groups.is_group().

Referenced by draftutils.groups.get_group_contents(), and draftutils.groups.getGroupContents().

◆ get_group_names()

def draftutils.groups.get_group_names (   doc = None)
Return a list of names of existing groups in the document.

Parameters
----------
doc: App::Document, optional
    It defaults to `None`.
    A document on which to search group names.
    It if is `None` it will search the current document.

Returns
-------
list of str
    A list of names of objects that are considered groups.
    See the is_group function.

    Otherwise returns an empty list.

References draftutils.groups.is_group().

Referenced by draftutils.groups.getGroupNames(), and draftutils.groups.ungroup().

◆ get_movable_children()

def draftutils.groups.get_movable_children (   objectslist,
  recursive = True 
)
Return a list of objects with child objects that move with a host.

Builds a list of objects with all child objects (`obj.OutList`)
that have their `MoveWithHost` attribute set to `True`.
This function is mostly useful for Arch Workbench objects.

Parameters
----------
objectslist: list of App::DocumentObject
    A single scripted object or list of objects.

recursive: bool, optional
    It defaults to `True`, in which case the function
    is called recursively to also extract the children of children
    objects.
    Otherwise, only direct children of the input objects
    are added to the output list.

Returns
-------
list
    List of children objects that have their `MoveWithHost` attribute
    set to `True`.

References draftutils.groups.get_movable_children().

Referenced by draftutils.groups.get_movable_children(), and draftutils.groups.getMovableChildren().

◆ get_objects_of_type()

def draftutils.utils.get_objects_of_type (   objects,
  typ 
)
Return only the objects that match the type in the list of objects.

Parameters
----------
objects : list of App::DocumentObject
    A list of objects which will be tested.

typ : str
    A string that indicates a type. This should be one of the types
    that can be returned by `get_type`.

Returns
-------
list of objects
    Only the objects that match `typ` will be added to the output list.

References draftutils.utils.getType.

◆ get_param()

def draftutils.utils.get_param (   param,
  default = None 
)
Return a parameter value from the current parameter database.

The parameter database is located in the tree
::
    'User parameter:BaseApp/Preferences/Mod/Draft'

In the case that `param` is `'linewidth'` or `'color'` it will get
the values from the View parameters
::
    'User parameter:BaseApp/Preferences/View/DefaultShapeLineWidth'
    'User parameter:BaseApp/Preferences/View/DefaultShapeLineColor'

Parameters
----------
param : str
    A string that indicates a parameter in the parameter database.

default : optional
    It indicates the default value of the given parameter.
    It defaults to `None`, in which case it will use a specific
    value depending on the type of parameter determined
    with `get_param_type`.

Returns
-------
int, or str, or float, or bool
    Depending on `param` and its type, by returning `ParameterGrp.GetInt`,
    `ParameterGrp.GetString`, `ParameterGrp.GetFloat`,
    `ParameterGrp.GetBool`, or `ParameterGrp.GetUnsinged`.

References draftutils.utils.getParamType.

Referenced by draftutils.gui_utils.dim_symbol(), draftutils.utils.precision(), and draftutils.utils.tolerance().

◆ get_param_type()

def draftutils.utils.get_param_type (   param)
Return the type of the parameter entered.

Parameters
----------
param : str
    A string that indicates a parameter in the parameter database.

Returns
-------
str or None
    The returned string could be `'int'`, `'string'`, `'float'`,
    `'bool'`, `'unsigned'`, depending on the parameter.
    It returns `None` for unhandled situations.

◆ get_real_name()

def draftutils.utils.get_real_name (   name)
Strip the trailing numbers from a string to get only the letters.

Parameters
----------
name : str
    A string that may have a number at the end, `Line001`.

Returns
-------
str
    A string without the numbers at the end, `Line`.
    The returned string cannot be empty; it will have
    at least one letter.

Referenced by draftutils.utils.shapify().

◆ get_rgb()

def draftutils.utils.get_rgb (   color,
  testbw = True 
)
Return an RRGGBB value #000000 from a FreeCAD color.

Parameters
----------
testwb : bool (default = True)
    pure white will be converted into pure black

References draftutils.utils.getParam.

◆ get_scales()

def draftutils.init_draft_statusbar.get_scales (   unit_system = 0)
returns the list of preset scales accordin to unit system.

Parameters:
unit_system =   0 : default from user preferences
                1 : metrics
                2 : imperial architectural
                3 : imperial engineering

Referenced by draftutils.init_draft_statusbar.init_draft_statusbar_scale().

◆ get_selection()

def draftutils.gui_utils.get_selection (   gui = App.GuiUp)
Return the current selected objects.

This function only works if the graphical interface is available
as the selection module only works on the 3D view.

It wraps around `Gui.Selection.getSelection`

Parameters
----------
gui: bool, optional
    It defaults to the value of `App.GuiUp`, which is `True`
    when the interface exists, and `False` otherwise.

    This value can be set to `False` to simulate
    when the interface is not available.

Returns
-------
list of App::DocumentObject
    Returns a list of objects in the current selection.
    It can be an empty list if no object is selected.

    If the interface is not available, it returns `None`.

◆ get_selection_ex()

def draftutils.gui_utils.get_selection_ex (   gui = App.GuiUp)
Return the current selected objects together with their subelements.

This function only works if the graphical interface is available
as the selection module only works on the 3D view.

It wraps around `Gui.Selection.getSelectionEx`

Parameters
----------
gui: bool, optional
    It defaults to the value of `App.GuiUp`, which is `True`
    when the interface exists, and `False` otherwise.

    This value can be set to `False` to simulate
    when the interface is not available.

Returns
-------
list of Gui::SelectionObject
    Returns a list of `Gui::SelectionObject` in the current selection.
    It can be an empty list if no object is selected.

    If the interface is not available, it returns `None`.

Selection objects
-----------------
One `Gui::SelectionObject` has attributes that indicate which specific
subelements, that is, vertices, wires, and faces, were selected.
This can be useful to operate on the subelements themselves.
If `G` is a `Gui::SelectionObject`
 * `G.Object` is the selected object
 * `G.ObjectName` is the name of the selected object
 * `G.HasSubObjects` is `True` if there are subelements in the selection
 * `G.SubObjects` is a tuple of the subelements' shapes
 * `G.SubElementNames` is a tuple of the subelements' names

`SubObjects` and `SubElementNames` should be empty tuples
if `HasSubObjects` is `False`.

◆ get_type()

def draftutils.utils.get_type (   obj)
Return a string indicating the type of the given object.

Parameters
----------
obj : App::DocumentObject
    Any type of scripted object created with Draft,
    or any other workbench.

Returns
-------
str
    If `obj` has a `Proxy`, it will return the value of `obj.Proxy.Type`.

    * If `obj` is a `Part.Shape`, returns `'Shape'`

    * If `obj` has a `TypeId`, returns `obj.TypeId`

    In other cases, it will return `'Unknown'`,
    or `None` if `obj` is `None`.

Referenced by draftutils.utils.compare_objects(), and draftutils.utils.get_clone_base().

◆ get_windows()

def draftutils.groups.get_windows (   obj)
Return the windows and rebars inside a host.

Parameters
----------
obj: App::DocumentObject
    A scripted object of type `'Wall'` or `'Structure'`
    (Arch Workbench).
    This will be searched for objects of type `'Window'` and `'Rebar'`,
    and clones of them, and the found elements will be added
    to the output list.

    The function will search recursively all elements under `obj.OutList`,
    in case the windows and rebars are nested under other walls
    and structures.

Returns
-------
list
    A list of all found windows and rebars in `obj`.
    If `obj` is itself a `'Window'` or a `'Rebar'`, or a clone of them,
    it will return the same `obj` element.

References draftutils.groups.get_windows().

Referenced by draftutils.groups.get_group_contents(), and draftutils.groups.get_windows().

◆ getGroupContents()

def draftutils.groups.getGroupContents (   objectslist,
  walls = False,
  addgroups = False,
  spaces = False,
  noarchchild = False 
)
Return a list of objects from groups. DEPRECATED.

References draftutils.groups.get_group_contents().

◆ getGroupNames()

def draftutils.groups.getGroupNames ( )
Return a list of group names. DEPRECATED.

References draftutils.groups.get_group_names().

◆ getMovableChildren()

def draftutils.groups.getMovableChildren (   objectslist,
  recursive = True 
)
Return a list of objects with child objects. DEPRECATED.

References draftutils.groups.get_movable_children().

◆ hide_draft_statusbar()

def draftutils.init_draft_statusbar.hide_draft_statusbar ( )
hides draft statusbar if present

References Gui.getMainWindow().

◆ init_draft_statusbar_scale()

def draftutils.init_draft_statusbar.init_draft_statusbar_scale ( )
this function initializes draft statusbar scale widget

References draftutils.init_draft_statusbar.get_scales(), Gui.getMainWindow(), and draftutils.init_draft_statusbar.scale_to_label().

◆ init_draft_statusbar_snap()

def draftutils.init_draft_statusbar.init_draft_statusbar_snap ( )
this function initializes draft statusbar snap widget

References draftutils.init_tools.get_draft_snap_commands(), and Gui.getMainWindow().

◆ init_menu()

def draftutils.init_tools.init_menu (   workbench,
  menu_list,
  cmd_list 
)
Initialize a menu.

Parameters
----------
workbench: Gui.Workbench
    The workbench. The commands from cmd_list must be available.

menu_list: list of strings
    The main and optional submenu(s). The commands, and additional
    submenus (if any), are added to the last (sub)menu in the list.

cmd_list: list of strings or list of strings and tuples
    See f.e. the return value of get_draft_drawing_commands.

◆ init_toolbar()

def draftutils.init_tools.init_toolbar (   workbench,
  toolbar,
  cmd_list 
)
Initialize a toolbar.

Parameters
----------
workbench: Gui.Workbench
    The workbench. The commands from cmd_list must be available.

toolbar: string
    The name of the toolbar.

cmd_list: list of strings or list of strings and tuples
    See f.e. the return value of get_draft_drawing_commands.

◆ is_clone()

def draftutils.utils.is_clone (   obj,
  objtype = None,
  recursive = False 
)
Return True if the given object is a clone of a certain type.

A clone is of type `'Clone'`, and has a reference
to the original object inside its `Objects` attribute,
which is an `'App::PropertyLinkListGlobal'`.

The `Objects` attribute can point to another `'Clone'` object.
If `recursive` is `True`, the function will be called recursively
to further test this clone, until the type of the original object
can be compared to `objtype`.

Parameters
----------
obj : App::DocumentObject
    The clone object that will be tested for a certain type.

objtype : str or list of str
    A type string such as one obtained from `get_type`.
    Or a list of such types.

recursive : bool, optional
    It defaults to `False`.
    If it is `True`, this same function will be called recursively
    with `obj.Object[0]` as input.

    This option only works if `obj.Object[0]` is of type `'Clone'`,
    that is, if `obj` is a clone of a clone.

Returns
-------
bool
    Returns `True` if `obj` is of type `'Clone'`,
    and `obj.Object[0]` is of type `objtype`.

    If `objtype` is a list, then `obj.Objects[0]`
    will be tested against each of the elements in the list,
    and it will return `True` if at least one element matches the type.

    If `obj` isn't of type `'Clone'` but has the `CloneOf` attribute,
    it will also return `True`.

    It returns `False` otherwise, for example,
    if `obj` is not even a clone.

References draftutils.utils.getType, and draftutils.utils.is_clone().

Referenced by draftutils.utils.is_clone().

◆ is_closed_edge()

def draftutils.utils.is_closed_edge (   edge_index,
  object 
)

◆ is_group()

def draftutils.groups.is_group (   obj)
Return True if the given object is considered a group.

Parameters
----------
obj : App::DocumentObject
    The object to check.

Returns
-------
bool
    Returns `True` if `obj` is considered a group:

    The object is derived from `App::DocumentObjectGroup` but not
    a `'LayerContainer'`.

    Or the object is of the type `'Project'`, `'Site'`, `'Building'`,
    `'Floor'`, `'BuildingPart'` or `'Space'` from the Arch Workbench.
    Note that `'Floor'` and `'Building'` are obsolete types.

    Otherwise returns `False`.

Referenced by draftutils.groups.get_group_contents(), and draftutils.groups.get_group_names().

◆ label_to_scale()

def draftutils.init_draft_statusbar.label_to_scale (   label)

◆ load_svg_patterns()

def draftutils.utils.load_svg_patterns ( )
Load the default Draft SVG patterns and user defined patterns.

The SVG patterns are added as a dictionary to the `App.svgpatterns`
attribute.

References importSVG.getContents(), and draftutils.utils.getParam.

◆ load_texture()

def draftutils.gui_utils.load_texture (   filename,
  size = None,
  gui = App.GuiUp 
)
Return a Coin.SoSFImage to use as a texture for a 2D plane.

This function only works if the graphical interface is available
as the visual properties that can be applied to a shape
are attributes of the view provider (`obj.ViewObject`).

Parameters
----------
filename: str
    A path to a pixel image file (PNG) that can be used as a texture
    on the face of an object.

size: tuple of two int, or a single int, optional
    It defaults to `None`.
    If a tuple is given, the two values define the width and height
    in pixels to which the loaded image will be scaled.
    If it is a single value, it is used for both dimensions.

    If it is `None`, the size will be determined from the `QImage`
    created from `filename`.

    CURRENTLY the input `size` parameter IS NOT USED.
    It always uses the `QImage` to determine this information.

gui: bool, optional
    It defaults to the value of `App.GuiUp`, which is `True`
    when the interface exists, and `False` otherwise.

    This value can be set to `False` to simulate
    when the interface is not available.

Returns
-------
coin.SoSFImage
    An image object with the appropriate size, number of components
    (grayscale, grayscale and transparency, color,
    color and transparency), and byte data.

    It returns `None` if the interface is not available,
    or if there is a problem creating the image.

◆ make_format_spec()

def draftutils.units.make_format_spec (   decimals = 4,
  dim = 'Length' 
)
Return a string format specifier with decimals for a dimension.

It is based on the user preferences.

References draftutils.units.get_default_unit().

◆ migrate_text_display_mode()

def draftutils.gui_utils.migrate_text_display_mode (   obj_type = "Text",
  mode = "3D text",
  doc = None 
)
Migrate the display mode of objects of certain type.

◆ precision()

def draftutils.utils.precision ( )
Return the precision value from the parameter database.

It is the number of decimal places that a float will have.
Example
::
    precision=6, 0.123456
    precision=5, 0.12345
    precision=4, 0.1234

Due to floating point operations there may be rounding errors.
Therefore, this precision number is used to round up values
so that all operations are consistent.
By default the precision is 6 decimal places.

Returns
-------
int
    get_param("precision", 6)

References draftutils.utils.get_param(), and draftutils.utils.getParam.

◆ print_header()

def draftutils.utils.print_header (   name,
  description,
  debug = True 
)
Print a line to the console when something is called, and log it.

Parameters
----------
name: str
    The name of the function or class that is being called.
    This `name` will be logged in the log file, so if there are problems
    the log file can be investigated for clues.

description: str
    Arbitrary text that will be printed to the console
    when the function or class is called.

debug: bool, optional
    It defaults to `True`.
    If it is `False` the `description` will not be printed
    to the console.
    On the other hand the `name` will always be logged.

◆ print_shape()

def draftutils.utils.print_shape (   shape)
Print detailed information of a topological shape.

Parameters
----------
shape : Part::TopoShape
    Any topological shape in an object, usually obtained from `obj.Shape`.

◆ remove_hidden()

def draftutils.gui_utils.remove_hidden (   objectslist)
Return only the visible objects in the list.

This function only works if the graphical interface is available
as the `Visibility` attribute is a property of the view provider
(`obj.ViewObject`).

Parameters
----------
objectslist: list of App::DocumentObject
    List of any type of object.

Returns
-------
list
    Return a copy of the input list without those objects
    for which `obj.ViewObject.Visibility` is `False`.

    If the graphical interface is not loaded
    the returned list is just a copy of the input list.

◆ scale_to_label()

def draftutils.init_draft_statusbar.scale_to_label (   scale)
transform a float number into a 1:X or X:1 scale and return it as label

Referenced by draftutils.init_draft_statusbar.init_draft_statusbar_scale(), and draftutils.init_draft_statusbar.label_to_scale().

◆ select()

def draftutils.gui_utils.select (   objs = None,
  gui = App.GuiUp 
)
Unselects everything and selects only the given list of objects.

This function only works if the graphical interface is available
as the selection module only works on the 3D view.

Parameters
----------
objs: list of App::DocumentObject, optional
    It defaults to `None`.
    Any type of scripted object.
    It may be a list of objects or a single object.

gui: bool, optional
    It defaults to the value of `App.GuiUp`, which is `True`
    when the interface exists, and `False` otherwise.

    This value can be set to `False` to simulate
    when the interface is not available.

Referenced by Gui::Flag.contextMenuEvent(), Gui::DocumentItem.findItem(), Gui::DocumentItem.findItemByObject(), MeshGui::ViewProviderMesh.getFacetsOfRegion(), Gui::SoFCColorBar.handleEvent(), Gui::TreeWidget.itemSearch(), Gui::PropertyEditor::LinkLabel.onLinkActivated(), SketcherGui::TaskSketcherConstraints.onSelectionChanged(), SketcherGui::TaskSketcherElements.onSelectionChanged(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage.restoreSelection(), and Gui::DocumentItem.showItem().

◆ set_param()

def draftutils.utils.set_param (   param,
  value 
)
Set a Draft parameter with the given value.

The parameter database is located in the tree
::
    'User parameter:BaseApp/Preferences/Mod/Draft'

In the case that `param` is `'linewidth'` or `'color'` it will set
the View parameters
::
    'User parameter:BaseApp/Preferences/View/DefaultShapeLineWidth'
    'User parameter:BaseApp/Preferences/View/DefaultShapeLineColor'

Parameters
----------
param : str
    A string that indicates a parameter in the parameter database.

value : int, or str, or float, or bool
    The appropriate value of the parameter.
    Depending on `param` and its type, determined with `get_param_type`,
    it sets the appropriate value by calling `ParameterGrp.SetInt`,
    `ParameterGrp.SetString`, `ParameterGrp.SetFloat`,
    `ParameterGrp.SetBool`, or `ParameterGrp.SetUnsinged`.

References draftutils.utils.getParamType.

◆ shapify()

def draftutils.utils.shapify (   obj)
Transform a parametric object into a static, non-parametric shape.

Parameters
----------
obj : App::DocumentObject
    Any type of scripted object.

    This object will be removed, and a non-parametric object
    with the same topological shape (`Part::TopoShape`)
    will be created.

Returns
-------
Part::Feature
    The new object that takes `obj.Shape` as its own.

    Depending on the contents of the Shape, the resulting object
    will be named `'Face'`, `'Solid'`, `'Compound'`,
    `'Shell'`, `'Wire'`, `'Line'`, `'Circle'`,
    or the name returned by `get_real_name(obj.Name)`.

    If there is a problem with `obj.Shape`, it will return `None`,
    and the original object will not be modified.

References draftutils.utils.get_real_name(), and draftutils.utils.getRealName.

◆ show_draft_statusbar()

def draftutils.init_draft_statusbar.show_draft_statusbar ( )
shows draft statusbar if present or initializes it

References Gui.getMainWindow().

◆ string_encode_coin()

def draftutils.utils.string_encode_coin (   ustr)
Encode a unicode object to be used as a string in coin.

Parameters
----------
ustr : str
    A string to be encoded

Returns
-------
str
    Encoded string. If the coin version is >= 4
    it will encode the string to `'utf-8'`, otherwise
    it will encode it to `'latin-1'`.

◆ svg_patterns()

def draftutils.utils.svg_patterns ( )
Return a dictionary with installed SVG patterns.

Returns
-------
dict
    Returns `App.svgpatterns` if it exists.
    Otherwise it calls `load_svg_patterns` to create it
    before returning it.

References draftutils.utils.loadSvgPatterns.

◆ tolerance()

def draftutils.utils.tolerance ( )
Return the tolerance value from the parameter database.

This specifies a tolerance around a quantity.
::
    value + tolerance
    value - tolerance

By default the tolerance is 0.05.

Returns
-------
float
    get_param("tolerance", 0.05)

References draftutils.utils.get_param(), and draftutils.utils.getParam.

Referenced by MeshGui::TaskDecimating.accept(), TechDraw::DrawUtil.angleWithX(), TechDraw::DrawUtil.checkParallel(), AdaptivePath.CleanPath(), Part::TopoShape.common(), Base::BoundBox2d.Contains(), Part::TopoShape.cut(), Sketcher::SketchAnalysis.detectDegeneratedGeometries(), draftutils.utils.epsilon(), TechDraw::DrawViewDimExtent.execute(), geoff_geometry.FEQ(), geoff_geometry.FEQZ(), SMESH_ElementSearcherImpl.FindElementsByPoint(), ReverseEngineeringGui::SegmentationManual::Private.findGeometry(), SMESH_NodeSearcherImpl.FindNearPoint(), GEOMUtils.FixShapeTolerance(), geoff_geometry.FNE(), geoff_geometry.FNEZ(), TechDraw::DrawUtil.fpCompare(), Part::TopoShape.fuse(), Part::TopoShape.generalFuse(), Drawing::ProjectionAlgos.getDXF(), TechDraw::ProjectionAlgos.getDXF(), SMESH_MeshAlgos.GetElementSearcher(), TechDraw::DrawViewDimension.getFormattedDimensionValue(), SMESH_ElementSearcherImpl.GetPointState(), Drawing::ProjectionAlgos.getSVG(), TechDraw::ProjectionAlgos.getSVG(), Base::BoundBox2d.IsEqual(), Base::Vector2d.IsEqual(), TechDraw::DrawUtil.isFirstVert(), TechDraw::DrawUtil.isLastVert(), Base::Vector2d.IsNull(), geoff_geometry.IsPtsLine(), Part::TangentialArc.isRadiusEqual(), TechDraw::DrawUtil.isSamePoint(), TechDraw::DrawUtil.isZeroEdge(), Path::Area.makeSections(), TechDraw::GeometryUtils.nextGeom(), Path::Area.project(), MeshPart::MeshProjection.projectOnMesh(), geoff_geometry::Kurve.Reduce(), Sketcher::SketchAnalysis.removeDegeneratedGeometries(), Part::GeomBSplineCurve.removeKnot(), Part::TopoShape.section(), Part::TopoShape.setFaces(), Part::TopoShape.sewShape(), MeshCore::MeshSimplify.simplify(), Simplify.simplify_mesh(), geoff_geometry.Split(), Part::BSplineCurveBiArcs.toBiArcs(), and Part::GeomBSplineCurve.toBiArcs().

◆ translate()

def draftutils.translate.translate (   context,
  text,
  utf8_decode = False 
)
Translate the text using the Qt translate function.

    It wraps around `QtGui.QApplication.translate`,
    which is the same as `QtCore.QCoreApplication.translate`.

    Parameters
    ----------
    context: str
        In C++ it is typically a class name.
        But it can also be any other string to categorize the translation,
        for example, the name of a workbench, tool, or function
        that is being translated. Usually it will be the name
        of the workbench.

    text: str
        Text that will be translated. It could be a single word,
        a full sentence, paragraph, or multiple paragraphs with new lines.
        Usually the last endline character '\\n'
        that finishes the string doesn't need to be included
        for translation.

    utf8_decode: bool
        It defaults to `False`.
        This must be set to `True` to indicate that the `text`
        is an `'utf8'` encoded string, so it should be returned as such.
        This option is ignored when using Python 3
        as with Python 3 all strings are `'utf8'` by default.

    Returns
    -------
    str
        A unicode string returned by `QtGui.QApplication.translate`.

        If `utf8_decode` is `True`, the resulting string will be encoded
        in `'utf8'`, and a `bytes` object will be returned.
        ::
            Qtranslate = QtGui.QApplication.translate
            return Qtranslate(context, text, None).encode("utf8")

    Unicode strings
    ---------------
    Whether it is Qt4 or Qt5, the `translate` function
    always returns a unicode string.
    The difference is how it handles the input.

    Reference: https://pyside.github.io/docs/pyside/PySide/QtCore/

    In Qt4 the translate function has a 4th parameter to define the encoding
    of the input string.

    >>> QtCore.QCoreApplication.translate(context, text, None, UnicodeUT8)
    >>> QtGui.QApplication.translate(context, text, None, UnicodeUT8)

    Reference: https://doc.qt.io/qtforpython/PySide2/QtCore

    In Qt5 the strings are always assumed unicode, so the 4th parameter
    is for a different use, and it is not used.

    >>> QtCore.QCoreApplication.translate(context, text, None)
    >>> QtGui.QApplication.translate(context, text, None)

References draftutils.translate.Qtranslate.

◆ type_check()

def draftutils.utils.type_check (   args_and_types,
  name = "?" 
)
Check that the arguments are instances of certain types.

Parameters
----------
args_and_types : list
    A list of tuples. The first element of a tuple is tested as being
    an instance of the second element.
    ::
        args_and_types = [(a, Type), (b, Type2), ...]

    Then
    ::
        isinstance(a, Type)
        isinstance(b, Type2)

    A `Type` can also be a tuple of many types, in which case
    the check is done for any of them.
    ::
        args_and_types = [(a, (Type3, int, float)), ...]

        isinstance(a, (Type3, int, float))

name : str, optional
    Defaults to `'?'`. The name of the check.

Raises
------
TypeError
    If the first element in the tuple is not an instance of the second
    element, it raises `Draft.name`.

◆ ungroup()

def draftutils.groups.ungroup (   obj)
Remove the object from any group to which it belongs.

A "group" is any object returned by `get_group_names`.

Parameters
----------
obj: App::DocumentObject or str
    Any type of object.
    If it is a string, it must be the `Label` of that object.
    Since a label is not guaranteed to be unique in a document,
    it will use the first object found with this label.

References draftutils.groups.get_group_names().

◆ use_instead()

def draftutils.utils.use_instead (   function,
  version = "" 
)
Print a deprecation message and suggest another function.

This function must be used inside the definition of a function
that has been considered for deprecation, so we must provide
an alternative.
::
    def old_function():
        use_instead('new_function', 1.0)

    def someFunction():
        use_instead('some_function')

Parameters
----------
function: str
    The name of the function to use instead of the current one.

version: float or str, optional
    It defaults to the empty string `''`.
    The version where this command is to be deprecated, if it is known.
    If we don't know when this command will be deprecated
    then we should not give a version.

References draftutils.utils.use_instead().

Referenced by draftutils.utils.use_instead().

◆ utf8_decode()

def draftutils.utils.utf8_decode (   text)
Decode the input string and return a unicode string.

Python 2:
::
str -> unicode
unicode -> unicode

Python 3:
::
str -> str
bytes -> str

It runs
::
try:
return text.decode("utf-8")
except AttributeError:
return text

Parameters
----------
text : str, unicode or bytes
A str, unicode, or bytes object that may have unicode characters
like accented characters.

In Python 2, a `bytes` object can include accented characters,
but in Python 3 it must only contain ASCII literal characters.

Returns
-------
unicode or str
In Python 2 it will try decoding the `bytes` string
and return a `'utf-8'` decoded string.

>>> "Aá".decode("utf-8")
>>> b"Aá".decode("utf-8")
u'A\xe1'

In Python 2 the unicode string is prefixed with `u`,
and unicode characters are replaced by their two-digit hexadecimal
representation, or four digit unicode escape.

>>> "AáBẃCñ".decode("utf-8")
u'A\xe1B\u1e83C\xf1'

In Python 2 it will always return a `unicode` object.

In Python 3 a regular string is already unicode encoded,
so strings have no `decode` method. In this case, `text`
will be returned as is.

In Python 3, if `text` is a `bytes` object, then it will be converted
to `str`; in this case, the `bytes` object cannot have accents,
it must only contain ASCII literal characters.

>>> b"ABC".decode("utf-8")
'ABC'

In Python 3 it will always return a `str` object, with no prefix.

Referenced by ArchCommands.printWarning(), ArchCommands.survey(), ArchCommands.SurveyTaskPanel.update(), and DraftGui.DraftToolBar.validateFile().

Variable Documentation

◆ ANNOTATION_STYLE

dictionary draftutils.utils.ANNOTATION_STYLE
Initial value:
1= {
2 "FontName": ("font", param.GetString("textfont", "Sans")),
3 "FontSize": ("str", str(param.GetFloat("textheight", 100))),
4 "LineSpacing": ("float", 1),
5 "ScaleMultiplier": ("float", 1),
6 "ShowUnit": ("bool", False),
7 "UnitOverride": ("str", ""),
8 "Decimals": ("int", 2),
9 "ShowLines": ("bool", True),
10 "LineWidth": ("int", param.GetInt("linewidth", 1)),
11 "LineColor": ("color", param.GetInt("color", 255)),
12 "ArrowType": ("index", param.GetInt("dimsymbol", 0)),
13 "ArrowSize": ("str", str(param.GetFloat("arrowsize", 20))),
14 "DimensionOvershoot": ("str", str(param.GetFloat("dimovershoot", 20))),
15 "ExtensionLines": ("str", str(param.GetFloat("extlines", 300))),
16 "ExtensionOvershoot": ("str", str(param.GetFloat("extovershoot", 20))),
17}

◆ ARROW_TYPES

list draftutils.utils.ARROW_TYPES = ["Dot", "Circle", "Arrow", "Tick", "Tick-2"]

◆ arrowtypes

list draftutils.utils.arrowtypes = ARROW_TYPES

◆ compareObjects

def draftutils.utils.compareObjects = compare_objects

◆ dimDash

def draftutils.gui_utils.dimDash = dim_dash

◆ dimSymbol

def draftutils.gui_utils.dimSymbol = dim_symbol

◆ displayExternal

◆ draft_scales_arch_imperial

list draftutils.init_draft_statusbar.draft_scales_arch_imperial
Initial value:
1= ["1/16in=1ft", "3/32in=1ft", "1/8in=1ft",
2 "3/16in=1ft", "1/4in=1ft","3/8in=1ft",
3 "1/2in=1ft", "3/4in=1ft", "1in=1ft",
4 "1.5in=1ft", "3in=1ft",
5 translate("draft", "custom"),
6 ]

◆ draft_scales_eng_imperial

list draftutils.init_draft_statusbar.draft_scales_eng_imperial
Initial value:
1= ["1in=10ft", "1in=20ft", "1in=30ft",
2 "1in=40ft", "1in=50ft", "1in=60ft",
3 "1in=70ft", "1in=80ft", "1in=90ft",
4 "1in=100ft",
5 translate("draft", "custom"),
6 ]

◆ draft_scales_metrics

list draftutils.init_draft_statusbar.draft_scales_metrics
Initial value:
1= ["1:1000", "1:500", "1:250", "1:200", "1:100",
2 "1:50", "1:25","1:20", "1:10", "1:5","1:2",
3 "1:1",
4 "2:1", "5:1", "10:1", "20:1",
5 translate("draft", "custom"),
6 ]

◆ filterObjectsForModifiers

def draftutils.utils.filterObjectsForModifiers = filter_objects_for_modifiers

◆ formatObject

def draftutils.gui_utils.formatObject = format_object

◆ get3DView

def draftutils.gui_utils.get3DView = get_3d_view

◆ getCloneBase

def draftutils.utils.getCloneBase = get_clone_base

◆ getDefaultUnit

def draftutils.units.getDefaultUnit = get_default_unit

◆ getObjectsOfType

◆ getParam

◆ getParamType

def draftutils.utils.getParamType = get_param_type

◆ getRealName

def draftutils.utils.getRealName = get_real_name

◆ getrgb

def draftutils.utils.getrgb = get_rgb

◆ getSelection

◆ getSelectionEx

◆ getType

◆ isClone

def draftutils.utils.isClone = is_clone

◆ isClosedEdge

def draftutils.utils.isClosedEdge = is_closed_edge

◆ loadSvgPatterns

def draftutils.utils.loadSvgPatterns = load_svg_patterns

◆ loadTexture

def draftutils.gui_utils.loadTexture = load_texture

◆ makeFormatSpec

def draftutils.units.makeFormatSpec = make_format_spec

◆ param

draftutils.utils.param = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")

◆ printShape

def draftutils.utils.printShape = print_shape

◆ QT_TRANSLATE_NOOP

draftutils.translate.QT_TRANSLATE_NOOP = QtCore.QT_TRANSLATE_NOOP

Referenced by InspectionGui::VisualInspection.accept(), MeshGui::TaskDecimating.accept(), MeshGui::TaskSmoothing.accept(), PartGui::LoftWidget.accept(), PartGui::SweepWidget.accept(), ReenGui::FitBSplineSurfaceWidget.accept(), ReenGui::PoissonWidget.accept(), TechDrawGui::TaskActiveView.accept(), TechDrawGui::TaskCosmeticLine.accept(), TechDrawGui::TaskCustomizeFormat.accept(), TechDrawGui::TaskWeldingSymbol.accept(), PartDesignGui::DlgActiveBody.accept(), StdCmdDelete.activated(), StdCmdLinkMakeGroup.activated(), StdCmdLinkMake.activated(), StdCmdLinkMakeRelative.activated(), StdCmdLinkImport.activated(), StdCmdLinkImportAll.activated(), StdCmdMeasurementSimple.activated(), StdCmdTextDocument.activated(), StdCmdPart.activated(), StdCmdGroup.activated(), CmdSketcherConstrainHorizontal.activated(), CmdSketcherConstrainVertical.activated(), CmdSketcherConstrainLock.activated(), CmdSketcherConstrainBlock.activated(), CmdSketcherConstrainCoincident.activated(), CmdSketcherConstrainDistance.activated(), CmdSketcherConstrainPointOnObject.activated(), CmdSketcherConstrainDistanceX.activated(), CmdSketcherConstrainDistanceY.activated(), CmdSketcherConstrainParallel.activated(), CmdSketcherConstrainPerpendicular.activated(), CmdSketcherConstrainTangent.activated(), CmdSketcherConstrainRadius.activated(), CmdSketcherConstrainDiameter.activated(), CmdSketcherConstrainRadiam.activated(), CmdSketcherConstrainAngle.activated(), CmdSketcherConstrainEqual.activated(), CmdSketcherConstrainSymmetric.activated(), ArchPanel.CommandPanelSheet.Activated(), ArchStructure.CommandStructuralSystem.Activated(), draftobjects.draft_annotation.DraftAnnotation.add_missing_properties_0v19(), PathScripts.PathOp.ObjectOp.addBaseProperty(), TechDrawGui::TaskCosVertex.addCosVertex(), PathScripts.PathOp.ObjectOp.addOpValues(), ArchStructure.StructSelectionObserver.addSelection(), Gui::ManualAlignment.align(), SpreadsheetGui::PropertiesDialog.apply(), CmdSketcherConstrainHorizontal.applyConstraint(), CmdSketcherConstrainVertical.applyConstraint(), CmdSketcherConstrainLock.applyConstraint(), CmdSketcherConstrainBlock.applyConstraint(), CmdSketcherConstrainCoincident.applyConstraint(), CmdSketcherConstrainDistance.applyConstraint(), CmdSketcherConstrainPointOnObject.applyConstraint(), CmdSketcherConstrainDistanceX.applyConstraint(), CmdSketcherConstrainDistanceY.applyConstraint(), CmdSketcherConstrainParallel.applyConstraint(), CmdSketcherConstrainPerpendicular.applyConstraint(), CmdSketcherConstrainTangent.applyConstraint(), CmdSketcherConstrainRadius.applyConstraint(), CmdSketcherConstrainDiameter.applyConstraint(), CmdSketcherConstrainRadiam.applyConstraint(), CmdSketcherConstrainAngle.applyConstraint(), CmdSketcherConstrainEqual.applyConstraint(), CmdSketcherConstrainSymmetric.applyConstraint(), PathScripts.PathProfile.ObjectProfile.areaOpProperties(), ArchWall.areSameWallTypes(), draftobjects.bspline.BSpline.assureProperties(), Sketcher::SketchAnalysis.autoconstraint(), TechDrawGui::QGIViewBalloon.balloonLabelDragFinished(), ArchSite.Compass.buildCoordinates(), MeshGui::ViewProviderMesh.clipMeshCallback(), ArchSectionPlane.closeViewer(), Gui::Dialog::TransformStrategy.commitTransform(), ArchBuildingPart.convertFloors(), TechDrawGui::TaskRichAnno.createAnnoFeature(), SketcherGui::DrawSketchHandler.createAutoConstraints(), TechDrawGui::QGSPage.createBalloon(), TechDrawGui::TaskCenterLine.createCenterLine(), TechDrawGui::TaskCosmeticLine.createCosmeticLine(), TechDrawGui::TaskDetail.createDetail(), TechDrawGui::TaskHatch.createHatch(), TechDrawGui::TaskLeaderLine.createLeaderFeature(), ArchEquipment.createMeshView(), TechDrawGui::TaskSectionView.createSectionView(), ReverseEngineeringGui::SegmentationManual.createSegment(), Gui::PointMarker.customEvent(), PointsGui::ViewProviderScattered.cut(), PointsGui::ViewProviderStructured.cut(), MeshGui::MeshSplit.cutMesh(), TechDrawGui::QGIViewDimension.datumLabelDragFinished(), MeshGui::RemoveComponents.deleteSelection(), SpreadsheetGui::SheetTableView.deleteSelection(), SketcherGui::ViewProviderSketch.editDoubleClicked(), PathScripts.PathToolController.ToolController.ensureUseLegacyTool(), TechDrawGui.execHoleCircle(), draftobjects.bspline.BSpline.execute(), draftobjects.ellipse.Ellipse.execute(), Sketcher::SketchObject.fillet(), MeshGui::ViewProviderMesh.fillHole(), draftviewproviders.view_wire.ViewProviderWire.flatten(), draftutils.init_tools.get_draft_drawing_commands(), draftutils.init_tools.get_draft_modification_commands(), Part::FaceMakerSimple.getBriefExplanation(), Part::FaceMakerBullseye.getBriefExplanation(), Part::FaceMakerCheese.getBriefExplanation(), Part::FaceMakerExtrusion.getBriefExplanation(), InitGui.ArchWorkbench.GetClassName(), InitGui.DraftWorkbench.GetClassName(), ArchMaterial.getDocumentMaterials(), ArchBuildingPart.CommandBuildingPart.GetResources(), ArchCurtainWall.CommandArchCurtainWall.GetResources(), ArchGrid.CommandArchGrid.GetResources(), ArchPanel.CommandPanel.GetResources(), ArchPanel.CommandPanelCut.GetResources(), ArchPanel.CommandPanelSheet.GetResources(), ArchPanel.CommandNest.GetResources(), ArchPanel.CommandPanelGroup.GetResources(), ArchProfile.Arch_Profile.GetResources(), ArchSchedule.CommandArchSchedule.GetResources(), ArchTruss.CommandArchTruss.GetResources(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.GetResources(), draftguitools.gui_arcs.Arc.GetResources(), draftguitools.gui_arcs.Arc_3Points.GetResources(), draftguitools.gui_arcs.ArcGroup.GetResources(), draftguitools.gui_array_simple.Array.GetResources(), draftguitools.gui_array_simple.LinkArray.GetResources(), draftguitools.gui_arrays.ArrayGroup.GetResources(), draftguitools.gui_beziers.BezCurve.GetResources(), draftguitools.gui_beziers.CubicBezCurve.GetResources(), draftguitools.gui_beziers.BezierGroup.GetResources(), draftguitools.gui_circles.Circle.GetResources(), draftguitools.gui_circulararray.CircularArray.GetResources(), draftguitools.gui_clone.Clone.GetResources(), draftguitools.gui_dimension_ops.FlipDimension.GetResources(), draftguitools.gui_dimensions.Dimension.GetResources(), draftguitools.gui_downgrade.Downgrade.GetResources(), draftguitools.gui_draft2sketch.Draft2Sketch.GetResources(), draftguitools.gui_drawing.Drawing.GetResources(), draftguitools.gui_ellipses.Ellipse.GetResources(), draftguitools.gui_facebinders.Facebinder.GetResources(), draftguitools.gui_fillets.Fillet.GetResources(), draftguitools.gui_grid.ToggleGrid.GetResources(), draftguitools.gui_groups.AddToGroup.GetResources(), draftguitools.gui_groups.SelectGroup.GetResources(), draftguitools.gui_groups.SetAutoGroup.GetResources(), draftguitools.gui_groups.AddToConstruction.GetResources(), draftguitools.gui_groups.AddNamedGroup.GetResources(), draftguitools.gui_hatch.Draft_Hatch.GetResources(), draftguitools.gui_heal.Heal.GetResources(), draftguitools.gui_join.Join.GetResources(), draftguitools.gui_labels.Label.GetResources(), draftguitools.gui_layers.Layer.GetResources(), draftguitools.gui_line_add_delete.AddPoint.GetResources(), draftguitools.gui_line_add_delete.DelPoint.GetResources(), draftguitools.gui_lines.Line.GetResources(), draftguitools.gui_lines.Wire.GetResources(), draftguitools.gui_lineslope.LineSlope.GetResources(), draftguitools.gui_mirror.Mirror.GetResources(), draftguitools.gui_move.Move.GetResources(), draftguitools.gui_offset.Offset.GetResources(), draftguitools.gui_orthoarray.OrthoArray.GetResources(), draftguitools.gui_patharray.PathArray.GetResources(), draftguitools.gui_patharray.PathLinkArray.GetResources(), draftguitools.gui_pathtwistedarray.PathTwistedArray.GetResources(), draftguitools.gui_pathtwistedarray.PathTwistedLinkArray.GetResources(), draftguitools.gui_planeproxy.Draft_WorkingPlaneProxy.GetResources(), draftguitools.gui_pointarray.PointArray.GetResources(), draftguitools.gui_pointarray.PointLinkArray.GetResources(), draftguitools.gui_points.Point.GetResources(), draftguitools.gui_polararray.PolarArray.GetResources(), draftguitools.gui_polygons.Polygon.GetResources(), draftguitools.gui_rectangles.Rectangle.GetResources(), draftguitools.gui_rotate.Rotate.GetResources(), draftguitools.gui_scale.Scale.GetResources(), draftguitools.gui_selectplane.Draft_SelectPlane.GetResources(), draftguitools.gui_shape2dview.Shape2DView.GetResources(), draftguitools.gui_shapestrings.ShapeString.GetResources(), draftguitools.gui_snaps.Draft_Snap_Lock.GetResources(), draftguitools.gui_snaps.Draft_Snap_Midpoint.GetResources(), draftguitools.gui_snaps.Draft_Snap_Perpendicular.GetResources(), draftguitools.gui_snaps.Draft_Snap_Grid.GetResources(), draftguitools.gui_snaps.Draft_Snap_Intersection.GetResources(), draftguitools.gui_snaps.Draft_Snap_Parallel.GetResources(), draftguitools.gui_snaps.Draft_Snap_Endpoint.GetResources(), draftguitools.gui_snaps.Draft_Snap_Angle.GetResources(), draftguitools.gui_snaps.Draft_Snap_Center.GetResources(), draftguitools.gui_snaps.Draft_Snap_Extension.GetResources(), draftguitools.gui_snaps.Draft_Snap_Near.GetResources(), draftguitools.gui_snaps.Draft_Snap_Ortho.GetResources(), draftguitools.gui_snaps.Draft_Snap_Special.GetResources(), draftguitools.gui_snaps.Draft_Snap_Dimensions.GetResources(), draftguitools.gui_snaps.Draft_Snap_WorkingPlane.GetResources(), draftguitools.gui_snaps.ShowSnapBar.GetResources(), draftguitools.gui_splines.BSpline.GetResources(), draftguitools.gui_split.Split.GetResources(), draftguitools.gui_stretch.Stretch.GetResources(), draftguitools.gui_styles.ApplyStyle.GetResources(), draftguitools.gui_subelements.SubelementHighlight.GetResources(), draftguitools.gui_texts.Text.GetResources(), draftguitools.gui_togglemodes.ToggleConstructionMode.GetResources(), draftguitools.gui_togglemodes.ToggleContinueMode.GetResources(), draftguitools.gui_togglemodes.ToggleDisplayMode.GetResources(), draftguitools.gui_trimex.Trimex.GetResources(), draftguitools.gui_upgrade.Upgrade.GetResources(), draftguitools.gui_wire2spline.WireToBSpline.GetResources(), MeshFlatteningCommand.CreateFlatMesh.GetResources(), MeshFlatteningCommand.CreateFlatFace.GetResources(), PathScripts.PathArray.CommandPathArray.GetResources(), PathScripts.PathCamoticsGui.CommandCamoticsSimulate.GetResources(), PathScripts.PathComment.CommandPathComment.GetResources(), PathScripts.PathCopy.CommandPathCopy.GetResources(), PathScripts.PathDressupAxisMap.CommandPathDressup.GetResources(), PathScripts.PathDressupDogbone.CommandDressupDogbone.GetResources(), PathScripts.PathDressupDragknife.CommandDressupDragknife.GetResources(), PathScripts.PathDressupLeadInOut.CommandPathDressupLeadInOut.GetResources(), PathScripts.PathDressupPathBoundaryGui.CommandPathDressupPathBoundary.GetResources(), PathScripts.PathDressupRampEntry.CommandPathDressupRampEntry.GetResources(), PathScripts.PathDressupTagGui.CommandPathDressupTag.GetResources(), PathScripts.PathDressupZCorrect.CommandPathDressup.GetResources(), PathScripts.PathFixture.CommandPathFixture.GetResources(), PathScripts.PathHop.CommandPathHop.GetResources(), PathScripts.PathInspect.CommandPathInspect.GetResources(), PathScripts.PathOpGui.CommandSetStartPoint.GetResources(), PathScripts.PathPlane.CommandPathPlane.GetResources(), PathScripts.PathPost.CommandPathPost.GetResources(), PathScripts.PathSanity.CommandPathSanity.GetResources(), PathScripts.PathSimpleCopy.CommandPathSimpleCopy.GetResources(), PathScripts.PathStop.CommandPathStop.GetResources(), PathScripts.PathToolBitCmd.CommandToolBitSave.GetResources(), PathScripts.PathToolControllerGui.CommandPathToolController.GetResources(), PathScripts.PathToolLibraryEditor.CommandToolLibraryEdit.GetResources(), Gui::ViewProviderDocumentObject.getTransactionText(), Part::FaceMakerSimple.getUserFriendlyName(), Part::FaceMakerBullseye.getUserFriendlyName(), Part::FaceMakerCheese.getUserFriendlyName(), Part::FaceMakerExtrusion.getUserFriendlyName(), PartDesign::Helix.Helix(), Gui::Application.importFrom(), PathScripts.PathPocketBase.ObjectPocket.initAreaOp(), PathScripts.PathDrilling.ObjectDrilling.initCircularHoleOperation(), PathScripts.PathHelix.ObjectHelix.initCircularHoleOperation(), PathScripts.PathThreadMilling.ObjectThreadMilling.initCircularHoleOperation(), InitGui.OpenSCADWorkbench.Initialize(), InitGui.PathWorkbench.Initialize(), PathScripts.PathFeatureExtensions.initialize_properties(), PathScripts.PathAdaptive.PathAdaptive.initOperation(), PathScripts.PathAreaOp.ObjectOp.initOperation(), PathScripts.PathCircularHoleBase.ObjectOp.initOperation(), PathScripts.PathCustom.ObjectCustom.initOperation(), PathScripts.PathDeburr.ObjectDeburr.initOperation(), PathScripts.PathEngrave.ObjectEngrave.initOperation(), PathScripts.PathProbe.ObjectProbing.initOperation(), PathScripts.PathVcarve.ObjectVcarve.initOperation(), PathScripts.PathMillFace.ObjectFace.initPocketOp(), PathScripts.PathPocket.ObjectPocket.initPocketOp(), PathScripts.PathPocketShape.ObjectPocket.initPocketOp(), Sketcher::SketchObject.insertBSplineKnot(), SpreadsheetGui::SheetTableView.insertColumns(), SpreadsheetGui::SheetTableView.insertColumnsAfter(), SpreadsheetGui::SheetTableView.insertRows(), SpreadsheetGui::SheetTableView.insertRowsAfter(), ArchSchedule.CommandArchSchedule.IsActive(), draftobjects.draftlink.DraftLink.linkSetup(), Gui::MainWindow.MainWindow(), ArchAxis.makeAxis(), ArchAxisSystem.makeAxisSystem(), ArchBuilding.makeBuilding(), ArchBuildingPart.makeBuilding(), ArchFloor.makeFloor(), ArchFrame.makeFrame(), Sketcher::SketchAnalysis.makeMissingEquality(), Sketcher::SketchAnalysis.makeMissingPointOnPointCoincident(), Sketcher::SketchAnalysis.makeMissingVerticalHorizontal(), ArchPipe.makePipeConnector(), ArchStairs.makeRailing(), ArchRebar.makeRebar(), ArchRoof.makeRoof(), MeshGui::ViewProviderMesh.markPartCallback(), Sketcher::SketchObject.modifyBSplineKnotMultiplicity(), SketcherGui::ViewProviderSketch.mouseButtonPressed(), SketcherGui::TaskSketcherConstraints.on_listWidgetConstraints_itemChanged(), MeshGui::DlgEvaluateMeshImp.on_repairAllTogether_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairDegeneratedButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairDuplicatedFacesButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairDuplicatedPointsButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairFoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairIndicesButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairNonmanifoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairOrientationButton_clicked(), MeshGui::DlgEvaluateMeshImp.on_repairSelfIntersectionButton_clicked(), draftobjects.pointarray.PointArray.onDocumentRestored(), PathScripts.PathArray.ObjectArray.onDocumentRestored(), PathScripts.PathJob.ObjectJob.onDocumentRestored(), PathScripts.PathOp.ObjectOp.onDocumentRestored(), PathScripts.PathSetupSheet.SetupSheet.onDocumentRestored(), PathScripts.PathToolBit.ToolBit.onDocumentRestored(), SpreadsheetGui::SheetView.onMsg(), SketcherGui::DrawSketchHandlerCarbonCopy.onSelectionChanged(), SketcherGui::DrawSketchHandlerExternal.onSelectionChanged(), PartGui::TaskDlgAttacher.open(), PartGui::FaceColors.open(), PathScripts.PathAreaOp.ObjectOp.opOnDocumentRestored(), PathScripts.PathHelix.ObjectHelix.opOnDocumentRestored(), PathScripts.PathPocketBase.ObjectPocket.opOnDocumentRestored(), PathScripts.PathSurface.ObjectSurface.opPropertyDefinitions(), PathScripts.PathWaterline.ObjectWaterline.opPropertyDefinitions(), MeshGui::ViewProviderMesh.partMeshCallback(), StdCmdExpression.pasteExpressions(), TechDrawTools.TaskMoveView.TaskMoveView.pickFromPage(), TechDrawTools.TaskShareView.TaskShareView.pickFromPage(), TechDrawTools.TaskMoveView.TaskMoveView.pickToPage(), TechDrawTools.TaskShareView.TaskShareView.pickToPage(), TechDrawTools.TaskMoveView.TaskMoveView.pickView(), TechDrawTools.TaskShareView.TaskShareView.pickView(), SketcherGui::DrawSketchHandlerBSpline.pressButton(), Gui::PropertyEditor::PropertyEnumItem.PropertyEnumItem(), Gui::PropertyEditor::PropertyItem.propertyName(), Gui::PropertyEditor::PropertyPlacementItem.PropertyPlacementItem(), Gui::PropertyEditor::PropertyRotationItem.PropertyRotationItem(), ArchWindow.recolorize(), DrawSketchHandlerCoincident.releaseButton(), DrawSketchHandlerBSplineInsertKnot.releaseButton(), DrawSketchHandlerCopy.releaseButton(), DrawSketchHandlerRectangularArray.releaseButton(), SketcherGui::DrawSketchHandlerArc.releaseButton(), SketcherGui::DrawSketchHandler3PointArc.releaseButton(), SketcherGui::DrawSketchHandlerArcOfEllipse.releaseButton(), SketcherGui::DrawSketchHandlerCircle.releaseButton(), SketcherGui::DrawSketchHandler3PointCircle.releaseButton(), SketcherGui::DrawSketchHandlerExtend.releaseButton(), SketcherGui::DrawSketchHandlerFillet.releaseButton(), SketcherGui::DrawSketchHandlerLine.releaseButton(), SketcherGui::DrawSketchHandlerLineSet.releaseButton(), SketcherGui::DrawSketchHandlerPoint.releaseButton(), SketcherGui::DrawSketchHandlerRegularPolygon.releaseButton(), SketcherGui::DrawSketchHandlerBox.releaseButton(), SketcherGui::DrawSketchHandlerOblong.releaseButton(), SketcherGui::DrawSketchHandlerSlot.releaseButton(), SketcherGui::DrawSketchHandlerSplitting.releaseButton(), SketcherGui::DrawSketchHandlerTrimming.releaseButton(), SketcherGui::DrawSketchHandlerArcOfHyperbola.releaseButton(), SketcherGui::DrawSketchHandlerArcOfParabola.releaseButton(), SpreadsheetGui::SheetTableView.removeColumns(), SpreadsheetGui::SheetTableView.removeRows(), ArchSpace.removeSpaceBoundaries(), TechDrawGui::MDIViewPage.saveDXF(), MeshGui::ViewProviderMesh.segmMeshCallback(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.set_annotation_properties(), draftobjects.array.Array.set_circular_properties(), draftobjects.array.Array.set_general_properties(), draftviewproviders.view_dimension.ViewProviderDimensionBase.set_graphics_properties(), draftviewproviders.view_draft_annotation.ViewProviderDraftAnnotation.set_graphics_properties(), draftviewproviders.view_label.ViewProviderLabel.set_graphics_properties(), draftobjects.label.Label.set_label_properties(), draftobjects.label.Label.set_leader_properties(), draftobjects.array.Array.set_link_properties(), draftobjects.array.Array.set_ortho_properties(), draftviewproviders.view_layer.ViewProviderLayer.set_override_options(), draftobjects.array.Array.set_polar_circular_properties(), draftobjects.array.Array.set_polar_properties(), draftobjects.dimension.DimensionBase.set_properties(), draftobjects.dimension.LinearDimension.set_properties(), draftobjects.dimension.AngularDimension.set_properties(), draftobjects.layer.Layer.set_properties(), draftobjects.pointarray.PointArray.set_properties(), draftobjects.text.Text.set_properties(), draftviewproviders.view_text.ViewProviderText.set_properties(), draftobjects.label.Label.set_target_properties(), draftviewproviders.view_dimension.ViewProviderDimensionBase.set_text_properties(), draftviewproviders.view_label.ViewProviderLabel.set_text_properties(), draftviewproviders.view_dimension.ViewProviderDimensionBase.set_units_properties(), draftviewproviders.view_layer.ViewProviderLayer.set_visual_properties(), SpreadsheetGui::WorkbenchHelper.setBackgroundColor(), draftviewproviders.view_base.ViewProviderDraft.setEdit(), SpreadsheetGui::WorkbenchHelper.setForegroundColor(), ArchMaterial.MultiMaterialDelegate.setModelData(), ArchProfile.Arch_Profile.setPreset(), ArchBuildingPart.BuildingPart.setProperties(), ArchComponent.Component.setProperties(), ArchCurtainWall.CurtainWall.setProperties(), ArchGrid.ArchGrid.setProperties(), ArchPanel.PanelView.setProperties(), ArchPanel.PanelCut.setProperties(), ArchPanel.PanelSheet.setProperties(), ArchReference.ArchReference.setProperties(), ArchTruss.Truss.setProperties(), draftobjects.hatch.Hatch.setProperties(), draftobjects.shape2dview.Shape2DView.setProperties(), ArchBuildingPart.ViewProviderBuildingPart.setProperties(), ArchComponent.ViewProviderComponent.setProperties(), ArchPanel.ViewProviderPanelCut.setProperties(), ArchPanel.ViewProviderPanelSheet.setProperties(), ArchReference.ViewProviderArchReference.setProperties(), ArchStructure.StructureTaskPanel.setToolFromSelection(), PathScripts.PathEngrave.ObjectEngrave.setupAdditionalProperties(), PathScripts.PathVcarve.ObjectVcarve.setupAdditionalProperties(), PathScripts.PathJob.ObjectJob.setupBaseModel(), PathScripts.PathJob.ObjectJob.setupSetupSheet(), PathScripts.PathStock.SetupStockObject(), PathScripts.PathJob.ObjectJob.setupToolTable(), CmdSketcherConstrainTangent.substituteConstraintCombinations(), CmdSketcherConstrainCoincident.substituteConstraintCombinations(), SketcherGui::ConstraintView.swapNamedOfSelectedItems(), MeshGui::MeshSplit.trimMesh(), MeshGui::ViewProviderMesh.trimMeshCallback(), TechDrawGui::TaskRichAnno.updateAnnoFeature(), TechDrawGui::TaskDetail.updateDetail(), TechDrawGui::TaskHatch.updateHatch(), TechDrawGui::TaskLeaderLine.updateLeaderFeature(), TechDrawGui::TaskSectionView.updateSectionView(), Gui::ViewProviderOrigin.ViewProviderOrigin(), Gui::ViewProviderOriginFeature.ViewProviderOriginFeature(), SandboxGui::Workbench.Workbench(), ArchBuildingPart.ViewProviderBuildingPart.writeCamera(), draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeCamera(), and draftviewproviders.view_wpproxy.ViewProviderWorkingPlaneProxy.writeState().

◆ Qtranslate

draftutils.translate.Qtranslate = QtCore.QCoreApplication.translate

◆ removeHidden

def draftutils.gui_utils.removeHidden = remove_hidden

◆ setParam

def draftutils.utils.setParam = set_param

◆ stringencodecoin

def draftutils.utils.stringencodecoin = string_encode_coin

◆ svgpatterns

def draftutils.utils.svgpatterns = svg_patterns

◆ todo

◆ typecheck

def draftutils.utils.typecheck = type_check