problems in site, floor and buildingobject

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
bernd
Posts: 7295
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

problems in site, floor and buildingobject

Postby bernd » Tue Dec 16, 2014 5:30 pm

Found some problems in site, floor and building objects.

- File --> New
- ArchWB
- Architecture --> Floor
- PartWB
- Part --> Primitives --> Cube
- in ComboView --> select the Cube --> move the Cube into the Floor
- ArchWB
- in ComboView select the Cube --> Architecture --> Structure
- The Structure jumps outside the Floor in ComboView (Bug or Feature!?!)
- in ComboView select the Structure --> Move the Structure again into the Floor
- The Cube no longer belongs to the Structure (Bug!?!)

OS: Windows 7
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0

OS: Ubuntu 14.04.1 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.15.4258 (Git)
Branch: master
Hash: d4a5249b4b6cea08d507af499d7ed3e3652edb84
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
User avatar
rockn
Posts: 1509
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: problems in site, floor and buildingobject

Postby rockn » Tue Dec 16, 2014 5:45 pm

bernd wrote:- in ComboView select the Cube --> Architecture --> Structure
- The Structure jumps outside the Floor in ComboView (Bug or Feature!?!)
None of them, Structure is a new object and so have no "subparent".
bernd wrote:- The Cube no longer belongs to the Structure (Bug!?!)
It's just in the TreeView representation, but the Cube is still a component of Structure. But Cube is "in" Structure and "in" Floor object.

Just add (add component) an another cube to structure and you will see that both cubes are "in" Structure.
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
bernd
Posts: 7295
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: problems in site, floor and buildingobject

Postby bernd » Tue Dec 16, 2014 8:05 pm

Thank's rockn.
rockn wrote:
bernd wrote:- in ComboView select the Cube --> Architecture --> Structure
- The Structure jumps outside the Floor in ComboView (Bug or Feature!?!)
None of them, Structure is a new object and so have no "subparent".
Ahh, its just the way it works in FreeCAD. Is there a way that the new object Structure inherits (adopts) the parents from the cube?

rockn wrote:
bernd wrote:- The Cube no longer belongs to the Structure (Bug!?!)
It's just in the TreeView representation, but the Cube is still a component of Structure. But Cube is "in" Structure and "in" Floor object.

Just add (add component) an another cube to structure and you will see that both cubes are "in" Structure.
But is'nt it a bug than?! Found another possibility Draft --> move the Structure and undo the moving will put the cube back to his parent Structure.

The reason I'm asking is in an imported ifc including a few buildings and lots of floors changing the Arch object type (or adding one ot a Part) could be painful cause one needs to move the objects back to its family.I may should upload an example.

Bernd
User avatar
rockn
Posts: 1509
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: problems in site, floor and buildingobject

Postby rockn » Tue Dec 16, 2014 8:29 pm

bernd wrote:But is'nt it a bug than?! Found another possibility Draft --> move the Structure and undo the moving will put the cube back to his parent Structure.
I don't think it's a bug because Cube is a children of Floor AND Structure so as we don't want to see it twice in the TreeView it is in the last modified object.
In your example, when we move Structure in Floor, the last modified object is the Floor, so it's children's tree is well representing (Structure and Cube are direct children).

You can see this behavior for a window that is on multilayer wall, depending the wall you are modified the window switch between wall in the treeview.

For me the problem here is that Cube doesn't have to be a children of Floor. Just the highest item.
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
bernd
Posts: 7295
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: problems in site, floor and buildingobject

Postby bernd » Tue Dec 16, 2014 10:24 pm

rockn, I got your point.

Attached an example to demonstrate the problem. The file was imported from ifc. Three objects are no arch objects (the blue cubes). The aim is to turn them into structures.

What I found to work just now is:
- select the shape objects.
- move the shape object outside the family objects
- select the objects --> Press Arch --> Structure
- move the structures back to the floor
- the shape objects remain inside the structure objects :)
Attachments
example.fcstd
(235.95 KiB) Downloaded 27 times
User avatar
rockn
Posts: 1509
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: problems in site, floor and buildingobject

Postby rockn » Wed Dec 17, 2014 12:03 pm

Yes, I got your point too.

I'm wondering if the Floor object doesn't need a TaskPanel to manage childrens ?

Something like this :
FloorTaskPanel.png
FloorTaskPanel.png (25.12 KiB) Viewed 1109 times
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
yorik
Site Admin
Posts: 10826
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: problems in site, floor and buildingobject

Postby yorik » Wed Dec 17, 2014 12:37 pm

Actually all of this is not really a bug, but also not really good the way it is, I agree. But it is complicated, it has to do with the way FreeCAD works, which is made mainly for very clean dependency chains, and not so much for the dirty combinations we do in the arch workbench :)

Basically:

- You have a cube, you put that cube into a group (site, floor and building are only special kinds of groups). Then, you build another object on top of the cube, that new object is not part of the group. For me that is normal. There is no reason why we should suppose that the user will want the new object to be automatically included into the group. Of course, in architecture work, things might be different, and we might want this in some cases. We could do that, for example, on Arch object creation, when an object is built from another, check if the base object is in a group, and if yes, add the new object to the same group. That is not too complicated.

- The tree representation is another problem. Basically the tree was not made to have several objects based on a same one. That is, several objects that will "claim" the base object as their child. What happens, in that case, is, on tree redraw, each object will "swallow" its children. The last one to do so will have the cube appear under it. This is a design intent of FreeCAD, and modifying it is probably out of question at the moment.

One solution would indeed be, as rockn suggests, remove the base object from the group first, so it has only one parent. But it will be impossible to guarantee that always (that each object has only one parent), because sometimes you specifically want two objects to be based on the same child.

Honestly I haven't found a good solution for this yet, apart from taking care yourself, as a user, to design things cleanly and separately. The panel rockn suggests might be good too, but I'm experimenting with something in the Path module that might serve for all groups...
User avatar
rockn
Posts: 1509
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: problems in site, floor and buildingobject

Postby rockn » Wed Dec 17, 2014 12:53 pm

yorik wrote: but I'm experimenting with something in the Path module that might serve for all groups...
Nice, I was going to wondering if FreeCAD Group object himself can get improvements.
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad