Commit Graph

51 Commits

Author SHA1 Message Date
Yorik van Havre
5b3fea59e0 Draft: Annotation editor 2020-04-22 13:38:17 +02:00
carlopav
18cfafeed8 Draft: reintroduced grid button in snap toolbar 2020-04-22 12:14:23 +02:00
carlopav
c857754460 [Draft] Further cleanup of the branch
thanks to vocx revisions
2020-04-20 12:38:06 +02:00
carlopav
be75f4febc [Draft] Statusbar widgets, preferences to disable draft statusba
.


.


.


.
2020-04-20 12:38:06 +02:00
carlopav
a23224da88 [Draft] Added Draft Snap Statusbar
.
2020-04-20 12:38:06 +02:00
carlopav
55e537d79d [Draft] Improved Snapper Toolbar Behaviour
Changed snap toolbar behaviour:
- create a list of available snaps (Gui.Snapper.snaps)
- make it consistent with Snap Gui Commands (in gui_snaps module)
- create a list of active snaps (Gui.Snapper.active_snaps)
- refactor the isEnabled() method to allow it to check if the given snap is in Gui.Snapper.active_snaps and not if the snap toolbar button isChecked()
- updated and reordered the new list of gui snap commands in draftutils.init_tools and used it as a base to refactor the creation of draft toolbar
- updated all the draft snap gui tools to make them control the toolbar buttons directly
.


.


.
2020-04-20 12:38:06 +02:00
vocx-fc
1f3a88f1ce Draft: move Draft_AddConstruction to gui_groups module
Also add a new icon for adding to the construction group.
2020-04-16 11:40:58 +02:00
vocx-fc
60f3155651 Draft: move Draft_Slope to gui_lineslope module
The class name was renamed to `LineSlope` as it is fundamentally
inteded to control slopes of lines.
2020-04-16 11:40:58 +02:00
vocx-fc
8aeb33f203 Draft: move Draft_FlipDimension to gui_dimension_ops module 2020-04-16 11:40:58 +02:00
vocx-fc
ed55c6e824 Draft: move Draft_Heal to gui_heal module 2020-04-16 11:40:58 +02:00
vocx-fc
ef3ad5121b Draft: move SelectGroup command to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
d05a786e57 Draft: move AddToGroup command to gui_groups module 2020-04-16 11:40:58 +02:00
vocx-fc
8d94a0e334 Draft: new utility toolbar with some useful commands
These commands are useful but are "hiden"
inside the "Utilities" menu, so not many poeple know about them.
By placing them in a toolbar, they will be more discoverable.
2020-04-16 11:40:58 +02:00
carlopav
e3ea589d5c [Draft] Annotation scale, support for imperial custom scale input
Added support for different scale list
2020-04-16 11:37:10 +02:00
carlopav
08d949b088 [Draft] Rearrange annotation properties groups
ref. https://forum.freecadweb.org/viewtopic.php?f=23&t=43795&p=373731#p373731
bugfix
2020-04-16 11:37:10 +02:00
carlopav
ff3bdf86bc [Draft] Improved Autogroup to handle Draft Annotations
Draft Dimension, Label and Text are now correctly auto-added to Part container
2020-04-16 11:37:10 +02:00
carlopav
e65c61036b [Draft] Annotation scale support and statusbar widget
Initial commit
Preliminary support for Draft Dimensions


[Draft] Statusbar Widget code cleanup
2020-04-16 11:37:10 +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
cb7bf768c8 Draft: add WorkingPlaneProxy button to the toolbar
We also rename it from `Draft_SetWorkingPlaneProxy`
to `Draft_WorkingPlaneProxy` as we want to indicate a new object
is created.
2020-04-09 11:41:45 +02:00
vocx-fc
4c806caeb9 Draft: utils, add function to log calls 2020-04-08 11:08:29 +02:00
vocx-fc
a101e911f9 Draft: gui_utils, add small stylistic changes
These changes are added by carlopav in pull request #3102.
We add them in this commit already so that this branch and
that branch are easier to rebase and merge.
2020-04-07 18:12:06 +02:00
vocx-fc
7a6b586a66 Draft: move ShapeString to the creation tools
Previously it was placed in the `annotation` category
but since it creates a group of shapes, it is better
in the `creation` category.

