Commit Graph

2374 Commits

Author SHA1 Message Date
Chris Hennes
1fac3fead0 cMake: Add support for compiling against Qt6 (#7647)
Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option,
which can be set to either "Auto" (default), 5, or 6. Auto detects which
version of Qt is installed on the system and chooses it. If both version
are installed, Qt5 is used.

Note that this DOES NOT implement compiling against Qt6, it only adds
the necessary cMake infrastructure to begin work on the source code
changes that will be required.
2022-10-31 09:24:09 -05:00
Paddle
5328c5f726 Optional : Point icon color fix. From green to red. This way internal points are yellow. Construction points are blue. The issue is that all normal points are construction. So they appear blue and not red. Not sure if that's a problem. 2022-10-29 20:25:34 +02:00
Paddle
cd3b7e26c6 Fix issues raised by OpenBrain. 2022-10-29 20:25:34 +02:00
Paddle
3f87aa90b1 ElementWidget: Fix extended naming settings not initializing. Adds 'Collapse filter' option. 2022-10-29 20:25:34 +02:00
Abdullah Tahiri
d8b89b2253 Sketcher: ElementWidget - Rename ElementType to SubElementType - make SubElementType nested to ElementItem 2022-10-29 20:25:34 +02:00
Abdullah Tahiri
098a154ad3 Sketcher: ElementItem - do not select/preselect invalid 2022-10-29 20:25:34 +02:00
Paddle
fef871320b SKETCHER: Element widget rework see https://forum.freecadweb.org/viewtopic.php?f=8&t=72239&sid=b7787fadb4c2a7e9682d28f31ede5eb8 2022-10-29 20:25:34 +02:00
Abdullah Tahiri
bcc1b621b9 Sketcher: GeometryFacade - new static function to check for internal alignment 2022-10-29 20:25:34 +02:00
Roy-043
7ae40aebd2 Sketcher: Correct icon for Sketcher_CreatePointFillet 2022-10-25 00:33:28 +02:00
Abdullah Tahiri
4d1e1733e3 Sketcher: Solver - Improvement of popularity contest and bug fix
================================================================

Master has a problem in that internal alignment constraints are suggested to the user for removal.

This is fundamentally wrong, as an internal alignment constraint are an inherent part of the geometry. They cannot be the ones suggested for removal.

The popularity contest algorithm is an heuristic algorithm that determines which redundant/conflicting constraints should be proposed for removal.

Basically, the algorithm works on groups of redundant/conflicting constraints detected via the QR decomposition. A constraint may belong to more than one group.

The algorithm runs some heuristics, each constraint scoring a value, the one constraint from each group scoring the highest is proposed (is more popular and wins the contest).

This PR documents the algorithm, and adds a further condition, that internal alignment constraints are never proposed.

As the solver works with solver constraints as opposed to the sketcher, which works with sketcher constraints, information about whether a solver constraint originated from a
sketcher constraint that is internal alignment is necessary. So the solver constraint is extended to accomodate this piece of information.

As a bonus, it fixes a bug. Solver constraints carry information of the ID of the corresponding sketcher constraint in their tag. Knots are not currently implemented as constraints.
However, the tag index was not being update. This caused the popularity contest to provide wrong suggestions despite good detection.
2022-10-21 19:54:51 +02:00
Paddle
56e067a521 Sketcher: remove select DOF. 2022-10-21 09:47:07 -05:00
0penBrain
4e6625ac12 Sketcher: remove unneeded flag 2022-10-21 15:15:43 +02:00
wmayer
5f0f51bedc Sketcher: fix possible crash when closing the sketcher
For more details see the forum thread: https://forum.freecadweb.org/viewtopic.php?f=13&t=72774
2022-10-21 10:23:53 +02:00
luz paz
774341fd90 [Sketcher] [Part] Fix typos and whitespace 2022-10-19 11:36:56 +02:00
0penBrain
3581d0f6c7 [Bugfix]Sketcher/BackEdit : Backedit lost if user changed camera mode
- in current implementation, backedit feature is lost if user changes camera mode (for example from orthographic to
   perspective, or oppositely). This happens because when changing camera mode, Coin actually do not just change a
   parameter of the camera node, but delete the current camera node and add a new one to the scenegraph. Thus the
   SoFieldSensor currently used (attached to camera orientation) is just detached and sensing is left -- notice is would
   be same with a SoNodeSensor attached to camera node --. The solution is to attach the sensor at scenegraph root node
   so it isn't lost when camera mode changed. No pre-check (such as checking if camera node changed since last call) has
   been added currently because it would not actually reduce callback execution time (and even worsen it).
2022-10-19 11:34:17 +02:00
Yorik van Havre
1ae780d3b1 Merged crowdin translations 2022-10-17 15:12:16 +02:00
Yorik van Havre
d50f062e34 Updated ts files 2022-10-17 11:18:07 +02:00
Uwe
15929073ca [Sketch] TaskSketcherGeneral.ui: add missing stdset
- were strangely removed by out sort_ui.py script but are of course important
2022-10-17 02:51:25 +02:00
Uwe
45702c32af [Sketch] TaskSketcherGeneral.ui: fix compiler warning
- problem was the customwidget declaration
- the other changes were made by Qt's designer and our sort_ui.py script
2022-10-17 02:36:33 +02:00
Uwe
a868f12b2a Revert "[Sketch] TaskSketcherGeneral: restore wording of FC 0.20"
This reverts commit d38f4f6fd230f8346ebe2e264a078b003945c9e2.
2022-10-17 02:31:08 +02:00
Ajinkya Dahale
c624d40476 [Sketcher] Allow driving constraint on construction geometry
Fixes issue #7442.

Also, the following commits are squashed into this one:

[Sketcher] Remove unnecessary variables

[Sketcher] Use `setDriving` within `toggleDriving`

Suggestion courtesy @0penbrain.

[Sketcher] Remove redundant check: `SketchObject::testDrivingChange`

`GeoEnum::GeoUndef = -2000` so checking if it's `< 0` is redundant.
2022-10-16 11:20:15 +02:00
Uwe
e259f12dfb [Sketch] TaskSketcherGeneral: restore wording of FC 0.20
- see https://forum.freecadweb.org/viewtopic.php?p=633198#p633198
- also fix problem with wrong custom widget definition (kindly automatically fixed by Qt's designer)
2022-10-15 04:50:50 +02:00
Ajinkya Dahale
1b7fbe087a [Sketcher] [planegcs] Add references for equations
Some equations were mentioned by just the number without telling the resource they were from. The book was found couple years ago but not mentioned here.
2022-10-11 08:07:47 +02:00
Paddle
1232a1d00a Sketcher: Control edit, change the text of 'Show grid' checkbox to 'Grid. 2022-10-10 08:50:56 -07:00
Paddle
12b91f323a Sketcher: Remove 'Edit controls' widget 'Grid Size' LABEL. 2022-10-10 08:50:56 -07:00
Yorik van Havre
9c24f0f5b8 Merged crowdin translations 2022-10-10 11:06:08 +02:00
Yorik van Havre
4ba1b0e4dc Updated ts files 2022-10-10 10:19:30 +02:00
Uwe
bf3d7f64ca [Base, Sketcher] remove redundant boolean checks 2022-10-10 02:49:17 +02:00
Paddle
f320850e38 Sketcher: Make 'Edit control' widget optional. ENABLED by default. 2022-10-07 12:32:55 -07:00
PaddleStroke
d591aad862 Sketcher: Remove StopOperation from toolbar (#7569)
Rarely used, see poll at https://forum.freecadweb.org/viewtopic.php?f=8&t=71922

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2022-10-07 11:03:44 -05:00
PaddleStroke
cd688644a8 Sketcher: Remove two tools from toolbar (#7568)
Removes "Select conflicting constraints" and "Select redundant constraints", as discussed in https://forum.freecadweb.org/viewtopic.php?f=8&t=71923

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2022-10-07 11:01:23 -05:00
wmayer
840fc70106 Mod: replace QRegExp with QRegularExpression 2022-10-07 14:03:53 +02:00
Yorik van Havre
4ca1b838a9 Merged crowdin translations 2022-10-06 12:48:05 +02:00
Yorik van Havre
3d75b4fb74 Updated ts files 2022-10-06 12:16:32 +02:00
0penBrain
b02d549c98 Sketcher : optimize code that was present for Qt4 compatibility
Was introduced by a2b53be76, new code only supported by Qt5
2022-10-03 11:12:35 -07:00
Chris Hennes
8b252e0004 Sketcher: Remove Snell's Law from toolbar
Leave menu item intact so it is still accessible, but does not use up toolbar space.
2022-10-03 09:25:42 -05:00
Uwe
4140b6af8b [skip CI] [Sketcher] ViewProviderSketch.cpp: Clang formatting
- to please the CI (too long lines etc.)
2022-10-02 20:34:12 +02:00
wmayer
cbac99a8ed Sketcher: [skip ci] remove unused includes 2022-09-25 11:09:29 +02:00
Uwe
3e8330fda2 [Gui] fix some CI warnings
- narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined
- floating point literal has suffix 'f', which is not uppercase
- narrowing conversion from 'double' to 'float'
- Slots named on_foo_bar are error prone
- also tome Clang style fixes

(see here for the reports: https://github.com/FreeCAD/FreeCAD/pull/7522/commits/d9c2efcc)
2022-09-24 19:58:11 +02:00
0penBrain
99de061504 Sketcher/constraints: improve command opening management
TODO : do same in CmdSketcherConstrainTangent::substituteConstraintCombinations
2022-09-24 16:05:23 +02:00
0penBrain
5f92c03124 Sketcher: fix misleading indentation 2022-09-24 16:05:23 +02:00
0penBrain
f9fb72fdc8 [Bugfix]Sketcher/Point-on-object: do not substitute constraint if conditions are not OK 2022-09-24 16:05:23 +02:00
Adrian Insaurralde Avalos
44e475f00d [Sketcher] adjust some icons to better follow art style guide [skip-ci] 2022-09-23 14:40:24 +02:00
Chris Hennes
9c10e9a860 Sketcher: Remove unnecessary translations
Several of the strings in TaskSketcherSolverAdvanced.ui should not be translated as they are later replaced in code.
2022-09-19 22:32:02 -05:00
marioalexis
36968c835d Sketcher: Replace C cast 2022-09-18 11:06:51 -05:00
Uwe
bd47d12ca5 [Sketcher] rename a variable to please spellchecker
- also some code style improvements
2022-09-14 09:54:07 +02:00
Ajinkya Dahale
1b2ffdc5f6 [Sketcher] Fix Typo in comment
threated -> treated
2022-09-14 00:34:57 -05:00
0penBrain
e7ebe2a053 [Bugfix]Sketcher: prevent dangling state of Shift key if key released out of Quarter 2022-09-13 22:20:15 -05:00
0penBrain
c2c45f6ca7 [Bugfix]Sketcher: some user colors aren't taken into account 2022-09-11 22:04:38 +02:00
0penBrain
c910ff6509 Sketcher/BackEdit: makes clip plane switch side according to view side 2022-09-09 16:09:42 +02:00