* [Surf]provide geometry to Measure
* [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>
* PD: fix gizmo direction when the calculated point lies outside the face
* [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>
* Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update TopoShape.cpp
* Update TopoShape.cpp
* Update TopoShape.cpp
* Update TopoShape.h
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Gui: Prevent whole-object highlight when picked list is enabled
Removed the logic that forced `onTop=1` when `needPickedList()` is true
in View3DInventorSelection. This was causing the entire object to be
highlighted instead of just the selected sub-element when the "Picked
object list" option was enabled.
* Part: Remove `needPickedList` mat override to prevent rendering artifact
The `needPickedList` check in `SoBrepFaceSet` was triggering
unnecessary material override processing that caused face clipping
artifacts when the "Picked object list" option was enabled in Selection
View. This check has been removed as the picked list functionality works
independently of the rendering path.
The `needPickedList` check in `SoBrepFaceSet` was triggering
unnecessary material override processing that caused face clipping
artifacts when the "Picked object list" option was enabled in Selection
View. This check has been removed as the picked list functionality works
independently of the rendering path.
* Part: Preserve child visibility when deleting compound copies
Currently, if we have a FC document two compounds, when one of them is a
copy of the other containing same children and we delete the copy
compound to keep the children, their visibility state changes.
The cause of that was a part of code in `onDelete()` method, which was
unconditionally calling `showViewProvider()` on every child object,
without checking if other compounds still claim those children or what
the current visibility should be.
So this patch adds parent-checking logic before changing visibility. The
visibility is only updated if the child is truly orphaned. So in the
scenario where we have the children referenced STILL by some compounds,
the visibility remains unchanged. It only changes when child has truly
no parents.
* Part: Use std::ranges::find for finding parent
* Fix rotation expression handling
- Make added rotation angle unit the same as the original expression unit
- Keep rotated angle expressions within the accepted [-180, +180] range
Calling BRepMesh_IncrementalMesh repeatedly would accumulate BRep_CurveRepresentation instances attached to the BRep_TEdges of the shape. We now clean added triangulations before adding a new one, which improves performance in the long run.
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Part: fix Part_EditAttachment nesting handling
Fixes#26264.
The previous 'fix' (#25887) did not consider that the object to-be-attached may not be in the global space.
The code in this PR has been tested on the forum:
https://forum.freecad.org/viewtopic.php?p=862968#p862968
* [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>
This introduces much faster CenterOfMassProvider#supports method that
can be used as cheap pre-check to see if the object supplied could have
the center of mass and so delay the domputation to a moment where it is
actually needed.
* Part: TopoShape make getElementTypeAndIndex more robust
* Part: Add unit tests for new regex
---------
Co-authored-by: Chris Hennes <chennes@gmail.com>
This method can be used to bake in transform directly into geometry.
Normally the setTransform or setPlacement methods only store additional
positional data within the shape without changing the actual geometry.
So if we have some geometry placed at 0,0,0 and we want to have few
copies of that shape the goemetry stays intact but additional transform
is stored. This method can be used to alter the gometry and reset the
transform to identity. It helps with model stability, as not every
method correctly handles that additional transform metadata.
* Define DlgScale task panel's tab order
To improve keyboard navigation.
Fixes: https://github.com/FreeCAD/FreeCAD/issues/23772
* [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>