Commit Graph

2642 Commits

Author SHA1 Message Date
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
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
wmayer
6237a0e67b Gui: rename getPointOnScreen() to getPointOnViewport() 2023-04-08 13:51:32 +02:00
André Caldas
9d54668d1e Deletes GCS::Constraint directly instead of calling GCS::free(). 2023-04-06 16:29:48 +02:00
wmayer
03cf7f05bf [skip ci] Sketcher: disable button fixDegenerated when opening the dialog 2023-04-05 11:22:27 +02:00
wmayer
1fc3f52e73 Sketcher: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
73f5e5ad57 Sketcher: restore toolbars when changing between workbenches in edit mode
This partially fixes issue #9135
2023-04-03 17:36:06 +02:00
luzpaz
f5e58adad2 Fix trailing whitespace 2023-04-02 12:18:13 +02:00
0penBrain
58a9af212a Sketcher: do not apply line/edge color preference to existing sketches, fixes #8188 2023-04-01 16:31:17 +02:00
0penBrain
8bea52a5bf Gui: prevent crashes on MacOS using boost::format 2023-03-31 15:22:03 +02:00
Paddle
4dca86c503 Sketcher: Grid pref: Change names. 2023-03-27 15:22:32 +02:00
Uwe
b9864e7b0a [Sketch] placecgs: remove unused includes
- also sort includes
- also fix too long lines etc. (done by clang formatter)
2023-03-26 20:27:18 +02:00
wmayer
506615042e Sketch: fix trailing whitespaces of recorded sketcher commands 2023-03-26 18:41:56 +02:00
xtemp09
a65a7f6740 [Sketcher] Fix segmentation fault in ViewProviderSketch::setEdit
Closes #8979
2023-03-25 00:02:32 +01:00
Ajinkya Dahale
fc3086a96e [Sketcher] Fix some coincidence issues in B-spline drawing
See https://github.com/FreeCAD/FreeCAD/pull/8530#issuecomment-1474824366.

When there are already existing points and coincidence auto-constraints are
added in the process of making a B-spline (either by control points or
interpolation), unintended behaviour can happen.

Additionally, when creating B-spline by interpolation, if consecutive points are
coincident (or very close to each other), the OCCT algorithm fails. This is also
prevented in this commit.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
60e79a14e4 [Sketcher] Fix corner-case issue creating periodic b-splines
See: https://github.com/FreeCAD/FreeCAD/pull/8530#issuecomment-1474824366.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
d2d69e274c [Sketcher] Run clang-format on DrawSketchHandlerBSplineByInterpolation.h 2023-03-24 16:30:48 +01:00
Ajinkya Dahale
d6060c79aa [Sketcher] Clear out some TODOs and other comments 2023-03-24 16:30:48 +01:00
Ajinkya Dahale
02558f3793 [Sketcher] Fix and support periodic B-spline by interpolation
This commit is part of a project funded by the Open Toolchain Foundation under
the title "Open Toolchain Foundation - Curve drawing tool in Sketcher
Workbench".
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
bae30c6bd7 [Sketcher][planegcs] Fix knot position in non-uniform B-spline
The default factors set in `addConstraintInternalAlignmentKnotPoint` does not
work if the knots around a C1 knot are not equally far.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
176562c60d [Sketcher] Disable degree setting in B-spline by interpolation
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
ab64e2251d [Sketcher] Add missing GUI elements for B-spline by knots
Commented out the periodic version for now since they don't work completely well.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
944c31cf7b [Sketcher] Add icon for B-Spline by interpolation tool
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"

[Sketcher] Add better icons for `CreateBSplineByInterpolation`

Courtesy @paddlestroke.
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
7c1a2d738e [Sketcher] Support variable multiplicities in B-splines
As a side-effect also prevents a segfault possible by providing just 3 points.

[Sketcher] Clarify that mults might not be followed

Some examples when this may be ignored include:
1. A number higher than 3 is given (because cubic B-splines are created)
2. If the knots just before and just after have multiplicities >=3, the piece
between these two is fully continuous, and this (middles) point will only be
constrained with point-on-object.

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00
Ajinkya Dahale
3e5f3a9a57 [Sketcher] Constrain first pole weight in exposeInternalGeometry
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
2023-03-24 16:30:48 +01:00