Linked door disappears from the model tree and gets rehosted when it is copied on change

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
hko
Posts: 96
Joined: Thu Apr 23, 2020 10:44 pm

Linked door disappears from the model tree and gets rehosted when it is copied on change

Post by hko »

...and the wall it gets rehosted to is not visible in the model tree either.

Steps to reproduce:
  • Create a wall
  • Create a window/door in the created wall
  • Set Move Base property of the windor/door to false
  • Set Opening property to 50
  • Enable CopyOnChange attribute of Opening property
  • Select the door and use "Make link" to create a link to the door
  • Observe that the link is placed at the root level of the model tree and not under the wall even though wall is its host
  • Recompute the wall
  • Observe that link was now moved under the wall in the model tree
  • Move the link-door to a different location on the wall
  • Set Link Copy On Change property of the link to "Enabled"
  • Set Opening property of the link to 25
  • Observe that the link disappears from the model tree
  • Recompute the wall
  • Observe visually that the link is no longer hosted by the wall
  • Check the Hosts property of the link and observe that it was changed from "Wall" to "Wall001".
  • Observe that there is no Wall001 in the model tree
I have a video that demonstrates the steps (perhaps not in 100% same order but close enough) up to this point: https://youtu.be/ciuEjiIPLlE

CopyOnChange and Link Copy On Change are not documented in the wiki (but I found something by googling them) so it's hard to say if what I did was meaningful but regardless, I think the end result (and some of the intermediate steps, such as the link initially appearing at the root and then moving under the wall when the wall was recomputed) is confusing and not useful and if I did something bogus, FreeCAD should have prevented me.

Additionally:
  • Save the model (included as an attachment)
  • Load the model
  • Observe that the link is now visible in the model tree at the root level (see the first screenshot)
  • Observe "Tree.cpp(3576): [ComboView] Cyclic dependency in disappearing_linked_door#Wall001.disappearing_linked_door#Link" error message (see the first screenshot)
  • Observe that link's Hosts property is still Wall001, which is not visible in the model tree (see the first screenshot)
  • Modify Hosts property, remove Wall001 and add Wall, in an attempt to re-host it back to the original wall. While Hosts property was not marked "CopyOnChange" originally, I thought this would work at this point since a copy was already created. But maybe that wasn't a meaningful expectation. In any case, I don't think the following should happen:
  • Observe that there are now three doors under the wall in the model tree (see the second screenshot)
disappearing_linked_door_after_model_save_and_load.png
disappearing_linked_door_after_model_save_and_load.png (67.54 KiB) Viewed 471 times
disappearing_linked_door_after_hosts_change.png
disappearing_linked_door_after_hosts_change.png (79.28 KiB) Viewed 471 times

Code: Select all

OS: Ubuntu 20.04.4 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.24436 (Git)
Build type: Debug
Branch: master
Hash: bf527ba5ed9cbde0813e702c2f3793fb55f5be7c
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.3.0
Locale: English/United States (en_US)
Installed mods: 
  * 3DfindIT 1.2.0
  * Render 2022.2.0
  * BIM 2021.12.0
  * Manipulator 1.4.9
  * parts_library
  * dodo
Attachments
disappearing_linked_door.FCStd
(45.5 KiB) Downloaded 14 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Linked door disappears from the model tree and gets rehosted when it is copied on change

Post by paullee »

hko wrote: Sun Jul 24, 2022 12:31 am CopyOnChange and Link Copy On Change are not documented in the wiki (but I found something by googling them) so it's hard to say if what I did was meaningful but regardless, I think the end result (and some of the intermediate steps, such as the link initially appearing at the root and then moving under the wall when the wall was recomputed) is confusing and not useful and if I did something bogus, FreeCAD should have prevented me.
Thanks, finally someone has tested CopyOnChange support in Arch Objects :)

To my understanding, these features are implemented by Realthunder to the FC base system, but other WBs may needs to adopted to support it. Lots of features are being developed so support from other WBs needs to be implemented not to mention documentation.


Try below to demonstrate basic support for Link first:-
  1. make 2 Walls at different location
  2. make a Window, put in 1st Wall object, it should punch a hole
  3. make a Link to the Window
  4. Now, try put the Link of Window to the 2nd Wall
I remember it is not supported (yet ?) - the 2 Host attribute in the 2 Window objects can't be changed individually - that's why I tried to add that supoort in the experimental add-on (long discussion here).

Parametric Placement of Arch Objects Intuitively
Image

In the meantime, maybe below workflow ? (or better ideas from others )
  1. for identical window/door, it seems (Draft) Clone of Window/Door support different Hosts
  2. if brave enough, can try SketchArch add-on and make Links
  3. for window/doors derivatives e.g. with different opening direction (i.e. can base on same base Sketch), just create another Window/Door Object base on that Sketch (Copy & Paste, deselecting base Sketch will do)

Maybe can ping Realthunder + Yorik or other developers or you to consider adding that support ? :D

Good luck !
Post Reply