Skip to content

Part: added floating point fallback in PropertyLinks::_updateElementR…#26253

Merged
kadet1090 merged 1 commit intoFreeCAD:mainfrom
YashSuthar983:Geo_tol
Dec 19, 2025
Merged

Part: added floating point fallback in PropertyLinks::_updateElementR…#26253
kadet1090 merged 1 commit intoFreeCAD:mainfrom
YashSuthar983:Geo_tol

Conversation

@YashSuthar983
Copy link
Contributor

@YashSuthar983 YashSuthar983 commented Dec 17, 2025

…eference

Issue : #26198

core issue
So while debugging with the test file provided in the mentioned issue i found that there is floating point error and at first we doing searchElementCache(oldElement) which returns empty and marks the searched as true in _cacheElements while name is empty.

changes are
PropertyLinkBase::_updateElementReference

if (!Data::hasMissingElement(oldElement)) {
            auto names = geo->searchElementCache(oldElement);
            if (names.empty()) {
                // try floating point tolerance
                names = geo->searchElementCache(oldElement, Data::SearchOptions());
            }
            if (names.size()) {

Feature::searchElementCache

propShape->getShape()
            .findSubShapesWithSharedVertex(it->second.shape, &it->second.names, options, tol, atol);
        if (!it->second.names.empty()) {
            it->second.searched = true;
        }

@github-actions github-actions bot added Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Mod: Part Related to the Part Workbench labels Dec 17, 2025
@maxwxyz maxwxyz added Type: Bug This issue or PR is related to a bug backport releases/FreeCAD-1-1 Applied to a PR that is on main to trigger the automatic creation of another PR onto 1.1 labels Dec 18, 2025
@maxwxyz maxwxyz added this to the 1.1 milestone Dec 18, 2025
@maxwxyz maxwxyz moved this from Queue to Merge Meeting in Merge Queue Dec 18, 2025
@kadet1090 kadet1090 merged commit dbd2bad into FreeCAD:main Dec 19, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from Merge Meeting to Done in Merge Queue Dec 19, 2025
@github-actions
Copy link
Contributor

Successfully created backport PR for releases/FreeCAD-1-1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport releases/FreeCAD-1-1 Applied to a PR that is on main to trigger the automatic creation of another PR onto 1.1 Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Mod: Part Related to the Part Workbench Type: Bug This issue or PR is related to a bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants