This commit addresses two regressions in the MultiCommon feature:
1. Computation Logic: Fixed an issue where the common operation was
calculated as the intersection of the first shape with the union of
the rest (the default behavior of makeElementBoolean). It now
correctly computes the intersection of all shapes sequentially.
2. Compound Handling: Added logic to expand a single compound input
into its constituent shapes. Previously, a compound was treated
as a single entity, leading to incorrect intersection results.
To maintain backward compatibility, a hidden 'Behavior' property is
introduced. This ensures that documents created in FreeCAD 1.0, which
rely on the previous behavior, continue to render as originally
intended while new objects use the corrected logic.
* Part: Fix mirror() regression with non-identity Placement
The makeElementMirror() function incorrectly extracted and pre-multiplied
the shape's Location with the mirror transform. Since BRepBuilderAPI_Transform
already handles shapes with Location correctly, this resulted in the placement
being applied twice, producing incorrect results for shapes with non-identity
Placement.
Fixes#20834
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Part: Add regression test for mirror() with Placement
Adds testTopoShapeMirrorWithPlacement to verify that mirror() produces
identical results regardless of whether the shape is positioned via
direct coordinates or via Placement.
This test would have caught the bug fixed in the previous commit where
shapes with non-identity Placement produced incorrect mirror results.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix regression test for mirror with Placement
The test was incorrectly trying to create equivalent boxes using
different methods that don't actually produce the same geometry.
Part.makeBox with a direction vector is not equivalent to setting
a Placement with rotation.
Fixed to use the correct approach that demonstrates the actual bug:
- Method 1: Box with geometry at (0,30,0), identity Placement
- Method 2: Box with geometry at origin, moved via Placement
Both should produce identical mirror results, which they now do
with the makeElementMirror() fix.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Timothy Miller <theosib@zeromark.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* cam: attempt to fix issue #26652 ie. fix issue with state of recompute button for tool bit
* add unit test for issue #26652
* run precommit
* relocate `purgeTouched()` call to end of `_update_visual_representation` function
* Assembly: Change Joint References to remove cyclic dependency.
* Update JointObject.py
* Update TestCore.py
* Update JointObject.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update AssemblyUtils.cpp
* Update UtilsAssembly.py
* Update JointObject.py
* small fix for link groups
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* PartDesign: Add interactive gizmo for draft operation
* [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>
Cache object property list in expression completer, so it is not rebuilt for every requested index. This helps with performance when an object has a large number of properties.
* Added support for cylindrical surfaces
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed unnessecary sign
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Reverted change
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Make sure to use the active default values for preamble and postamble in the help text,
and provide the current default values as the default in the add_argument().
The only exception is uccnc_post.py, where the real default value depend on the use of
--no-comments, and sending the default argument to add_argument() would change behaviour.
This change was inspired by the changes done to fix (#20792) in
d84d9c9bd1.
Fix "Activating a body in a part in an assembly deactivates the assembly and activate the part"
Fix "A manually deactivated assembly is still restoring later"