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.
This commit is contained in:
0
src/Mod/Draft/draftutils/__init__.py
Normal file
0
src/Mod/Draft/draftutils/__init__.py
Normal file
1048
src/Mod/Draft/draftutils/utils.py
Normal file
1048
src/Mod/Draft/draftutils/utils.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user