Commit Graph

2514 Commits

Author SHA1 Message Date
Abdullah Tahiri
194fbf1efe Sketcher: Correct font sizes and updates
========================================

Fonts:
- SoDatumLabel internally uses QFont and thus points. It was being fed pixels, for which the configured size in preferences did not match the actual on screen size. This is corrected.
- Font sizes fed directly from parameters to the coin nodes skeleton were not being updated, as the parameter observer is initialised after the nodes are created, and the parameter
observer was not configured to update this nodes. This is corrected.

Colors:
- Some color parameters were not being being updated by the parameter observer. This is corrected.
2023-02-15 17:29:46 +01:00
Syres916
2431932ae1 [Sketcher] Fix cursor coordinates text size...
...to stay in proportion to the constraint text size. Fixes https://github.com/FreeCAD/FreeCAD/issues/7080
2023-02-14 15:07:01 +01:00
Yorik van Havre
0566d90cc5 merged crowdin translations 2023-02-13 15:45:26 +01:00
Yorik van Havre
d8b0e64e14 Merged crowdin translations 2023-02-07 15:55:31 +01:00
Yorik van Havre
94cd431eb2 updated ts files 2023-02-07 15:55:31 +01:00
wmayer
d25e171ef3 Sketcher: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wandererfan
de723238fa [Sketcher]fix cursor display of angles 2023-01-30 11:04:42 -08:00
Yorik van Havre
80c68fa4df Merged crowdin translations 2023-01-30 10:04:15 +01:00
Yorik van Havre
81552acdeb update ts files 2023-01-30 09:55:26 +01:00
Ajinkya Dahale
7ba24d5572 [Sketcher] Substitute knot tangent related constraints 2023-01-23 20:43:51 +01:00
luzpaz
593ab90400 Sketcher: convert indentations to spaces 2023-01-23 15:46:49 +01:00
Yorik van Havre
433b17b829 Merged crowdin translations 2023-01-23 11:25:49 +01:00
Yorik van Havre
48fdd4896a Updated ts files 2023-01-23 10:41:33 +01:00
luzpaz
feb18d8a15 Fix various typos 2023-01-22 20:27:47 -06:00
luzpaz
79e150a81b Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
Uwe
0f7dc4f60c [Sketch] Constraints.h: fix 2 compiler warnings
- the type change fixes this error: \src\Mod\Sketcher\App\planegcs\Constraints.cpp(509,54): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data
- the scone change removes a non-existing definition
2023-01-22 22:30:42 +01:00
Ajinkya Dahale
fe90c2e9ca [Sketcher] Do not filter out point-on-B-spline when trimming
Fixes #7770.

Until Point-on-B-spline is actually merged this will result in a malformed
constraint. It will however still allow a trim of the B-spline to result in a
coincident constraint.
2023-01-21 21:42:57 +01:00
Ajinkya Dahale
56650864c4 [Sketcher][planegcs] Dynamically change piece in point-on-BSpline 2023-01-21 21:41:27 +01:00
Ajinkya Dahale
6c81ad262e [Sketcher][planegcs] Refactor ConstraintPointOnBSpline 2023-01-21 21:41:27 +01:00
Ajinkya Dahale
233f976b63 [Sketcher] [planegcs] Support point on NURBS
This change adds support for rational B-splines. Non-uniform b-splines already
supported.
2023-01-21 21:41:27 +01:00
Ajinkya Dahale
b3c4975b09 [Sketcher] Auto-constrain point on B-spline 2023-01-21 21:41:27 +01:00
Ajinkya Dahale
d5793dc0e4 [Sketcher] Enable point-on-B-spline in Sketcher and GUI
Also squashes:

[Sketcher] Allow point on external B-spline
2023-01-21 21:41:27 +01:00
Ajinkya Dahale
4f3f566423 [Sketcher] [planegcs] Add point-on-bspline constraint in planegcs
Only non-rational B-spline for now
2023-01-21 21:41:27 +01:00
Ajinkya Dahale
6d59b2d28e [Sketcher] Add line tangent at knot through endpoint 2023-01-17 16:02:23 +01:00
Yorik van Havre
5033f64ce9 Merged crowdin translations 2023-01-17 09:40:31 +01:00
Yorik van Havre
12239f7f99 Updated ts files 2023-01-17 09:24:46 +01:00
Ajinkya Dahale
99696be7cf [Sketcher] Do not allow B-spline degree to be too high
...depending on number of poles (and periodic status).

NOTE: It is still possible to run the command in console with a higher degree.
2023-01-16 16:45:17 +01:00
wmayer
7a8f48d4e0 Sketcher: move to new style connect() 2023-01-13 20:17:53 +01:00
Ajinkya Dahale
e25896df37 [Sketcher] Prevent dereferencing nullptr in ConstraintView
Fixes #8104.