Also small fixes in the menu text and tooltip.
2020-04-07 18:12:06 +02:00
vocx-fc
691a3cdf08 Draft: gui_utils, autogroup return when GuiUp is False 2020-04-07 18:12:06 +02:00
vocx-fc
932938e36f Draft: clean up init_tools and messages 2020-04-07 18:12:06 +02:00
vocx-fc
f33dcf69db Draft: todo.py clean up header, imports and messages
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.

Use two `DEBUG` variables to print information about
the `ToDo` class in order to see the scheduled commands
when the graphical commands are executed.
2020-04-07 18:12:06 +02:00
vocx-fc
3b6c06d095 Draft: gui_utils.py clean up 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
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
vocx-fc
d1c0f2f2f0 Draft: docstrings for the submodules 2020-04-07 18:12:06 +02:00
carlopav
115d4b0d08 [Draft] Reordering Modifiers toolbar 2020-03-24 11:17:48 +01:00
vocx-fc
9eeceb4f28 Draft: improve the README files with links 2020-03-19 12:11:16 -03:00
carlopav
8fd55eb6ff [Draft] Remove AddPoint and DelPoint commands from UI
[Draft] Edit: Remove Bezcurve interface from Edit Ui


[Draft] Edit: cleanup


small improvement to tooltip
2020-03-12 09:11:34 -03: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
vocx-fc
b8f459db3e Draft: translate functions with the context set to Draft 2020-03-02 11:45:27 -03:00
vocx-fc
9dc24a9d4d Draft, Arch: group the array tools 2020-03-02 11:41:22 -03:00
vocx-fc
a76bc63e4d Draft: angle dimension icon saved as plain SVG
As discussed in the previous request, the icon
is saved as Plain SVG, meaning that Inkscape-specific tags
are removed. This is better for compatibility purposes
for use with other SVG editors and viewers.
2020-02-15 19:33:23 +01:00
vocx-fc
814c97b70d Draft: standardized module to build messages 2020-02-10 11:12:45 +01:00
vocx-fc
a80ba25896 Draft: disable the excessive output in the ToDo class 2020-02-10 11:09:10 +01:00
vocx-fc
01df7c0a63 Draft: added init_tools to create the toolbars 2020-02-10 11:02:28 +01:00
carlopav
d637895943 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
44a521f7c1 [Draft] Autogroup: better support for App::Link
https://forum.freecadweb.org/viewtopic.php?f=23&t=40400&start=30#p360248
Reference to forum topic.
small fix


small fix
2020-01-18 17:51:21 +01:00
carlopav
202eac3d6c Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-16 14:30:10 +01:00
Yorik van Havre
9d0c0685c8 Merge branch 'master' into DraftModifiersAppPart 2020-01-16 14:26:45 +01:00
wmayer
3af5139865 Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true 2020-01-15 12:24:18 +01:00
vocx-fc
b52ac5fc6a Draft: move translate function to translate module
The translate mechanism in Draft depends on the `QtCore`
`translate` function. This is defined in its own module
so that `DraftGui.py` is not as big and hard to manage.

Other modules in Draft can import the translate function
without needing to import the entire interface, which
often causes errors and circular dependencies.

We can import `QtCore.QT_TRANSLATE_NOOP` at the top level
in `Draft.py` because it does not depend on the graphical
interface.
2020-01-15 10:05:52 +01:00
Yorik van Havre
2b03a43720 Merge branch 'master' into DraftModifiersAppPart 2020-01-14 12:50:43 +01:00
vocx-fc
2ab75d7f23 Draft: move todo static class to the todo module
The todo class in `DraftGui.py` can be placed in its
own module so that `DraftGui.py` isn't as big
and hard to maintain.
2020-01-14 12:49:29 +01:00
carlopav
15046b03a0 [Draft] Autogroup changes to include App::Part
[Draft] merged with recent changes


[Draft] App part support small fix
2020-01-13 23:13:38 +01:00
carlopav
d69c93764e Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-10 10:36:34 +01:00
vocx-fc
ce2441c0b2 Draft: new module for GUI 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 o functions that were moved:
`get3DView`, `autogroup`, `dimSymbol`, `dimDash`,
`removeHidden`, `formatObject`, `getSelection`,
`getSelectionEx`, `select`, `loadTexture`.

Moreover, many of these functions were renamed
to comply better with PEP8 guidelines,
particularly the use of `snake_case`. For example,
`get3DView` is now `get_3d_view`.

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-10 10:04:07 +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