Commit Graph

551 Commits

Author SHA1 Message Date
Roy-043
9ec977f89d Draft: Allow selection of subelements for Draft_Fillet
Fixes #17505.
2024-11-25 18:21:50 +01:00
paul
6c85c37b38 [Draft Gui_Stretch] Improve Stretch Rectangle Behaviour (#18063)
* [Draft gui_stretch] Improve Stretch Rectangle Behaviour

Feature Improvement discussed at FreeCAD Forum :
- https://forum.freecad.org/viewtopic.php?t=92124#p792118  (Draft_Stretching the whole rectangle creates a new wire)

Currently, 3 cases in general, proposed PR improve Case 3 below :

1. The original object is a Rectangle, if after stretching it is no longer a rectangle, it makes a copy turning it into a Wire which reflect the result of stretching.
   - Current behanviour is good for user, no change.
2. If after stretching it is still a rectangle, the code just resize the original.
   - Current behanviour is good for user, no change.
3. Now, if the user 'stretch' the whole rectangle, the code creates a copy as DWire in the 'stretched location'.
** - Users find this not intuitive, better just move the whole rectangle.
2024-11-25 14:47:06 +01:00
Roy-043
0656f19bde BIM+Draft: Bring back human figure
* For the human figure attached to the Draft grid a hard-coded point list is used (instead deriving the points from human figure.brep). This is more efficient and avoids a dependency on the BIM WB.
* The default for the human figure preference of the grid was changed to false. And the tooltip adjusted.
2024-11-25 13:34:53 +01:00
Roy-043
ed209dab68 Draft: minor improvements for gui_edit.py (#17970)
* Draft: minor improvements for gui_edit.py

* Fix error...
2024-11-25 13:34:23 +01:00
Yorik van Havre
89d1d717eb BIM: Optimized leader UI (#17310)
* BIM: Optimized leader UI - fixes #17284

* Correct task panel icon for BIM Leader.
* Make BIM Leader task panel title translatable.
* Use a single mode parameter for the Line class.

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2024-11-16 18:10:04 +01:00
Roy-043
aea052cb6f Draft: Fix AnnotationStyleEditor delete last style error (#17758)
* Draft: Fix AnnotationStyleEditor delete last style error

Fixes #17716.

* Fix rename problem as well

The on_rename function should update self.current_style as well. To avoid this scenario:
1. Create style A.
2. Create style B.
3. Rename style B to C.
4. Switch to style A.
5. Press OK.
6. Start the tool again.
7. Result: there are 3 styles A, B and C.
2024-11-13 10:02:20 +01:00
Roy-043
b96f02b5c8 Draft: Fix Shape2DView finish bug
The Draft_Shape2DView did not finish properly if no object was selected.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=92031
2024-11-11 17:15:24 +01:00
Yorik van Havre
aabc219366 Merge pull request #17538 from wwmayer/doc_obj_py
Core: Extend DocumentObjectPy
2024-10-28 17:31:23 +01:00
Yorik van Havre
f78f0db5d9 Draft: Warn user if using trimex on unsupported curve type - fixes #17346 2024-10-28 17:12:06 +01:00
Yorik van Havre
66592632c4 Draft: Fixed trimex bug when snapping to itself - fixes #17345 2024-10-28 16:57:50 +01:00
wmayer
e28c64b6eb Draft: Fixes #17461 2024-10-28 14:13:50 +01:00
bgbsww
64ecfe7a0e Make python Regex Strings raw to avoid py3.12 SyntaxError 2024-09-30 17:42:49 +02:00
Syres916
f00b236dfb [Draft] Improve the color activation and ability to change… (#16603)
* [Draft] Improve the color activation and ability to change size of the snap text

* [Draft] Correct dimension text size calculation
2024-09-19 09:03:33 +02:00
Yorik van Havre
6c5e90a6d2 Draft: Fixed function case 2024-09-13 15:00:47 +02:00
Yorik van Havre
8ef66ad73d Draft: Fixes error in Draft trackers when not on a 3D view 2024-09-13 15:00:47 +02:00
Roy-043
fe40748c10 Draft: fix snapping to endpoints of dimension lines (V0.19 regression)
This fixes a regression introduced in V0.19 (!) when the type of linear dimensions was changed from "Dimension" to "LinearDimension".

Forum topic:
https://forum.freecad.org/viewtopic.php?t=90292
2024-09-05 13:18:32 +02:00
Roy-043
44c796c8d3 Draft: Fix error handling of Draft_Trimex
Selecting an edge or vertex of a solid was not handled properly. The tool does not support these subelements, but the code did not call self.finish() is such cases.
2024-09-02 10:46:08 +02:00
Roy-043
f6c8850e80 Draft: Fix cursor scaling (#15745)
* Draft: Fix cursor scaling

The get_cursor_with_tail function was rewritten to match the Sketcher cursor code. Hopefully this fixes the scaling issue.

Related issue:
#13696

Related forum topic:
https://forum.freecad.org/viewtopic.php?t=89494

@maxwxyz
Can you check if this code fixes the issue? Apart from the size the 'hot' pixel should be checked. If you approach a vertical line from the left or right it should get highlighted at the same distance.
2024-08-08 12:07:34 +02:00
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
Roy-043
5e95bb788a BIM: Fix BIM_Box command
Fixes #14823.

Depending on the order and location of the picked points, the Placement of the Box could be unexpected. The Height value was always positive if points were picked, a negative Height entered in the input box would lead to errors.

Additonally:
* Avoided some code duplication.
* Added a proper transaction to make the command undoable.
2024-07-02 10:40:48 +02:00
Roy-043
977b20d603 Draft: remove code related to obsolete Std_MeasureDistance objects
The Draft_Dimension command could convert Std_MeasureDistance objects. These have recently become obsolete. This PR removes the related code.
2024-06-24 10:31:03 +02:00
Roy-043
2aa7296cc6 Draft: Add type check to Draft_Join
Add a type check for the selected objects. All must be Draft Wires.

Fixes #14727.
2024-06-20 14:05:21 +02:00
Roy-043
246aa8e1eb Draft: Draft_Hatch put focus on task panel
To make using Esc work properly the task panel should have the focus.
2024-06-17 11:25:01 -05:00
Roy-043
f2d3cf701a Draft: Draft_Split put focus on 3D view
To make using Esc work properly the 3D view should have the focus.
2024-06-17 11:24:36 -05:00
Yorik van Havre
dd7a8c3eba Draft: Fixed ghosts vanishing when using mouse delay - issue #12624 (#14358) 2024-05-30 22:41:54 +02:00
Roy-043
af36a49d68 Draft: improved IsActive behavior (#14103)
Related issue: #14061.
2024-05-18 11:38:38 +02:00
Roy-043
fa79c9d987 Draft: Draft_Split fix unhandled exception (#14059)
Fixes #13951.

Regression introduced by #12261.
2024-05-16 22:02:56 +02:00
Roy-043
33486369a5 Draft: Draft_Slope input did not obey Decimals pref (#14060)
Forum topic:
https://forum.freecad.org/viewtopic.php?t=87686
2024-05-16 22:02:25 +02:00
Chris Hennes
fef3a24187 Merge pull request #13914 from Roy-043/Draft-Draft_SetStyle-new-Material-handling
Draft: Draft_SetStyle new Material handling
2024-05-13 11:22:11 -05:00
Roy-043
ec44573bdc Draft: minor refactor of layer code (#13948) 2024-05-12 09:49:04 +02:00
Roy-043
4fcbff191f Draft: Draft_SetStyle new Material handling
Discussion: #13657.
2024-05-09 10:49:19 +02:00
Roy-043
bd39f4396d Clean up... 2024-05-06 11:07:23 +02:00
Roy-043
34afffc148 More files are involved... 2024-05-06 11:07:23 +02:00
Roy-043
22dc172154 Draft: Do not show temporary line object in tree (additional)
#13778 introduced `self.obj.ViewObject.ShowInTree = False` to hide the temporary object. But objects that are hidden in the tree are displayed in the tree when they are selected in the 3D view. This selection occurs during commands that take more than 2 points. The solution is to change `self.obj.ViewObject.Selectable` on mouse button up/down.

Fixes #13700.
2024-05-06 11:07:23 +02:00
Yorik van Havre
b731b8a9e8 Draft: Do not show temporary line object in tree - fixes #13700 2024-05-02 11:04:15 +02:00
WandererFan
689a13527c Merge pull request #13489 from yorikvanhavre/draft-axes-colors
Draft: Use preference-stored colors for axes colors
2024-04-22 12:08:17 -04:00
Roy-043
a043cfa376 Draft: Draft_ToggleGrid should update the grid
Fixes #13530.
2024-04-19 15:42:28 +02:00
Yorik van Havre
d67cd2b925 Draft: Use preference-stored colors for axes colors - issue #12208 2024-04-16 10:20:01 +02:00
Roy-043
f90b47cbbc Let param observer trigger grid color change
If you change the grid color in the preferences and cick the Apply button, the color of all grids is updated now. So you can experiment while the Preferences Editor is open.

I have kept but moved the grid color button in the Draft_SelectPlane task panel for now. So that both options can be tested.
2024-03-24 09:58:51 +01:00
Yorik van Havre
70f2f14702 Draft: a bit more contrast to the grid 2024-03-20 13:35:40 +01:00
Yorik van Havre
d0a87573c9 Draft: Allow to change grid color in WP taskpanel 2024-03-20 12:20:31 +01:00
Yorik van Havre
b2f1add784 Draft: Introduce mouse delay (#12624)
* Draft: Introduce mouse delay - fixes #11807

* Draft: set default mouse delay to 1
2024-03-11 11:54:07 -05:00
Chris Hennes
debc7df148 Draft: Translate annotation styles editor 2024-03-04 11:30:31 +01:00
Roy-043
ca1a10585a Draft: fix wrong selection after commands (improved)
The previous fix was not correct. Some commands would cause a crash and several files were missed.

Forum topic reporting a crash:
https://forum.freecad.org/viewtopic.php?t=85243
2024-02-16 10:56:10 +01:00
Roy-043
167b3846de Draft: gui_line_add_delete.py is obsolete 2024-02-15 22:20:53 +01:00
Roy-043
3b3ed05dc8 Draft: fix wrong selection after commands
Fixes #10469

The code of the `end_all_events()` function is by Chris Hennes (chennes).
See https://forum.freecadweb.org/viewtopic.php?p=656362#p656362.
2024-02-12 11:32:58 -06:00
Roy-043
a138348910 Draft: Draft_Edit: restore Relative checkbox
The relative checkbox was hidden by mistake.
2024-02-07 10:26:16 +01:00
Syres916
e4bb7a98e2 [Arch] [Draft] Add guard for RootNode specific child 2024-02-05 11:00:38 +00:00
Roy-043
e6c68aab31 Draft: Fix messages for Draft_Fillet
There were still too many messages.
2024-02-03 19:46:20 +01:00
Roy-043
842b0b230b Draft: Fix Draft_Wire conversion function
The Draft_Wire command can combine selected Draft_Wires and Draft_Lines into a single wire. This function did not always behave properly.
* Edges were not sorted, the result could have a different shape (with the correct vertexes).
* If edges formed  a closed shape the resultant wire was not closed.
2024-02-02 22:54:34 +01:00