[SOLVED] How do I unlink items in the tree?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

[SOLVED] How do I unlink items in the tree?

Post by Moult »

I have recently found myself in a scenario where I have a sketch, which I have dragged and dropped in the "floor" or "building" object in the tree. I found that this does not copy the object, but instead creates a linked instance, just like a clone. If I delete one, they all delete. I find this behaviour is inconsistent, because if I copy and paste it, the pasted one appears outside (i.e. a sibling of) the "Default site" object in the tree. Then if I drag that into the site, it moves it and makes it a child. In summary: if I drag a child from "site" onto the "floor" object, I get a linked clone. If I drag a sibling of "site" onto the "site" object, it gets moved.

How do I delete just one? Or how do I unlink them? And why is this the behaviour?
2019-01-13-152739_220x164_scrot.png
2019-01-13-152739_220x164_scrot.png (10.53 KiB) Viewed 2656 times
Last edited by Moult on Sat Feb 02, 2019 11:14 am, edited 1 time in total.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I unlink items in the tree?

Post by chrisb »

Moved to Arch forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roy_043
Veteran
Posts: 8455
Joined: Thu Dec 27, 2018 12:28 pm

Re: How do I unlink items in the tree?

Post by Roy_043 »

I was able to reproduce the scenario with V0.18, not with V0.17.
I don't know the cause, but the undesirable linked object can be avoided by holding down the Shift key when dropping the item.
User avatar
Moult
Posts: 321
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: How do I unlink items in the tree?

Post by Moult »

So, uh, would this be a bug then?
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: How do I unlink items in the tree?

Post by paullee »

Moult wrote: Sun Jan 13, 2019 4:32 am … I have a sketch, which I have dragged and dropped in the "floor" or "building" object in the tree. I found that this does not copy the object, but instead creates a linked instance, just like a clone. If I delete one, they all delete. I find this behaviour is inconsistent...
By these steps, you are not creating a copy nor 'instance".

You are moving the sketch into a Group-like Object , Site or Building.

At the same time if a Wall is built upom this Sketch, it would show in 2 'location' - 'they' are just 1 sketch.
User avatar
Roy_043
Veteran
Posts: 8455
Joined: Thu Dec 27, 2018 12:28 pm

Re: How do I unlink items in the tree?

Post by Roy_043 »

I think it definitely is a bug.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: How do I unlink items in the tree?

Post by ickby »

The freecad tree shows a single object multiple times if it is referenced by multiple parents. The same happens e.g. for booleans, if you make two bolean ops from 3 base objects (bool1=Sphere+Cone, bool2=Cone+Box).

Drag and drop implementation depends on the object you drop into. Some just add the droped object as reference (again booleans are such an example).

I assume this happend here: The sketch was not dragged out the wall and additionally added as reference to the floor when you droped it there. Hence the two sketch items in the tree are the same. Thats why it "both" got deleted. IMHO nut really a bug but a bad mixture of different UI features
User avatar
Roy_043
Veteran
Posts: 8455
Joined: Thu Dec 27, 2018 12:28 pm

Re: How do I unlink items in the tree?

Post by Roy_043 »

The OP does not mention walls in his scenario. Here is a file to test with.

Test:
1. Open in V0.18
2. Drag and drop Sketch002 on the site.
3. Result: move.
4. Drag and drop Sketch002 from the site on the floor.
4. Result: clone.

IMO showing the [+] icon when the drag results in a move is not correct either.
Attachments
DragDropTest.FCStd
(32.02 KiB) Downloaded 18 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: How do I unlink items in the tree?

Post by yorik »

Roy_043 wrote: Mon Jan 14, 2019 10:43 am Test:
1. Open in V0.18
2. Drag and drop Sketch002 on the site.
3. Result: move.
4. Drag and drop Sketch002 from the site on the floor.
4. Result: clone.
The sketch is not cloned. It simply is a child of both the site and the floor, and therefore appears in both. This is how the tree works in freecad.. The fact is the site is a special, hybrid object (it's both a shape and a group), and therefore it doesn't follow the same rules as other group-based objects such as the floor (where an object can only be part of one). But I'm also thinking of removing that restriction for floors/building parts...

In any case, for all arc/bim "containers" , building parts, buildings, sites... you can always either double-click them in the tree, and remove any object from there, or click the property that contains the object you want to remove, and unselect it in the list that pops up.
User avatar
Roy_043
Veteran
Posts: 8455
Joined: Thu Dec 27, 2018 12:28 pm

Re: How do I unlink items in the tree?

Post by Roy_043 »

@Yorik, thanks for your explanation. I have obviously used the wrong word ('clone').
yorik wrote: Mon Jan 14, 2019 4:05 pmother group-based objects such as the floor (where an object can only be part of one)
But in my test the same sketch can be a child of both the Building and the Floor. Or do you mean that this rule applies to solids only?
yorik wrote: Mon Jan 14, 2019 4:05 pmIn any case, for all arc/bim "containers" , building parts, buildings, sites... you can always either double-click them in the tree, and remove any object from there, or click the property that contains the object you want to remove, and unselect it in the list that pops up.
Double-clicking does not work for the Building and the Floor. The alternative option (via the Group property) does not work for the Site: the sketch is not part of the list. EDIT: But maybe this is how the advice is intended.
Last edited by Roy_043 on Mon Jan 14, 2019 8:44 pm, edited 1 time in total.
Post Reply