Commit Graph

393 Commits

Author SHA1 Message Date
vocx-fc
7f99cead72 Draft: DraftTools.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 class name `ToDo` in `CamelCase`,
as it is indicated in Python guidelines for classes.
2020-04-07 18:12:06 +02:00
vocx-fc
7d102a5370 Draft: move Draft_Edit to another module 2020-04-06 12:51:55 +02:00
vocx-fc
2a340bcfd3 Draft: move ScaleTaskPanel to a module
We remove it from `DraftGui.py` to reduce the size of this file.
Then we import it and tie it to its command defined
in `DraftTools.py`.
2020-04-02 16:53:49 +02:00
vocx-fc
46216d6032 Draft: move ShapeStringTaskPanel to a module
We remove it from `DraftGui.py` to reduce the size of this file.
Then we import it and tie it to its command defined
in `DraftTools.py`.
2020-04-01 13:22:04 +02:00
vocx-fc
72e2bca165 Draft: move and rename DraftSelectPlane 2020-03-31 12:00:38 +02:00
vocx-fc
02dabc9022 Draft: use functions from the utils module, not DraftGui
These functions were moved from DraftGui to individual
modules precisely to make them easy to import.
Otherwise we have to import the entire DraftGui module
which creates dependency problems when we want to use
some functions without the graphical interface.
2020-03-23 12:14:58 +01:00
vocx-fc
419431559a Draft: move DraftTrackers to another module.
Properly import the tracker classes. Avoid star imports,
and use the classes prefixed with the name of the module.
The BIM Workbench also has to be updated to use the new
module.
```
import draftguitools.gui_trackers as DraftTrackers
```
2020-03-23 12:14:33 +01:00
vocx-fc
580270ce4a Draft: move DraftSnap to another module
And do not load the `Snapper` in `DraftGui`.
The Snapper should be initialized by the module
that imports `DraftGui`, most probably `DraftTools`
or even by the `InitGui` of the workbench.
2020-03-20 08:11:04 -03:00
vocx-fc
6b87a416fd Draft: properly import the Snapper class
Avoid star imports, and prepend the module name,
`DraftSnap.Snapper()`.
2020-03-20 08:11:04 -03:00
vocx-fc
3ac2e079bc Draft: move snap commands to an individual module
This way we remove lines from `DraftTools.py`
and we can more easily identify where the snapping
commands are defined.
2020-03-20 08:11:04 -03:00
triplus
946fd7352b Draft - enable toggle grid command in edit mode
Some people would like to have more control over draft grid visibility  while in Sketcher edit mode.  Hence this PR enables the usage of Draft ToggleGrid  command in Sketcher edit mode.

Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=34&t=43265&start=20#p374747
2020-03-12 09:26:48 -03:00
carlopav
4396b40fec [Draft] DraftGui and DraftEdit Cleanup to remove AddPoint & DelPoint
Lines to be deleted in DraftGui in the future, are now commented.
2020-03-12 09:11:34 -03:00
vocx-fc
9d887131af Draft: Draft_Arc_3Points using the new arc function
Instead of creating the arc directly in the GuiCommand
it calls the new `make_arc_3point` function.
2020-03-05 09:03:02 -03:00
vocx-fc
b25ca7194c Draft: lowercase use_link option for arrays
Inside the class `_DraftLink` the `onDocumentRestored` function
tests for the existence of the old attribute `useLink`. If it is
present, it uses it to define the new variable name `use_link`.
This is done use Python naming conventions.
The old `useLink` is deleted so it is not longer saved
together with the object when the document is saved.
2020-03-04 09:58:56 -03:00
Syres916
4242afb8b4 [Draft] WireToBSpline Fix Placement of makeWire
See Discussion https://forum.freecadweb.org/viewtopic.php?f=23&t=43184
2020-03-02 12:08:53 -03: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
luz.paz
8cfa85cf18 Draft: [skip ci] Fix header uniformity
This PR fixes header uniformity across all Draft files
2019-12-27 00:16:12 +01:00
vocx-fc
6626b52b5f Draft: rename SubelementModify to SubelementHighlight 2019-11-11 18:04:10 -03:00
vocx-fc
b9a6c0dd2b Draft: renamed the command Draft_Edit_Improved to Draft_SubelementModify because the previous name was confusing; also provide a new icon 2019-10-10 19:13:28 -03:00
Syres916
8d11ced84b [Draft] Wire To BSpline fix to show new object
Discussion https://forum.freecadweb.org/viewtopic.php?f=8&t=39466
2019-10-07 13:45:25 -03:00
vocx-fc
7a655c25de Draft: DraftTools, place the CubicBezCurve tool before the BezCurve, as the cubic curve is more used. 2019-10-07 13:45:01 -03:00
vocx-fc
e731d08c38 Draft, makeBezCurve(), changed parameter Degree to degree, preferred lowercase 2019-10-07 13:44:25 -03:00
Yorik van Havre
90b5f63bc2 Draft: Show info message if an object cannot be scaled 2019-09-03 11:55:07 -03:00
Yorik van Havre
b7b8dbabf5 Split Draft_SelectPlane and DraftSetWorkingPlaneProxy to a separate file 2019-09-02 17:23:57 -03:00
Dion Moult
bfae0408ac Fix UI labels and unit type to be angle instead of length when doing draft rotate 2019-09-02 16:05:36 -03:00
Yorik van Havre
0b3df322fb Draft: misc small fixes 2019-08-27 21:29:20 -03:00
Yorik van Havre
f16f58c040 Draft: Fixed tooltips 2019-08-26 14:16:19 -03:00
vocx-fc
271929016a Draft: DraftFillet, changed some things about the implementation. 2019-08-22 10:54:41 -03:00
vocx-fc
4c5e719e45 Draft: added DraftFillet.py to the sources, also InitGui.py, Draft.py, DraftTools.py, and CMakeLists.txt 2019-08-22 10:54:41 -03:00
Zheng, Lei
88b5b2a845 Draft/Arch related changes
* Add Draft_LinkArray and Draft_PathLinkArray that uses link for both
  data and visualization, which supports linking external objects

