Skip to content

[realthunder/Link Branch] Bug in sketcher constraints handling when referencing constraints of the same sketch #974

@DenkBrettl

Description

@DenkBrettl

Is there an existing issue for this?

  • I have searched the existing issues

Version

0.21 (Development)

Full version info

[code]
OS: Ubuntu 22.04.4 LTS (LXQt/Lubuntu)
Word size of FreeCAD: 64-bit
Version: 2024.322.0.14555 (Git shallow) AppImage
Build type: Release
Branch: (HEAD detached at 20240322stable)
Hash: da98001cfe5cc50cb2e9e4c241626d07dd4b06f5
Python 3.11.6, Qt 5.15.8, Coin 4.0.1, Vtk 9.2.5, OCC 7.7.1
Locale: English/United States (en_US)
Installed mods: 
  * sheetmetal 0.3.13
  * Plot 2022.4.17
  * CfdOF 1.24.9
  * fasteners 0.4.75
  * parts_library
[/code]

Subproject(s) affected?

None

Problem description

There's a bug when removing constraints. Here's how to reproduce it:

  • Sketcher Workbench
  • New sketch on XY-Plane
  • Draw circle on origin
  • Constrain diameter (I used 10mm)
  • Draw rectangle, one corner starting in origin
  • Constrain horizontal length (I used 20mm)
  • Add name to horizontal length constraint (I used "w")
  • Add constraint for vertical length -> Formula -> .Constraints.w / 2
  • Remove diameter constraint from circle
    -> The formula of the vertical constraint suddenly moves to the horizontal constraint, creating a circular dependency

Seems like some sort of internal list isn't updated correctly / de-synchronized?

Thanks!

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions