When using linear pattern with expression, this can be usefull to have only one
occurence (the original one), which can't be done with the following
implemenation. This commit change this behaviour by allowing this value.
==============================================================
Previously construction points was used to code bspline knots.
Now construction points are normal sketcher points, which can be
made defining.
This commit renames and adapts the checks for fixed geometry.
fixes:
https://forum.freecadweb.org/posting.php?mode=quote&f=3&p=461472#pr461472
=====================================================================
Finish checks with geometry pointer before calling initTemporaryMove(), as the pointer may change as a result of the solve() operation.
========================================
Report:
https://github.com/FreeCAD/FreeCAD/pull/4183https://github.com/realthunder/FreeCAD_assembly3/issues/387
Problem:
renameConstraint() previously implemented exclusively in SketchObjectPyImp.cpp,
will change the Constraints property without updating the solver. A prospective
drag operation would rely on a deleted pointer constraint which leads to the
crash.
Solution:
- mark the solver status as needing an update
- leverage new through sketchobject r/w interface to ensure solver is synchronised
before the temporary move operation starts
Bonus:
move the core of the function to SketchObject.cpp so that input data validity
check on constraint change is inhibited.
=========================================================
-> Split read and read/write operations
New interface to access the solver object (Sketch) of SketchObject is now read only (const):
const Sketcher::Sketch &getSolvedSketch(void) const;
-> Encapsulate solver r/w access in SketchObject
Rationale:
- r/w access (access to non-const functions of the solver) leads to unsynchronised solver status.
- Before this commit there was a non-enforceable shared responsibility between ViewProviderSketch
and SketchObject.
- This commit centralises r/w access in SketchObject and SketchObject takes responsibility for doing whatever
necessary so that the solver is synchronised as appropriate.
- For read-only access (const functions) it is possible to use at ViewProviderSketch getSolvedSketch() returning
a const reference to the solver object.
- As it regards the advanced solver configuration dialog, it has been modified to configure by const-casting that reference. This
is not optimal, but it is deemed acceptable, because it should be rewritten sooner or later to include only useful information
and the configuration probably centralised in an individual configuration object, possibly compatible with several solvers
(e.g. DeepSOIC's ConstraintSolver too).
=============================================================================
The reduced Jacobian defaults to the size of the full Jacobian, where driven constraints
and parameters are not considered to build the reduced Jacobian and thus empty rows remain.
This is generally not a problem as QR decomposition ignores this rows, except in case where
only driven constraints exist. In such a case no QR decomposition is necessary, and in fact
relying on the size of the QR decomposition leads to the incorrect result that the sketch
is fully constraint, when the opposite is true.
This commit resizes an effectively empty reduced Jacobian to avoid this issue.
Fixes the problem that a line with a single reference constraint is shown as fully constraint.
- add missing class to UI file (found and automatically added by Qt Designer)
- add more sensible stepsize - you are dealing in practice with rations in the range 1.2 - 1.6 thus a stepsize of 1.0 is not helpful
as discussed here: the wording "datum color" does not make clear what it is about. It is in fact the color for dimensional constraints, thus name it as such
- also fix the dialog height (found and automatically corrected by Qt Designer)
QAction defaults menu role to TextHeuristicRole, which causes qt to
guess the menu role based on action title. And titles start with
'Config', 'Options', 'Settings', etc. will be considered as preference
menu. It seems some non-english translation causes the wrong action be
chosen as preference, such as 'Treeview actions'.
This commit just applied a temporary fix to default to QAction::NoRole
for GroupCommand. If there is ever some GroupCommand need to be a
system menu item on macos, we could add some command bit flag for that
purpose.
======================================
Explicitly indicate that if parameter diagnosis must be silent=false in order to debug,
then the lauch policy during the debug must be set to deferred in order to avoid concurrent
access to Base::Console which is not thread-safe.
=============================================================
Fixes:
https://forum.freecadweb.org/viewtopic.php?f=8&t=53466&p=460513#p460270
When a parameter belonging to a blocked geometry is present in several
dependency groups and there are other fixed parameters one or more of
the dependency groups, it is not enough to remove that parameter, from
the one or more dependency groups. The removal of a parameter may only
satisfy one dependency group. Removing a single parameter creates a
new different dependency group.
Solution:
If the first blocked parameter in a group is already set for removal,
continue searching for other blocked parameters, until one not searched
for removal is found.
This fixes issue
https://tracker.freecadweb.org/view.php?id=4513
addSymmetric will now only transfer Vertical and Horizontal constraints if the reference axis is either
- the HAxis
- the VAxis
- a Vertical line
- a Horizontal line