Prevent crash (CAMTests) in ToolBitRecomputeObserver when the toolbit object has been deleted/missing
by catching ReferenceError before accessing its Document attribute. This ensures slotRecomputedDocument
exits gracefully if the object is no longer valid.
src/Mod/CAM/Path/Tool/toolbit/models/base.py
- Wrapped access to self.toolbit_proxy.obj.Document in try/except to handle ReferenceError
if object is deleted/missing, preventing crash during document recompute.
Introduced FLOAT_EPSILON for robust floating point comparisons, resolving cases
where Z axis retract moves were missing after geometry recompute in 3D Surface
rotational scan operations. This prevents precision errors from causing the
cutter to skip intended lifts between rings or scan lines.
src/Mod/CAM/Path/Op/Surface.py
- Added FLOAT_EPSILON constant
- Updated Z move comparison logic to use tolerance
A bug in the ToolBit model caused an infinite recompute loop and UI freeze when properties such as Diameter, Flutes, or CuttingEdgeHeight were set to expressions. The visual representation update was being triggered during document recompute, which could recursively trigger further recomputes. This fix defers visual updates by queuing them and processing only after the document recompute completes, using a document observer. The observer is cleaned up after use and on object deletion, preventing memory leaks and repeated recompute cycles.
src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- ToolBitRecomputeObserver: Document observer class that triggers queued visual updates after recompute completes via slotRecomputedDocument.
- _queue_visual_update: Queues a visual update to be processed after document recompute.
- _setup_recompute_observer: Registers the document observer for recompute completion.
- _process_queued_visual_update: Processes the queued visual update and cleans up the observer.
- onChanged: Now queues visual updates instead of calling them directly.
- onDelete: Cleans up any pending document observer before object removal.
When a geometry element is selected and then hidden using the visibility
checkbox in the Elements panel, it remains in the selection.
Subsequently, if another geometry element is selected and deleted, both
the visible element AND the hidden element are deleted.
Root cause of that is basically that `changeLayer()` functions change
the geometry's visual layer, but never clear the geometry from
`Gui::Selection()`.
So, this patch adds the handling to collect every sub-element name of
the hidden geometry and then formats it and calls remove selection on
the geometry during layer change transaction.
* [ArchStairs] Fix StringerOverlap Base at Angle
Github Issue Discussion
- https://github.com/FreeCAD/FreeCAD/issues/24321#issuecomment-3492459309
"... error when Stringer Overlap is set above certain threshold combined with a non-baseless stair which does not have orthogonal direction - this means that the base line or sketch is rotated to a degree, which is not 0, 90, 180 or 270 degrees."
Further
Fix#24321
* [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>
Fixes#25084.
Instead of a brep file a point list is now used to generate the figure.
Additionally:
Two points have been added to make the head of the figure less 'pointy'.
It would make sense to move the `get_human_figure` function to a different file in the future.
With 1.7m the figure is not very tall BTW.
* Sketcher: Fix offset of open profile
* [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>
- The BIM_Project command is removed from the toolbar and relocated to
the Utils menu
- The default when creating a new project has been changed to
non-IFC-native
- The BIM_Project and IFC_MakeProject command menu text have been
reworded to remove ambiguity
* Sketcher: Restore ExprBasedConstrDimColor
* [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>
* [ Material ]: Update SPDX License Identifiers
* [ Material ]: Correct Test Material License
---------
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
In formatting commit 5bd5f3a963 a
contributor mistakenly changed the license of importXLSX.py
from LGPL to GPL. The original code contributed by @ulrich1a included an
LGPL license block in it, and that license should have been retained.
This commit changes the license block to the originally-intended LGPL
block, and updates the SPDX header to match.