Commit Graph

135 Commits

Author SHA1 Message Date
Roy
d5615fc6a6 Draft: Fix several translation issues 2022-01-28 14:01:42 -06:00
Roy
843ea92055 Draft: Fix additional translation issues related to the snapping commands 2022-01-12 13:44:05 +01:00
Roy
93a41d2941 Draft: Fix translation issues 2022-01-10 10:17:53 +01:00
Roy-043
cc447a061c Draft: Fix issues with translate and _tr (#5351) 2022-01-08 00:04:53 +01:00
Roy-043
38534bd33d Draft: improve get_group_contents function in groups.py
For consistency the get_group_contents function should use is_group to identify groups. The code dedicated to Site objects and Drawing pages was removed.
2022-01-06 17:40:11 +01:00
Yorik van Havre
0e7314068c Arch: BuildingParts autogrouping
Arch BuildingParts now gained a new set of View properties that allows
to define a "capture box". Subsequent Draft and Arch objects, or anything
else that uses Draft.autogroup(), will be automatically added to that
BuildingPart if they are inside the capture box.
2021-10-14 14:42:46 +02:00
Roy-043
f03dfe351e Draft: fix context menu
Remove the get_draft_line_commands function.
Update the def get_draft_context_commands function.
2021-10-12 14:32:36 +02:00
luz paz
bb108cff95 Fix user facing typos [skip ci]
Typos in Draft and OpenSCAD code.
2021-10-06 18:11:48 -04:00
Yorik van Havre
bfcfa1f68e Merge pull request #5072 from Roy-043/Draft-fix-shortcuts-in-menus-and-more
Draft: fix shortcuts in menus and more
2021-10-05 13:51:59 +02:00
Roy-043
ff24678a7c Update init_tools.py
Removed "_temp" from docstrings.
2021-10-05 13:38:43 +02:00
Roy-043
19084494e8 Update init_tools.py
Removed the temp code. Changed the order of the functions. Only one item per line to make the lists more legible.
2021-10-02 09:42:49 +02:00
Roy-043
c581585574 Update units.py 2021-09-30 23:38:54 +02:00
Roy-043
f4ce6a8291 Draft: fix shortcuts in menus and more (init_tools.py) 2021-09-28 14:50:41 +02:00
Roy-043
c1dec8e792 Draft: move Draft_AddNamedGroup in menu
Draft_AddNamedGroup before Draft_AddToGroup, same as in the toolbar.
2021-09-27 10:34:53 +02:00
Roy-043
deda3668c9 Draft: fix dim symbol issues 2021-09-23 10:45:21 +02:00
Roy-043
07eced129a Draft: Fix annotation scale to label issue.
The scale_to_label function did not handle scale 5:1, 10:1 or 20:1 properly.
2021-09-20 11:01:59 +02:00
Chris Hennes
68a027cf94 Draft: LGTM - don't catch BaseException 2021-09-19 14:36:38 -05:00
Yorik van Havre
1c8b803f9e Draft: Introduced Hatch command + object 2021-09-06 15:27:52 +02:00
Yorik van Havre
cbde274c9a Merge branch 'master' into Draft_addgroup 2021-09-06 12:02:36 +02:00
Yorik van Havre
8ed419cf6a Merge pull request #4882 from Roy-043/Draft_Fix_init_tools.py
Draft: Small cleanup of Utilities menu and utility toolbar
2021-09-02 11:45:35 +02:00
luzpaz
72411f83ad Draft: Fix LGTM 'test for equality' warning (#4969)
* Draft: Fix LGTM 'test for equality' warning

ref: https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090

* FEM: source comment typo fixes
2021-08-16 22:52:13 -05:00
Yorik van Havre
15c04a30cf Merge pull request #4926 from Syres916/patch-24
[Draft] gui_utils Minor bugfix on change to...
2021-08-02 17:42:39 +02:00
Syres916
f76c9926da [Draft] gui_utils Added FIXME comment to assist..
... revisiting in future
2021-08-02 15:19:22 +01:00
Yorik van Havre
26ff21d93d Merge pull request #4879 from Roy-043/Draft_Fix_Layer_List_Issues
Draft: Fix 3 issues with the Draft Tray layer list
2021-08-02 11:54:11 +02:00
Syres916
a049b9118b [Draft] gui_utils Coin import addition 2021-07-18 19:52:31 +01:00
Syres916
5e1ae4e72d [Draft] gui_utils Minor bugfix on change to...
...Draft Wb with grid enabled. Please backport to 0.19 branch, see discussion https://forum.freecadweb.org/viewtopic.php?f=3&t=60251
2021-07-17 21:52:30 +01:00
Roy-043
807f61400d Draft: fix dimensions with decimals=0 problem
The display_external function in units.py did not handle decimals=0 properly.
2021-07-15 06:24:23 +02:00
Yorik van Havre
9137e15f06 Draft: Fixed missing type check in is_clone 2021-07-07 15:44:46 +02:00
Roy-043
3a8d9a2738 Draft: Small cleanup of Utilities menu and utility toolbar
Removed from the Utilities menu because they already occur in the Modification menu:
Draft_FlipDimension
Draft_Edit
Draft_Slope

Removed from the Utilities menu because calling the command from there instead of from the Draft Tray does not make sense:
Draft_AutoGroup

Removed from the "Draft utility tools" toolbar because the command is very rarely used:
Draft_Heal
2021-06-22 11:54:48 +02:00
Roy-043
9fad078ba2 Fix 3 issues with the Draft Tray layer list
Fix 3 issues with the Draft Tray layer list:
The layer list should display even if there are no layers so that the "Add new Layer" option can be selected.
"Project" and "BuildingPart" objects should be added to the list (depending on "AutogroupAddGroups" of course).
The "LayerContainer" object should not be added to the list. Although it is in fact a group, it is just too confusing.

Added is_group function. This function can also be used in gui_groups.py.
2021-06-21 21:07:41 +02:00
carlopav
d115db2cbb Draft: Autogroup, insert guard to prevent cyclic references
ref. Forum discussion: Draft_OrthoArray: Crash when using active Std_Part. https://forum.freecadweb.org/viewtopic.php?f=23&t=59155&p=508132#p508132

Autogroup try to add new created Draft Objects into the active Part, but if the Part is used as a Base for the new object this could create a cyclic reference. 
This behaviour is prevented by adding a check for " obj in active_part.InListRecursive"
2021-06-06 11:21:21 +02:00
carlopav
f050f77343 Draft: Autogroup, rename variables to more readable names 2021-06-05 17:07:32 +02:00
Matthijs Kooijman
19ada8fd1f Draft: Do not move children of App::Link objects
This caused the original object to be moved when using the Draft move
tool to move a link object, when the original object has MoveWithHost
set (e.g. a Window). There was already a similar exception for clones,
so it makes sense to extend this for links too.

Note that there seem to be more problems with the "MoveWithHost"
mechanism and fixing them might completely refactor this code, but until
then, this is a simple and targeted fix that at least makes moving
links to windows work as expected.

See https://forum.freecadweb.org/viewtopic.php?f=23&t=57223 for
discussion of this bug, its fix and the additional problems mentioned.
2021-05-22 16:51:04 +02:00
Matthijs Kooijman
82d0d3007d Draft: Improve docs for get_group_contents spaces parameter
The documentation suggested subtly different semantics from what the
code implements.
2021-05-09 17:33:46 +02:00
Yorik van Havre
e2e380655b Draft: Allow to set 'arch' unit override on dimensions 2021-04-29 19:51:34 +02:00
Yorik van Havre
317177dad6 Draft: Fixed default color for new dimensions (now uses DefautTextColor instead of DefaultLineColor) 2021-04-23 15:46:39 +02:00
Łukasz Stelmach
d35daaeffd Draft: Ensure horizontal orientation of snap_widget
From time to time when switching to other workbenches snap_widget changes
orientation to vertical. Make sure it stays horizontal.

Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
2021-04-19 19:58:06 +02:00
Benjamin Nauck
6d37a38437 Draft: Simplify load_texture after py3 requirement
This commit does the following things:
 * Remove python2 support
 * Using a bytearray instead of chr list to build up the binary data.
   this also removes the need of using char encoding.
2021-03-10 20:49:29 +01:00
paul lee
0e81e76f7d [Draft.draftutils.groups] get_windows() to support Links
FC Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=55438
2021-02-12 09:59:28 +08:00
Chris Hennes
fe7e45a7de [DRAFT] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
luz paz
2a8c1271d5 Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
Yorik van Havre
f13c8974b5 Draft: Colored grid axes 2020-12-03 15:15:15 +01:00
Yorik van Havre
bff31175cb Draft: better checks for no active document 2020-11-16 13:25:12 +01:00
Yorik van Havre
88f5fc20b1 Draft: Condensed the Draft toolbar style buttons into one with more options 2020-11-10 14:14:18 +01:00
Yorik van Havre
0fdd157394 Draft: Added TechDraw patterns 2020-10-26 11:52:14 +01:00
Yorik van Havre
71cd301ca7 Draft: Added pref option to set default dimension unit 2020-10-14 17:21:27 +02:00
Yorik van Havre
4134315434 Draft: Fixed translation of construction group 2020-10-12 16:11:31 +02:00
Yorik van Havre
5609b38e9a Draft: Fixed patterns + added default pattern size pref option 2020-10-12 15:12:50 +02:00
vocx-fc
49e1ff1bcf Draft: get_bbox function to get the bounding box from RootNode
Normally the bounding box is taken from `Shape.BoundBox`.
Certain objects don't have a `Shape`, like `App::FeaturePythons`,
so the bounding box is calculated from `ViewObject.RootNode`.
2020-09-30 12:06:48 +02:00
Amritpal Singh
21e1dff25c Adopted vocx-fc comment. 2020-09-29 18:50:30 +02:00