* Add link group support for draft snap

* Fix ArchWindows expression ambiguity
2019-08-17 15:32:47 +02:00
vocx-fc
24086baef4 Draft: DraftTools.py, the docstrings need triple quotes and be next to the method or class in order to be picked up by Doxygen or Sphinx; this complies with PEP 257. 2019-08-14 14:33:57 -03:00
Yorik van Havre
4d3f24a5b8 Draft: Reorganizing DraftEdit and future Draft command modules 2019-08-12 21:30:45 -03:00
Yorik van Havre
3e326fe2e2 Draft: Fixed clone bugs 2019-07-11 12:44:04 -03:00
Yorik van Havre
cef27c7a72 Draft: Added button to working plane task panel to orient the view to the WP 2019-07-09 12:29:32 -03:00
Yorik van Havre
46f253d5d0 Draft: General grid fixes
- Killed 'double-grid' bug
- Consistent one grid per view, be it new doc or new view
- Grid recreated when needed on each snap use
- Misc optimizations
2019-07-08 22:07:14 -03:00
Yorik van Havre
4986a56712 Draft: Fixed ghost not appearing in scale tool 2019-07-08 19:56:05 -03:00
Yorik van Havre
0b0fc6c3cf Draft: Fixed bug in edit mode - Fixes #4047 2019-07-08 18:28:41 -03:00
Yorik van Havre
01514ad653 Arch: Added View clipping abilities to BuildingParts, like SectionPlanes 2019-07-06 20:22:30 -03:00
Yorik van Havre
afe0d6fad8 Draft: Remember Offset copy mode separately from Move copy mode 2019-07-06 16:52:58 -03:00
Yorik van Havre
6fa859ab89 Draft: Better positioned layers button popup + new layer entry 2019-06-30 13:32:42 -03:00
Yorik van Havre
f717d540c8 Draft: Turned autogroup button into layers selector (added pref option to restore old groups-based system) 2019-06-30 01:00:50 -03:00
Yorik van Havre
c1c7aac0fb Draft: Fixed SelectPlane command not working when an object is selected 2019-06-29 19:48:41 -03:00
carlopav
aa124266f9 [Draft] Cleaned code in arc 3Points preview
Arc tracker during creation is computed by arc tracker new method.
2019-06-27 11:50:45 -03:00
carlopav
4ee893b78a [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
555d04c221 Separate Draft Edit
My last attempt to separate draft edit. Everything seems to work fine.
2019-06-17 16:39:56 -03:00
Yorik van Havre
35921443f0 Draft: Renamed DWire to Polyline 2019-06-05 19:07:30 -03:00
Yorik van Havre
2c918366e4 Draft: Introduced Layers system (former VisGroup) 2019-06-05 18:47:01 -03:00
Yorik van Havre
7957e065db Draft: Fixed regressions in Scale tool + reimplemented Clone mode 2019-06-03 19:06:27 -03:00
Dion Moult
32969dde1f Let getSupport() check if WP mode is set to auto before changing WP needlessly
Also refactor getSupport() function to be a little bit more semantic and reduce nested if statements so logic is clearer.
2019-06-03 16:49:51 -03:00
Dion Moult
1b362fd82b Fix draft missing line tracker when snapper detects an object without any snap targets 2019-06-03 16:36:07 -03:00