FreeCAD: master 692fa7e7

Author Committer Branch Timestamp Parent
vocx-fc yorik master 2019-11-02 05:55:32 master 5143369f
Changeset Draft: new module for utility functions

Many auxiliary tools used by `Draft.py` can be defined
in another module. Many functions are moved to this module
so that `Draft.py` isn't as big and hard to maintain.

The following is a list of functions and attributes that were moved:
`stringencodecoin`, `arrowtypes`, `typecheck`,
`getParamType`, `getParam`, `setParam`, `precision`,
`tolerance`, `epsilon`, `getRealName`, `getType`,
`getObjectsOfType`, `isClone`, `getGroupNames`,
`ungroup`, `shapify`, `getGroupContents`,
`printShape`, `compareObjects`, `loadSvgPatterns`,
`svgpatterns`, `getMovableChildren`, `getWindows`,
`utf8_decode`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines, particularly
the use of `snake_case`. For example, `getGroupNames`
is now `get_group_names`; `getMovableChildren`
is now `get_movable_children`.

Aliases are provided for the old names so that
other functions and classes that depend on these
won't break. The new names should be the official
programming interface, while the old names
should be deprecated at some point in the future.
mod - src/Mod/Draft/CMakeLists.txt Diff File
mod - src/Mod/Draft/Draft.py Diff File
mod - src/Mod/Draft/DraftGui.py Diff File
add - src/Mod/Draft/draftutils/__init__.py Diff File
add - src/Mod/Draft/draftutils/utils.py Diff File