Commit Graph

17 Commits

Author SHA1 Message Date
hlg
0759436661 Arch/Draft: minor fixes 2020-06-03 14:50:17 +02:00
vocx-fc
c5193ec6f7 Draft: add use_instead function to warn users about old functions
This can be used to deprecate older definitions
and suggest users to try a different function. This will be used
in the make functions in `draftmake`.
2020-06-02 12:29:50 +02:00
vocx-fc
78d7616ddc Draft: add find_object function to find objects by label in a document
Also add `find_doc` to be able to test the existence of an
active document before searching for the object.

These can be used in the make functions of most modifier commands.
2020-06-02 12:29:50 +02:00
vocx-fc
fea82942d3 Draft: clean up the utils module a bit, PEP8, style 2020-06-02 12:29:50 +02:00
Yorik van Havre
43c4f9af3d Draft: Added a border around the Draft grid (can be disabled in prefs) 2020-05-27 18:02:04 +02:00
carlopav
2c4de88132 Draft: moved ConvertDraftText to utils.py 2020-05-15 14:43:26 +02:00
carlopav
b1e2574f1c Draft: move get_DXF to utils.py 2020-05-15 14:43:26 +02:00
carlopav
3a44b4e2c0 Draft: moved getrgb to utils.py 2020-05-15 14:43:26 +02:00
carlopav
64619a615a Draft: Bugfix to getCloneBase after objects splitting 2020-05-12 10:37:20 +02:00
carlopav
ad0a400da2 Draft: split isClosedEdge form Draft.py
.
2020-05-04 10:51:08 +02:00
carlopav
8157b86629 Draft: split FilterObjectsForModifiers from Draft.py 2020-05-04 10:51:08 +02:00
vocx-fc
4d0c0d2d73 Draft: parameters to control array options in the task panel
Use the value of the parameters `Draft_array_fuse`
and `Draft_array_Link` to set the default value
of the `Fuse` and `Link array` checkboxes in the task panels.
These default to `False` and `True`, respectively.

Whenever the user toggles a checkbox
the new value of the parameter is stored so that when
the command is used again the last state of the checkbox
is remembered.
2020-04-10 13:19:22 +02:00
vocx-fc
4c806caeb9 Draft: utils, add function to log calls 2020-04-08 11:08:29 +02:00
vocx-fc
e9742da7d8 Draft: utils.py clean up header and imports
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
2020-04-07 18:12:06 +02:00
luz.paz
180805c55e Fix typos
Found via  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-03-06 14:50:35 +01:00
carlopav
d7a13d1a97 [Draft] get_group_contents removed App::Part
Removed App::Part from get_group_contents because it result in double movements of Part objects
2020-01-09 14:45:58 +01:00
vocx-fc
692fa7e702 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.
2020-01-08 15:16:55 +01:00