Commit Graph

1786 Commits

Author SHA1 Message Date
Yorik van Havre
ee10405140 Draft: Use proper multi-line text editor for Draft Text tool 2020-01-29 14:27:01 +01:00
M G Berberich
15bef3283f [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
21f8b80f55 [Draft] Context menu bugfix
If "Line" is not translated, the menu is not appended
2020-01-29 09:32:52 +01:00
vocx-fc
8eb56228cf Draft: plane proxy by default saves the state and view 2020-01-28 11:59:36 +01:00
carlopav
5e22086d71 [Draft] Autogroup bugfix 2020-01-27 10:12:02 +01:00
carlopav
c5f2845eb5 [Draft] Reorganize menu & toolbars
According to what experimented in BIM WB.
2020-01-27 10:06:33 +01:00
UR-0
7b511d49cb Draft: ShapeStringTaskPanel add parameter DontUseNativeFontDialog 2020-01-22 10:25:13 +01:00
carlopav
8cdf9ee534 [Draft] Edit addpoint with both chamfer and fillet enabled 2020-01-22 10:19:39 +01:00
carlopav
50897a55f5 [Draft] Edit, bugfix on addpoint to filleted polyline 2020-01-22 10:19:39 +01:00
carlopav
78252e959a [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
ec57ffd875 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-16 14:30:10 +01:00
Yorik van Havre
3f30f8b345 Merge branch 'master' into DraftModifiersAppPart 2020-01-16 14:26:45 +01:00
wmayer
099cc2c59e Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true 2020-01-15 12:24:18 +01:00
vocx-fc
d8fd4b2f9c 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
9ed1c1b281 Merge branch 'master' into DraftModifiersAppPart 2020-01-14 12:50:43 +01:00
vocx-fc
abd31f0b2b 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
f21c387b04 [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
41cf28d1fb Draft: SVG import, encode fix 2020-01-10 12:39:33 +01:00
carlopav
6e70467335 Merge remote-tracking branch 'upstream/master' into DraftModifiersAppPart 2020-01-10 10:36:34 +01:00
vocx-fc
60d81151d7 Draft: test_offset, test wire and closed shape (rectangle) 2020-01-10 10:09:22 +01:00
paullee0
0f38aad7ba [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
4d956930f5 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
516cb397c6 [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
0ab2826123 Merge branch 'master' into DraftModifiersAppPart
merged upstream master and resolved conflicts
2020-01-09 14:42:58 +01:00
paullee0
7acfb3b0f3 [ DraftGeomUtils ] - Fix Indent as commented on Github 2020-01-08 15:22:54 +01:00
paullee0
4818fc4ab4 [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
a4df2a1319 [Draft] Edit cleanup
[Draft] Edit further cleanup
2020-01-08 15:20:36 +01:00
carlopav
441a186ce4 [Draft] Edit: add support for arc editing in App::Part 2020-01-08 15:20:36 +01:00
carlopav
b6423863cb [Draft] Edit: improved context menu and fix for arc editing
[Draft] Edit small bugfix
2020-01-08 15:20:36 +01:00
carlopav
9870ec27b1 [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
5a63ad51b1 [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
b189fd6450 [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
7e50cc7c7a [Draft] Edit: context menu for Bezcurve editing 2020-01-08 15:20:36 +01:00
carlopav
d3b9aeb7f6 [Draft] Edit bugfix
traker was not updated if endEditing function was called by numericInput
2020-01-08 15:20:36 +01:00
carlopav
e238a4b9fc [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
7721ca0157 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
ab6976c5db 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
51b5d81741 importDWG: remove comments 2020-01-07 07:35:14 -03:00
looooo
28ad3ea3cb importDWG: use subprocess.Popen instead of .call 2020-01-07 07:35:14 -03:00
looooo
ed5545c3ea importDWG: use libredwg's dwgtodxf converter if available 2020-01-07 07:35:14 -03:00
Yorik van Havre
438d1baba8 Merge branch 'master' into DraftModifiersAppPart 2020-01-07 07:20:15 -03:00
vocx-fc
1336381eec 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
52947e5adc [DraftGeomUtils] isReallyClosed(): Add back support to test if wire is Circle / Ellipse 2020-01-07 07:16:41 -03:00
Bernd Hahnebach
54c4341beb Draft: workaround for error on document loading 2020-01-05 22:16:15 +01:00
Grey Christoforo
5690909e49 fix brick01 file name 2019-12-29 21:25:14 +01:00
carlopav
a3d650b386 [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
d4e32c1607 [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
carlopav
f0d21a8755 [Draft] Move and Rotate documentation of recent changes
[Draft] Edit: small typo fix
2019-12-29 11:46:02 +01:00
carlopav
100dd0bfcc [Draft] Edit, changed endEdit
Before behaviour when user click and when user input coordinates:
1- mousePressed -> endEditing -> numericInput -> update
2- numericInput -> update
Now:
1- mousePressed -> endEditing -> update
2- numericInput -> endEditing -> update
2019-12-28 15:59:26 -03:00
carlopav
af8671caa2 [Draft] Edit Documentation
Documented better the whole tool.
Changed the name of self.call to self. selection_callback for easier code reading.
[Draft] Edit small bugfix

Deleted a bunch of code I PR by error
2019-12-28 15:59:26 -03:00