Organizing subtractions in the tree view

Post here for help on using FreeCAD's graphical user interface (GUI).
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Organizing subtractions in the tree view

Postby simsiem » Thu Mar 16, 2017 4:49 pm

Hi all,

some of you will already have recognized: I work on a detailed architectural model. FreeCAD has quite some nice capabilities for it. Regularly, I meet the following problem. I suppose other do so as well. It is related to subtraction. I explain it with some examples.

  1. If I want to have a hole for stairs in a floor, I create a Part box and subtract it from the floor structure. In the consequence, this box becomes a child of the floor structure. This is pretty nice, because the only purpose of the box is to make a whole in the floor structure.
  2. The same holds for some special wholes in the slab for lightning equipment. I create a small Part cylinder and subtract it from the floor structure. The Part cylinder remains as a child within the floor structure.
  3. In another case, a vertical wall ends at a diagonal wall. Thus the wall end must be diagonal as well. The most simple solution would be to make the vertical wall a bit longer to reach into the diagonal wall and then subtract the diagonal wall from the vertical wall. However, in this case the diagonal wall disappears as an independent wall. This is not what I need.
  4. A steel column can be within a drywall. Thus I want to have a whole in the drywall for the column. At the moment, I create some additional objects for this subtract operation. It would be simpler to just use the column.
For windows, there is already a special functionality in FreeCAD to handle them correctly. There is even the option to make them an independent object or a child object. I also found out that you can either say all subtractions swallow in the tree or none in the settings dialogue. But I think, this is a property per object maybe with some default behaviour. In the examples 1 and 2 I would use it in the one way, and in the other two examples would use it in the other way.

Is there a way (maybe with some Python calls) for the following two issues? I am curious.

  • Set for a subtracted object whether it should the child of the minuend or not.
  • If the subtrahend and minuend share a same face, this can lead to problems. For this reason, the window subtraction functionality extrudes the subtracted window to go beyond the minuend. Is there already some general functionality for this in FreeCAD.
I suppose, users of the Part or Assembly workbench face similar problems. Is this right?

Thanks for sharing your way of handling these issues.

Simon
DeepSOIC
Posts: 4502
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Organizing subtractions in the tree view

Postby DeepSOIC » Thu Mar 16, 2017 5:05 pm

simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Organizing subtractions in the tree view

Postby simsiem » Sun Mar 19, 2017 6:26 am

I read a bit more about all this – also with the link of DeepSOIC. So far I came to:

  • The parent controls the tree association with the function claimChildreen.
  • For Arch objects, the function claimChildreen is defined in the class ViewProviderComponent of the module ArchComponent.py. It evaluates and follows the setting to swallow additions, subtractions and windows (special for the Arch workbench).
  • There is no dedicated list for the tree childreen. ArchComponent takes the tree children from other lists (addition and subtraction lists). Thus the tree assignment is no independent concept.
  • I am not sure about it, but I suppose: There can be several parents claiming to have an object as child. Which parent wins in this case?
  • I also suppose, the user cannot control, which parent wins. Is this right?

What are your thoughts?
simsiem
Posts: 40
Joined: Tue Feb 02, 2016 7:19 am

Re: Organizing subtractions in the tree view

Postby simsiem » Sun Mar 19, 2017 7:53 am

Thanks, DeepSOIC, for the link. I also consider it relevant and especially interesting. It gave me some insights, when I followed the next thread that was linked in your linked thread.

However: Although I believe the patch of realthunder is very interesting and could possibly solve my issue, I did not understand from the linked threads, what it exactly does.

  • How does it handle the case that an object is part of several parents?
  • If I drag an object that is a child of another object onto a group element what happens then?
Best regards
Simon