Commit Graph

2665 Commits

Author SHA1 Message Date
Abdullah Tahiri
60d99ca570 Sketcher: Obey non-intrusive preferences for modal pop-ups
==========================================================

This commit turns the remaining blocking pop-ups in which the user can only click "ok"
into non-intrusive notifications, depending on the user preferences in settings.
2023-05-24 18:35:41 +02:00
wmayer
12c20003b3 Sketcher: fix crash when creating a parabola or hyperbola or when using Sketcher_Split
Forum: https://forum.freecad.org/viewtopic.php?t=78543
2023-05-23 20:01:41 +02:00
Abdullah Tahiri
0e85b24348 Sketcher: Command constraints error handling adaptation
=======================================================

- Better handling for exceptions originating in Python addConstraint.
- Refactor to reuse code for handling of exceptions
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
2338ae633e Sketcher: Make Command Constraints show the severity of warning for typical user mistakes 2023-05-23 14:24:45 +02:00
Jonas Bähr
dc07897a29 Sketcher: Add tests for Circle to Line distance constraint
Note that support for secants currently only works for reference
constraints but not for driving ones. If and how this should be done
is still under discussion [1].

[1]: https://github.com/FreeCAD/FreeCAD/pull/9044#issuecomment-1548006842
2023-05-23 14:19:51 +02:00
Chris Hennes
20f073e84e Update translations 2023-05-21 19:13:11 -05:00
Abdullah Tahiri
987b4bda2a Sketcher: App - Clang-format 2023-05-20 07:55:05 +02:00
Abdullah Tahiri
2ae7cc4a94 Sketcher: PlaneGCS C-lang formatting
====================================

As per:
https://forum.freecad.org/viewtopic.php?t=77205

Please use pre-commit as described in:
https://github.com/FreeCAD/DevelopersHandbook/blob/master/gettingstarted/index.md#setting-up-for-development
2023-05-20 07:55:05 +02:00
Chris Hennes
0b41c4a8a8 Update translations 2023-05-18 07:49:08 -05:00
Abdullah Tahiri
d4d5aaf306 Skecher: Rendering order
========================

Recently the rendering order functionality was temporarely removed, as it interferred with the development of visual layers.

However, the release comes before visual layers are finished and can provide such functionality.

This commit reintroduces the functionality for the release.
2023-05-17 16:29:34 +02:00
Abdullah Tahiri
bb5d09ff9b Sketcher: RenderingOrder resources and icons 2023-05-17 16:29:34 +02:00
Abdullah Tahiri
8b9096ede1 Sketcher: New edit tools toolbar
================================

Move Grid and Snap to edit tools
2023-05-17 16:29:34 +02:00
Chris Hennes
f90aed491e Sketcher: Translate context menu 2 2023-05-17 14:43:57 +02:00
Chris Hennes
ff989512e5 Sketcher: Translate context menu 2023-05-17 14:43:57 +02:00
Florian Foinant-Willig
e69e9019df Sketcher: fix Circle to Line distance constraint display 2023-05-15 12:14:21 +02:00
Florian Foinant-Willig
6de3c5833f Sketch: Fix Point to Line constraint display 2023-05-14 21:37:21 +02:00
Abdullah Tahiri
f4c1a7c3f5 Solver: Fix Circle-To-Line differentials 2023-05-14 21:15:46 +02:00
Chris Hennes
80b29d2dbf Gui: Minor translation fixes 2023-05-11 18:31:34 -05:00
Chris Hennes
4c282fe0df Merge pull request #9497 from wwmayer/generate_qm_files
Generate qm files
2023-05-10 18:18:25 -05:00
Florian Foinant-Willig
6765afd12b Set helper default hidden 2023-05-07 20:14:03 +02:00
Florian Foinant-Willig
36a46faf07 Sketcher: add a circle overlay for arcs 2023-05-07 20:14:03 +02:00
Roy-043
13cf9a9fdb Sketcher: improve context menu text for Sketcher_ToggleConstruction
In the Elements context menu (Sketcher task panel) the menu text for Sketcher_ToggleConstruction is "Toggle construction line", this should be "Toggle construction geometry". It is not just lines that can be toggled, and this is also the menu text in the main Sketcher menu.
2023-05-07 19:52:12 +02:00
Roy-043
ac79d19096 Sketcher: Sketcher_SelectHorizontalAxis before Sketcher_SelectVerticalAxis in menu
The X axis related command should come before the Y axis command.
2023-05-07 19:51:23 +02:00
wmayer
9540b97633 Sketcher: Create .qm out of .ts files 2023-05-07 08:49:34 +02:00
Chris Hennes
1a4b85121b Merged crowdin translations 2023-05-06 11:56:32 -05:00
Roy-043
c5bf4ea105 Sketcher: element arc icons have start and end point switched
In the icons arcs are shown as CW when in fact they are CCW
2023-05-04 14:03:27 -04:00
wmayer
2de08f77b7 Use View3DInventorViewer::setSelectionEnabled instead of SoFCUnifiedSelection::selectionRole 2023-05-04 08:03:11 +02:00
Abdullah Tahiri
b626caffdc Sketcher: Fixes wrong redundancy reporting
==========================================

fixes #6174

Problem
=======

The popularity contest heuristic was designed to assume that removing one solver constraint from a redundant group would potentially satisfy it.

This means that for sketcher constraints comprising several solver constraints, the sketcher constraint would never be notified as redundant, but
always partially redundant (where the case may be that it is redundant or that it is partially redundant). This happens because after removing one
solver constraint, it may happen:

