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.
================================================================
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.
- 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).
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.
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.
- 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)