Commit Graph

3108 Commits

Author SHA1 Message Date
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
carlopav
646a480eb2 [Draft] Move and Rotate documentation of recent changes
[Draft] Edit: small typo fix
2019-12-29 11:46:02 +01:00
carlopav
d4954837d3 [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
510e15cf20 [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
vocx-fc
f2ed9054f6 Draft: fix CMakeLists to install files in directories 2019-12-28 15:56:02 -03:00
carlopav
1f59ee3b7e [Draft] Draft.rotate() add support for App::Part 2019-12-27 22:44:07 +01:00
carlopav
f0a18565be [Draft] Draft.move() add support for App::Part
Added getGlobalPlacement to vector calculation.
[Draft] Move bug fix
2019-12-27 20:41:04 +01:00
vocx-fc
71154715e7 Draft: add GuiCommandBase class to serve as the parent class of all DraftTools
Prepare auxiliary directories to restructure all graphical tools
for objects, viewproviders, gui commands, and taskpanels.
2019-12-27 11:01:34 -03:00
luz.paz
ae7cb9e300 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
Zheng, Lei
668e237889 Draft: fix array restore 2019-12-26 15:56:31 -03:00
ageeye
51a23bd770 Use DraftVecUtils.tup only two times. 2019-12-26 15:54:10 -03:00
ageeye
b22c33ab61 Fix the Draft Array polar type. Rotate first global and then object own rotation(spin) of placement. 2019-12-26 15:54:10 -03:00
Syres916
0d17b6faaf [Draft] ImportDXF Bug upgrading from 0.16
See discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=41879
2019-12-26 15:52:30 -03:00
carlopav
6992863638 [Draft] Edit further cleanup
[Draft] Edit fix minor bug
2019-12-26 13:31:06 -03:00
carlopav
df846aaea4 [Draft] Edit _ code cleanup
According to @vocx_fc suggestions, this commit is a first cleanup of the code.
2019-12-26 13:31:06 -03:00
carlopav
99f9aa42f7 [Draft] Edit: improved Draft Circle editing
Now Draft circle editing works also with App::Part
2019-12-26 13:31:06 -03:00
carlopav
4fc3af1390 [Draft] Edit _ improved rectangle editing
Improved rectangle editing to use 3 nodes. Now it works also inside App::Part
2019-12-26 13:31:06 -03:00
carlopav
8dd2b328fe [Draft] Edit: general refactor
Changed names of several methods from set to get, changed the general set of nodes, improved placement calculation to use getGlobalPlacement instead of Placement.
2019-12-26 13:31:06 -03:00
Bernd Hahnebach
3f514b08bd Draft: Layer, more code formating 2019-12-23 09:46:05 +01:00
JeromeL63
6c8875e58a Draft: Layer, code formating 2019-12-23 09:46:05 +01:00
JeromeL63
a0e88dfbac Draft: Layer, Separate Line color and shape color override 2019-12-23 09:46:05 +01:00
Bernd Hahnebach
7a652357fc line endings, better handling in module directory 2019-12-19 22:26:15 +01:00
Bernd Hahnebach
8f7220da51 Draft: add gitattributes file to let git manage file endings and normalize them 2019-12-19 07:51:09 +01:00
Yorik van Havre
597de362c3 Draft: Fixed regression in Rotate tool 2019-12-17 15:30:31 -03:00
vocx-fc
fa73d29d84 Draft: move the TestDraft unit tests to separate modules
This results in better organization of the tests,
avoiding extremely big files.
2019-12-17 15:06:36 -03:00
Yorik van Havre
39ee1654f9 Draft: fixed minor bug 2019-12-12 14:11:59 -03:00
Yorik van Havre
15f72b9167 Draft: fixed regression in rotations 2019-12-11 23:15:05 -03:00
0penBrain
0e96abb891 Improve Inkscape version parsing in SVG import 2019-12-06 14:35:59 -03:00
Zheng, Lei
8e4685fb2e Draft: support linked transform and color override in link array 2019-12-06 14:33:59 -03:00
wmayer
68f998c6db fix broken XML syntax in .ui file 2019-12-06 14:58:48 +01:00
luz.paz
e7ee5fe777 Tooltips: added missing tooltips + refined pre-existing
Some pre-existing tooltips needed to be a compound of lines instead of 1 long one.
Removed bold text from tooltip  
Removed URL from tooltip
2019-12-05 17:07:44 +01:00
Zheng, Lei
8c9d67c2c0 Draft: signal icon change in Layer 2019-12-04 18:59:28 +01:00