Commit Graph

31 Commits

Author SHA1 Message Date
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
carlopav
7adca7be31 [Draft] Edit: allow multiple objects editing
Allow editing of multiple objects at once.
2019-11-11 18:00:02 -03:00
carlopav
c9522a6e63 [Draft] Edit: fix bug #4187
Fix bug #4187. When canceling a Dwire editing session with the Esc key or the "close" button Dwire editing breaks.
2019-11-11 17:59:08 -03:00
luz.paz
892db1a770 Draft: whitespace fix [skip-ci] 2019-10-25 10:25:31 -03:00
luz.paz
cf854a52a5 Draft: DraftEdit.py use string operator instead of numeric LGTM fix [skip ci] 2019-10-25 10:25:31 -03:00
carlopav
d87e6324e5 [Draft] Edit: pick radius according to user preferences (issue #4162)
Reference tracker issue #4162 https://freecadweb.org/tracker/view.php?id=4162
Reference topic. https://forum.freecadweb.org/viewtopic.php?f=23&t=40060.
Changed ui file to insert edit preferences (at the moment inside draft and grid, for the affinity with snap). Created a new draft preference: DraftEditPickRadius.
2019-10-21 16:00:36 -03:00
carlopav
f3f15b1a9b [Draft] Edit: preview node with mouseover
Preview editing nodes with mouse move.
Modified edit trackers to store in self.color the value. Also added a method to it to set color.
2019-10-17 17:43:57 -03:00
luz.paz
7a38b1ca84 Draft: DraftEdit.py now gets PickRadius from user preferences
...instead of being hardcoded.  
Note: PickRadius is the proximity in pixels for picking elements in the 3D view  
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=39203
2019-09-28 12:49:33 +02:00
luz.paz
f22ae848ea Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
carlopav
b08dc749fe [Draft] Edit by default one object at once
Small optimization and set max number of edited objects to 1
2019-09-02 16:13:08 -03:00
carlopav
0dbd1201f5 [Draft] Edit: Allow multi object editing
Modified to accept multiple object (max 5). The tool set EditTrackers for every selected object. Then edited object is identified using clicked EditTracker.
2019-09-02 16:13:08 -03:00
carlopav
76bac3099e Allow for multiple object trackers + 1 line sketch edit
self.trakers is changed from list to dictionary. It now stores EditTrackers with {'object':[pointlist]}. Initial implementation is to allow editing wall height and wall base object.
2019-09-02 16:13:08 -03:00
carlopav
365e93c598 [Draft] Edit: Refactored object selection + bug on wall editing
Draft edit now get the editing object from data stored inside the EditTracker. This is the first step towards implementation of multi object editing.
2019-09-02 16:13:08 -03:00
carlopav
daa035870a [Draft] Edit: fixed bug with dimensions
Update function always receive global vector as target of the transformation.
2019-09-02 16:13:08 -03:00
carlopav
954a8d3aca [Draft] Edit: use lineui instead of pointui
use lineui for editing instead of pointUi and minor documentation changes
2019-09-02 16:13:08 -03:00
carlopav
e06fb52bd0 [Draft] Edit: separate selectstate functions
Separated functions that save, restore and set the select state of edited object from main functions.
2019-09-02 16:13:08 -03:00
carlopav
d9e60c0471 Draft Edit: enable Part::Line editing
Implemented editing part lines. Preview still to come.
2019-08-20 10:29:50 -03:00
carlopav
a1e6019f82 Draft Edit: enable editing Part::Box
Added code to handle editing of part objects, ATM only for Part::Box
2019-08-20 10:29:50 -03:00
carlopav
5d75d68f64 Draft Edit: bugfix when Draft is activated without document
Fixed bug when Draft is activated but no document is active
2019-08-20 10:29:50 -03:00
carlopav
ec3a6ba0d9 [Draft] Small bugfix in bezcurve editing
Solved bug when clicking on empty space while editing continuity.
2019-08-20 10:29:50 -03:00
carlopav
9aac2df1a7 [Draft] Draft Edit: completed subcommand key event
Completed subcommand key edit
2019-08-20 10:29:50 -03:00
carlopav
13e605912c [Draft] Draft Edit - various fixes (fixes #3537)
https://forum.freecadweb.org/viewtopic.php?f=3&t=29743&start=70
To solve issue with Hidpi display  (fixes #3537), but also to improve node selection, I used some of @looo code from pivy graphics into the tool. 
So:
- i got rid of the action function
- i separated selection and editing callbacks
- i got the mouse position from the callback event and not from FreeCADGui.ActiveDocument.ActiveView.getCursorPos()
- i rewrote the node selection mechanism using soraypickaction instead of getObjectInfo() and getObjectsInfo()
- i tried to put a bit of order in all the mess i made and try to document it.
- also fixed some of the preview code.
- i'm really really sorry for not being able to split the commit in multiple one, but the changes are huge and i was just able to separate minor things...
2019-08-20 10:29:50 -03:00
Yorik van Havre
16c26cb3b1 Draft: Reorganizing DraftEdit and future Draft command modules 2019-08-12 21:30:45 -03:00
luz.paz
c79fc5ce2c [Draft] source comment typo fix 2019-07-11 19:17:07 +02:00
Yorik van Havre
45367edb6d Arch/Draft: Fixed remaining bugs from latest commits 2019-07-09 15:07:00 -03:00
Yorik van Havre
afed22ef01 Draft: Fixed bug in edit mode - Fixes #4047 2019-07-08 18:28:41 -03:00
carlopav
13563bdc73 [Draft] Edit: Fix bug in Bezcurve editing preview
Better handling of coincident point check.
2019-07-02 20:02:43 -03:00
carlopav
87225f0a6b [Draft] Fixed a bug in arc editing and added preview
Fixed a bug so arc editing take correctly the placement into account.
Added preliminary support for preview during arc editing. To be improved in the future.
2019-06-27 11:50:45 -03:00
carlopav
c351b9094a [Draft] Update DraftEdit PR with Yorik suggestions
Cleanings of import at the beginning of new module.
Moved command setup in InitGui and removed import DraftEdit from DraftTools.
2019-06-17 16:39:56 -03:00
carlopav
a4e2df115d Separate Draft Edit
My last attempt to separate draft edit. Everything seems to work fine.
2019-06-17 16:39:56 -03:00