As described in that issue, a crash happens under the following
conditions:
1. A `DrawSketchHandler` is active.
2. No constraint is selected.
3. Context menu on the `ConstraintView` is triggered.
2023-01-13 15:06:39 +01:00
wmayer
3f615bbe05 Gui: fix possible problems with new style connect
* In UIntSpinBox rename the signal to not overwrite the signal of the base class
* In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox
* To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
2023-01-12 17:02:59 +01:00
Uwe
5ad737ccdc [Gui] modernize some connect() settings
- addresses #6166
2023-01-12 15:13:16 +01:00
Abdullah Tahiri
152dda172c Part/Sketcher: Geometry/Geometry facade pass by const-reference instead of by value 2023-01-09 17:13:26 +01:00
Abdullah Tahiri
04a7478afb Sketcher: Do not mark as fully constrained sketches that do not converge
=======================================================================

In uncommon situations, the analysis of QR decomposition leads to full rank, but the result does not converge.

We avoid marking a sketch as fully constrained when no convergence is achieved.
2023-01-09 17:11:14 +01:00
Yorik van Havre
ec6b14bbee Merged crowdin translations 2023-01-09 14:06:28 +01:00
Yorik van Havre
c1160c598a Updated ts files 2023-01-09 13:24:16 +01:00
Abdullah Tahiri
9811d6cbb9 GCS: Improvements to popularity contest and conflicting identification
======================================================================

1. Instead of excluding internal alignment constraints from popularity candidate selection, exclude them from the group altogether. This
ensures no group is non-empty with uneligible candidates, which prevents an infinite loop in uncommon circumnstances (when DoFs collapse).

2. Ensure no internal alignment constraint is identified when conflict ensues.
2023-01-06 13:49:56 -06:00
Ajinkya Dahale
9aba979b27 [Sketcher] Delete check for OCC >= 6.9.0
The oldest version we plan to support is 7.0.0. See
https://forum.freecadweb.org/viewtopic.php?f=10&p=650487#p650487.
2023-01-05 00:27:01 +01:00
wmayer
91613cc24c Mod: fix some compiler warnings:
* QString::indexOf() is now marked as [[nodiscard]]
* QApplication::fontMetrics() is deprecated, use the constructor of QFontMetricsF
* fix -Wunused-result
* fix -Wunused-but-set-variable
2022-12-31 21:54:45 +01:00
Ajinkya Dahale
0c017a39f6 [Sketcher] Disallow tangent-at-knot for non-line in solver
This is already stopped in the GUI, but this is still possible by passing the
curve IDs through the console.
2022-12-24 18:22:16 -06:00
Ajinkya Dahale
bb8a3c8885 [Sketcher] Disallow tangent at knot with non-line in GUI 2022-12-24 18:22:16 -06:00
Abdullah Tahiri
8a3b3537b3 Sketcher: Avoid trying to lock tangency for tangency at knot point constraint 2022-12-24 18:22:16 -06:00
Abdullah Tahiri
062e9f75ca Sketcher: Add convenience method to check for internal alignment type 2022-12-24 18:22:16 -06:00
Ajinkya Dahale
0ab7d50639 [Sketcher] Do not use TangentViaPoint for tangent-at-knot 2022-12-24 18:22:16 -06:00
Abdullah Tahiri
b015ae3f0d [Sketcher] Separate line-tangent-at-knot from angle-at-point
The latter is intended for a specific solver constraint.

[Sketcher] Make further changes for tangent-at-knot separation

1. Remove code for tangent-at-knot from `addAngleAtPointConstraint`.
2. Use correct order of input.
3. Separate internal C0 knot vs end knots. The latter can still be constrained
but the user must use endpoints of the spline instead of knots.
2022-12-24 18:22:16 -06:00
Abdullah Tahiri
e3fe3902df Sketcher: Solver - add map for Internal Alignment geometry 2022-12-24 18:22:16 -06:00
Ajinkya Dahale
598e86a644 [Sketcher][planegcs] Make changes as per review on #7484
Similar to 2715a66ff02a46f94ae3fc6527fd446e666b8e58.

Added some comments and removed some TODO's.

Return grad values directly rather than doing summation.
2022-12-24 18:22:16 -06:00
Ajinkya Dahale
322306ccf9 [Sketcher][planegcs] Use only line direction in tangent-at-knot
This discourages reducing the size of the line when it is more normal than
tangent.
2022-12-24 18:22:16 -06:00
Ajinkya Dahale
3f91c52b3f [Sketcher][planegcs] Fix tangent at knot for C1 knots 2022-12-24 18:22:16 -06:00
Ajinkya Dahale
af5bc953c9 [Sketcher][planegcs] Handle type issues with int and size_t
... and `unsigned int`

Suggestions thanks to @abdullahtahiriyo
2022-12-24 18:22:16 -06:00
Ajinkya Dahale
75f2a1d69a [Sketcher] Use tangent at B-spline knot constraint
Also squashes:

[Sketcher] Make tangent-at-knot with just knot and line

[Sketcher] Disallow tangent at C0 knot

If passed on to planegcs can cause segmentation fault.

[Sketcher] (Re-)Support tangent at B-spline end-knots

New code had introduced problems for non-periodic spline end-points, and
periodic spline "end-points" were not supported anyway.

(here end-points mean star/end points)
2022-12-24 18:22:16 -06:00