(a) that no other solver constraint corresponding to the sketcher constraint remains in the redundant group (so it is indeed partially redundant)
(b) that at least one other solver constraint corresponding to the sketcher constraint remains in the redundant group (so if all solver constraints
remain in the redundant group, the sketcher constraint is actually redundant). This happens because solver constraints of a single sketcher constraint
are orthogonal and consequently, a conflict (or redundancy) emanating from removing one of them cannot actually satisfy the group, as it has no effect
on the other.

Solution
========

When popularity constraint decides on one solver constraint, remove any other solver constraint of the same tag (i.e. same sketcher constraint) that is
present in the conflict group (case b). This does not affect case a, because the solver constraint that is not redundant is not present in the conflict
(redundancy) group.
2023-05-03 16:32:50 +02:00
Chris Hennes
a0fc6bc727 Sketcher: Tweak wording as suggested by translators 2023-05-02 20:29:36 +02:00
Chris Hennes
6daec8ab34 Merge pull request #9434 from chennes/sketcherTranslateAttachmentDialogTake2
Sketcher: Translate the menu entries in attach dialog
2023-05-02 10:24:36 -05:00
Chris Hennes
3cdb347c72 Merge pull request #9437 from chennes/updateTranslations20230429
Update translations
2023-05-02 10:24:05 -05:00
Florian Foinant-Willig
70eb14ac9c Sketcher : Circle to Line Distance Constraint 2023-05-02 15:41:51 +02:00
Chris Hennes
fb60e9a0e6 Update translations 2023-04-29 11:10:27 -05:00
Chris Hennes
6d01ff73fb Sketcher: Translate the menu entries in attach dialog 2023-04-28 19:09:45 -05:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Abdullah Tahiri
d656d4e959 Sketcher: Change behaviour of toggle of mixed group of edges and vertices
=========================================================================

Forum:
https://forum.freecad.org/viewtopic.php?p=677304#p677304

A common operation is to toggle a group of geometry to/from construction. This happens often
in connection with carbon copy operations.

When this happens, geometry is often selected using box selection.

If there are geometry points (which are generally construction), and selection box is used, this
results in construction points being toggled to normal defining mode. This situation is undesirable
in 99% of the cases. It requires to reselect only the points and toggle them back.

When construction points need be made defining geometry (for example to use them as attachments), the
general workflow is to select only those points and toggle them.

In order to improve the efficiency, it has been decided to provide a special behaviour for construction
toggling:

1. Vertices will only be toggled to/from construction IF ONLY vertices are selected.
2. If there is a mixture of edges and vertices, vertices will be ignored during the toggling operation.
2023-04-22 22:19:41 +02:00
Syres916
562c967082 [Sketcher] Allow experienced users to not have...
...the extra points created on rounded rectangles, it started to become a real pain when box selecting large amounts of geometry and having to keep changing the two points back to construction. New and existing users are completely unaffected.
2023-04-22 21:04:23 +02:00
Chris Hennes
22d8c8f0dd Sketcher: Add gtest unit test framework 2023-04-22 20:56:29 +02:00
Abdullah Tahiri
04dce2546c Sketcher: Fix typo 2023-04-22 15:21:24 +02:00
Chris Hennes
c0b5fb2f8c Sketcher: Translate the attacher GUI dropdown 2023-04-22 15:12:15 +02:00
Abdullah Tahiri
a6adfc58b6 Sketcher: Fix overlapped points not selecting/preselecting
=========================================================

Fixes an issue reported directly by Chrisb.

On overlapping points, such as due to coincidence, selection and
preselection (e.g. from the ElementsWidget) is not shown for those
points which are rendered first.

Solution: To raise the points to the highlight height.
2023-04-22 15:07:34 +02:00
Abdullah Tahiri
bfd8e5d334 Sketcher: Tooltips for solver message hyperlinks
================================================

I promised Uwe I would look into improving the information of the solver messages, including the abbreviation DoF.

I wanted to keep the effort by Paddle to reduce the width of the taskbar.

This commit introduces new explanatory tooltips for the hyperlinks, a different tooltip per type of information.

UrlLabel sets the tooltips automatically to the url text on change. This commit modifies the tooltip just after the change,
so that the meaningful tooltip is shown.
2023-04-21 19:45:06 +02:00
Abdullah Tahiri
11c76c998e Sketcher: Fix double icons not selectable
=========================================

The scaling factor used  was the one of the ViewProviderSketch, however ZoomTranslation uses its own scaling factor.

fixes #6283
2023-04-20 20:45:40 +02:00
Abdullah Tahiri
423ff82409 Sketcher: SoZoomTranslation - expose scaling factor
===================================================

This commit exposes the scale factor used.
2023-04-20 20:45:40 +02:00
Yorik van Havre
33c2e485e3 Merged crowdin translations 2023-04-20 14:04:19 +02:00
Yorik van Havre
d96042fc24 Updated ts files 2023-04-20 13:53:35 +02:00
Chris Hennes
8fadc2ba05 Merge pull request #9199 from Ondsel-Development/image_task
Image: Merge taskboxes into one 'Image plane Settings'.
2023-04-17 14:24:35 -05:00
Edoardo Morandi
28ff8df3f0 fix: uninitialized class variable
This specific boolean variable could be used uninitialized. Assigning it
a default value is cheap and it avoids the issue.
2023-04-16 00:59:16 +02:00
Paddle
fc8c1cbed7 Move SoDatumLabel from Sketcher to Core so that it can be reused anywhere. 2023-04-12 16:48:07 +02:00
0penBrain
01e0948a2a [Bugfix]Sketcher: edge/point colors in preferences aren't took into account
Regression introduced by 58a9af2 (PR #9151)
2023-04-10 11:13:02 +02:00