For the z88 export the FemMesh must be passed to its Python wrapper which will increase the counter upon construction and decrease it upon destruction. If the counter becomes 0 the FemMesh will be destroyed too which causes a crash.
To fix the crash the counter must be increased and safely decreased after the lifetime of the Python wrapper.
This fixes https://github.com/FreeCAD/FreeCAD/issues/23380
*i1.txt or *o2.txt are not valid suffixes for a file dialog. In the past (until 2018) the suffixes were set to *.txt but this has been changed with 65b1484b7.
To avoid creating invalid filenames the original suffixes are restored.
* Sketcher: Circle DSH: move diameter constraint. Fix#22267
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve. To squash
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* MeshPart: "Trim by plane" -> "Trim With Plane"
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [Core] Fix#15558: Direct expression in ternary operator
* [Core] Added tests for Non-Numeric conditions in ternary op.
* [Core] prevent relational operator chains at grammar level.
* [Core] Rewrite expressions grammar as a layered grammar.
* [Core] Revert to left associative relops (like C/C++) plus tests.
* Draft: Implement hints for creation tools
Fixes: #22886
Related: #22298
This PR implements hints for the tools in the Draft Creation toolbar.
* Fix confusing indentation
* Fix typo in comment
* Sketcher: Set total angle to make evaluation choose it when typing in OVP
When typing an angle value (e.g., "315 deg") in the sketcher rotate tool,
the result differed from manually moving the mouse to achieve the same rotation.
The angle would "flip" to equivalent but opposite directions (315 deg became -45 deg)
due to smart angle selection logic choosing the "closer" alternative.
The parameter enforcement system (`doEnforceControlParameters`) calculated cursor
positions for keyboard input but never directly set the `totalAngle` value.
The mouse logic's smart angle selection algorithm then calculated totalAngle
independently, potentially choosing equivalent but opposite angle directions
(e.g., -45 deg instead of +315 deg) based on proximity to the previous angle value.
Solution is to basically predefine `totalAngle` if user has typed it so
this "smart logic" will always choose the `totalAngle` that user typed.
* Sketcher: Set total angle for arc tool
* Sketcher: Set total angle for Arc Slot tool