Assembly: Problem with CopyOnChange links
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Problem description
I noticed this bug wen creating some assembly with generic extruded aluminum profiles (implemented with the "CopyOnChange" feature of App::Link). Wen you modify the copyOnwrite parameter, the solid will shift, and if you try to solve the constraint, the solid will shift more, and if you try to modify the parameter, will shift again, in a random rotation and magnitude.
A possible way to reproduce the bug:
- Creating an assembly;
- Add a part as a link, and ground it;
- Add another part as a link (that has a CopyOnChange parameter that modifies the solid), and set Link On Copy on "Enabled"
- make a "Fixed joint" constraint between the two object
- Change the CopyOnChange parameter
(The solid now swifts randomly)
- Press "Solve Assembly"
(The solid will shift more each time is pressed)



### Full version info
```shell
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37302 (Git)
Build type: Release
Branch: main
Hash: 0e24e121eb3e5708c380596e0a9fd583befac977
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/Europe (en_150)
Installed mods:
* Assembly4 0.50.12
* Gridfinity 0.4.0
* kicadStepUpMod 11.1.0
* LCInterlocking
* sheetmetal 0.4.11
```
### Subproject(s) affected?
Assembly
### Anything else?
I tried with different
No error log are generated in the console, But i created an example that triggers the strange behavior.
[testbug.zip](https://github.com/FreeCAD/FreeCAD/files/15335026/testbug.zip)
You just need to press "Z" (Solve Assembly) to admire the majestic glider going places :D
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.