Issue #4370. Bug: duplicated window object when using expression with wall width
Posted: Tue Jun 02, 2020 5:26 pm
This is reported as issue #4370.
1. Click on Arch Wall, and create a wall 3 m, 3 m, and 0.2 m. The wall should be big enough to hold a standard window.
2. Click on Arch Window, Fixed, and place it on the wall.
3. In the tree view click on the Window, go to the property editor, choose "Hole Depth", and click on the rightmost "f(x)" symbol to set an expression (expressions).
4. The expression is just the Wall's width, so enter Wall.Width in the expression field, and click OK.
5. The Window will show the blue mark indicating the need for recomputing, so recompute, F5 (Std_Refresh).
6. The Wall doesn't show a blue mark. Nevertheless, right click on it on the tree view, and then choose "Recompute object".
7. The Window will appear a second time in the tree view. There will be two windows, and both will have the blue checkmark.
Also the following warning appears in the report view.
The two windows refer to the same Window object. Toggling the visibility (Space bar) turns both on and off. If you delete one, you delete both.
The issue here is the sort of circular dependency that exists between the Wall and the Window. The Window sets its width by looking at the Wall, and the Wall also looks at the Window. Maybe the error is in the Wall code, or somewhere in the tree view code in C++.
This was originally found here, Arch: window creates an extra hole in a different part of the wall in addition to the actual window.
Code: Select all
OS: Ubuntu 18.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21375 (Git)
Build type: Unknown
Branch: master
Hash: 11f9c249e764b27c78afd9b0a0de5acb3f05f760
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
2. Click on Arch Window, Fixed, and place it on the wall.
3. In the tree view click on the Window, go to the property editor, choose "Hole Depth", and click on the rightmost "f(x)" symbol to set an expression (expressions).
4. The expression is just the Wall's width, so enter Wall.Width in the expression field, and click OK.
5. The Window will show the blue mark indicating the need for recomputing, so recompute, F5 (Std_Refresh).
6. The Wall doesn't show a blue mark. Nevertheless, right click on it on the tree view, and then choose "Recompute object".
7. The Window will appear a second time in the tree view. There will be two windows, and both will have the blue checkmark.
Also the following warning appears in the report view.
Code: Select all
856.501 Tree.cpp(293): [ComboView] duplicate child item Unnamed#Wall.Window
The issue here is the sort of circular dependency that exists between the Wall and the Window. The Window sets its width by looking at the Wall, and the Wall also looks at the Window. Maybe the error is in the Wall code, or somewhere in the tree view code in C++.
This was originally found here, Arch: window creates an extra hole in a different part of the wall in addition to the actual window.