Commit Graph

1789 Commits

Author SHA1 Message Date
carlopav
7d6f0f3626 [Draft] Toolbar, remove option from preferences 2020-02-05 10:50:03 +01:00
vocx-fc
ad977bb807 Draft: disable the Toolbar mode of Gui commands
The `Taskview` mode (value 1) is set fixed in `DraftGui.py`
even if the widget shows the other value `Toolbar` (value 0),
as this mode is unmaintained and obsolete.
At the same time, clarify the behavior with a new tooltip.
2020-02-05 10:50:03 +01:00
triplus
461309df23 Draft - Toolbar mode input size issue
https://forum.freecadweb.org/viewtopic.php?f=34&t=42782
2020-02-05 10:48:27 +01:00
Yorik van Havre
1350da3f22 Draft: Use proper multi-line text editor for Draft Text tool 2020-01-29 14:27:01 +01:00
M G Berberich
380340623b [Draft]fix circular array python2
There was semantic change of the division operator ‘/’
from python2 to python3. This fix makes the circular array
work with python2 correctly.
See PEP 238
2020-01-29 09:33:24 +01:00
carlopav
202d100780 [Draft] Context menu bugfix
If "Line" is not translated, the menu is not appended
2020-01-29 09:32:52 +01:00
vocx-fc
cacd3d9c6a Draft: plane proxy by default saves the state and view 2020-01-28 11:59:36 +01:00
carlopav
d637895943 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
fbef5ab1f0 [Draft] Reorganize menu & toolbars
According to what experimented in BIM WB.
2020-01-27 10:06:33 +01:00
UR-0
c857dfef84 Draft: ShapeStringTaskPanel add parameter DontUseNativeFontDialog 2020-01-22 10:25:13 +01:00
carlopav
887256ba31 [Draft] Edit addpoint with both chamfer and fillet enabled 2020-01-22 10:19:39 +01:00
carlopav
dc2347f271 [Draft] Edit, bugfix on addpoint to filleted polyline 2020-01-22 10:19:39 +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
Bernd Hahnebach
7dd808ac6e Draft: SVG import, encode fix 2020-01-10 12:39:33 +01:00
carlopav
d69c93764e Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-10 10:36:34 +01:00
vocx-fc
4b5f91f4c3 Draft: test_offset, test wire and closed shape (rectangle) 2020-01-10 10:09:22 +01:00
paullee0
885046b1c6 [DraftGeomUtils] OffsetWire() to accept input as Face as previously did.
Forum Discussion -
https://forum.freecadweb.org/viewtopic.php?f=23&t=42282&p=359233#p359233
2020-01-10 10:08:00 +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
carlopav
140c2ea17c Merge branch 'master' into DraftModifiersAppPart
merged upstream master and resolved conflicts
2020-01-09 14:42:58 +01:00
paullee0
5ea31c6b3e [ DraftGeomUtils ] - Fix Indent as commented on Github 2020-01-08 15:22:54 +01:00
paullee0
145f44377b [DraftGeomUtils] - Add per edge Align support
Per edge align feature
- OffsetWire() function is per-edge-aware of aligns information (alignList) for offsettg individual edge
- Instead of using dvec which universally offseting all edge consistently, it calculate vector per edge for offseting
- 2 modes of 'offsetting' to get 2 'offseted' wires from a basewire taking into per-each align info

It accept a normal info to make e.g. all wires in a Sketch gain consistent direction, instead of calculating from indiviual wires
2020-01-08 15:22:54 +01:00
carlopav
9478fe0403 [Draft] Edit cleanup
[Draft] Edit further cleanup
2020-01-08 15:20:36 +01:00
carlopav
c87bc0a8ef [Draft] Edit: add support for arc editing in App::Part 2020-01-08 15:20:36 +01:00
carlopav
18350dbf9d [Draft] Edit: improved context menu and fix for arc editing
[Draft] Edit small bugfix
2020-01-08 15:20:36 +01:00
carlopav
796a3259de [Draft] Edit bugfix
Fixed contemporary editing of Draft and Part objects.
Implemented better showTrackers and hideTrackers functions.
2020-01-08 15:20:36 +01:00
carlopav
bee0784188 [Draft] Edit cleanup
Cleaned up imports a suggested by @vocx.
Also cleaned up various things inside the tool.
[Draft] Edit small change in imports


[Draft] Edit updated documentation
2020-01-08 15:20:36 +01:00
carlopav
89d843d639 [Draft] Edit: set shortcut to D,E
Changed subelement highlight to S,E
[Draft] Edit bugfix


bugfix
2020-01-08 15:20:36 +01:00
carlopav
717fc06856 [Draft] Edit: context menu for Bezcurve editing 2020-01-08 15:20:36 +01:00
carlopav
c687d43bab [Draft] Edit bugfix
traker was not updated if endEditing function was called by numericInput
2020-01-08 15:20:36 +01:00
carlopav
e5b700942a [Draft] Context menu for EditTrackers
Initial support for context menu.
Menu is triggered by Alt+Click or by pressin E Key.
Menu is customized on the clicked object.
Supported functions ATM: addPoint, deletePoint.
2020-01-08 15:20:36 +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
vocx-fc
5143369fc9 Draft: add new command for Draft CircularArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-08 15:16:07 +01:00
lorenz
dfea8535b6 importDWG: remove comments 2020-01-07 07:35:14 -03:00
looooo
e2e7659efc importDWG: use subprocess.Popen instead of .call 2020-01-07 07:35:14 -03:00
looooo
e8109204a9 importDWG: use libredwg's dwgtodxf converter if available 2020-01-07 07:35:14 -03:00
Yorik van Havre
9e2e82517d Merge branch 'master' into DraftModifiersAppPart 2020-01-07 07:20:15 -03:00
vocx-fc
fa44c7ae2f Draft: new command for Draft PolarArray
Added object, viewprovider, icon; gui command definition, task panel,
add command to InitGui; add callbacks, and delay system.
2020-01-07 07:18:39 -03:00
paullee0
cb1fb09d26 [DraftGeomUtils] isReallyClosed(): Add back support to test if wire is Circle / Ellipse 2020-01-07 07:16:41 -03:00
Bernd Hahnebach
dee8a4075b Draft: workaround for error on document loading 2020-01-05 22:16:15 +01:00
Grey Christoforo
c0ebcbee48 fix brick01 file name 2019-12-29 21:25:14 +01:00
carlopav
5ad41e27c2 [Draft] Auto add new object to App::Part
Auto add object to part container if active and if no other autogroup object is selected by the user.
Note that object placement is automatically corrected to not jump over space.
[Draft] App::Part autogroup point object
2019-12-29 20:25:50 +01:00
carlopav
87970248a5 [Draft] getGroupContents and App::Part
App::Part contained objects should not be moved if also App::Part is moved
2019-12-29 15:24:14 +01:00