Ticket #3882 - Add and subtract in Arch workbench don't follow object selection order

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Re: Question on Arch Subtract

Post by brjhaverkamp »

Hi Roy,

Thanks for taking the time to make the gif. I am aware that a boolean is a good workaround. (btw, is the boolean in BIM identical to the boolean in the part WB? or are they different implementations?)

But the point is that to my understanding the subtract tool should do the same in the Arch workbench. This is the big Minus sign, next to the Plus sign.
But either my comprehension is off, or I am using it wrongly, or there is a problem with the tool. I can subtract A from B with that tool, but not B from A...
The tooltip states: Remove the selected component from their parent or create a hole in a component.

And indeed, I was also mystified by the recalculation problem.

Regards,

Bert
User avatar
Roy_043
Veteran
Posts: 8546
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Post by Roy_043 »

Aha, I now understand that I have misunderstood the issue from the start. In my defense: the tool is called Arch_Remove and, coming from a dwg-CAD background, for me the word 'subtract' points to a boolean operation.
But you are right: the Arch_Remove tool does not perform as described. It seems the object in the selection that was last created is the object that is subtracted from. The selection order has no effect.

BTW:
In my first post I already referred to this:
For Part_Cut the first element is the main object that is subtracted from. For Arch_Remove, according to the WIKI, the reverse applies: the last object is the main object. IMO this is confusing.
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Re: Question on Arch Subtract

Post by brjhaverkamp »

Hi Roy,

My bad, I think I only went from the minus sign by calling it "subtract". Should have researched better, or described better.
Anyways, thanks for acknowledging that I wasn't imagining things:-)

Meanwhile I found a workaround: you can add the subtracting structure manually in the data structure of main structure. But still it is a workaround.

Btw, I see people making these nice simple animations, yourself included, to clarify things. How do you make those?
If I would have created one of those, I could have been more clear.

Secondly, I see all the screenshots from Regis and yourself from the BIM workbench. I am using Arch myself. Is there an advantage to switching?
Are you doing all your modelling in there? Or are you switching back and forth between them.
User avatar
Roy_043
Veteran
Posts: 8546
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Post by Roy_043 »

For the GIF animation I have used ShareX.

I am using the BIM workbench because BIM is my main reason for looking at FreeCAD. The BIM WB is an extension of the Arch WB, combining its tools with tools from other WBs. But I am just starting out with FC, so I cannot say what would best suit your workflow.
User avatar
regis
Posts: 725
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Question on Arch Subtract

Post by regis »

glad this thread has been clarified.
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Question on Arch Subtract

Post by paullee »

Hi, Kunda draw me here (again) :) I did not check in details previously ... this looks strange.

Whilst it seems everybody know how to use the Task Panel to do the subtraction, it is pity that the original workflow fails...

With further test, it seem housing those element in the Building Object break the function :!:
  1. Select all the 4 elements [EDIT: Select the 2 Arch Objects will do ]
  2. Drag them to the 'root' (i.e. 'example subtract_2') icon - To remove them from the Building Object
  3. Now select the 'hole' object
  4. With ctrl pressed, select the 'floor' object.
  5. Subtract - Seems working now?
Can more peoples test above workflow - it is a bug then (the command is 'disturbed' somehow Building Object inlist / outlist )

Screenshot from 2019-03-08 21-39-22.png
Screenshot from 2019-03-08 21-39-22.png (161.26 KiB) Viewed 1207 times
Screenshot from 2019-03-08 21-39-49.png
Screenshot from 2019-03-08 21-39-49.png (202.57 KiB) Viewed 1207 times
Attachments
Screenshot from 2019-03-08 21-54-24.png
Screenshot from 2019-03-08 21-54-24.png (171.06 KiB) Viewed 1207 times
example subtract 2_ OK all elemens outside Bldg.FCStd
(17.31 KiB) Downloaded 37 times
example subtract 2_ By Task Panel.FCStd
(18.18 KiB) Downloaded 40 times
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Re: Question on Arch Subtract

Post by brjhaverkamp »

Hi Paullee,

Thanks for looking into this. But I tried your procedure, and it seems to reverse the order. I can now make the hole in the floor, but not the sandwich (for lack of a better description) where the floor structure cuts the middle part out of the hole structure.

So in short,
I could do B-A but not A-B.
Now I can do A-B, but not B-A.
Since I needed A-B, it is definitely an improvement, but not a total success yet:-)

Regards,

Bert
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Question on Arch Subtract

Post by paullee »

OK, further tests:-

  1. It seems it is kind of random now....:D
  2. Putting those object outside the Building Object seems do not 'free' them from the 'bug'
  3. It seems there is something happen Upon Opening the File (Restoring the document)
  4. It is random, and if in this session the 'order' is 'A-B', you do nothing to change this order...
  5. Close the file, and re-open, and it maybe 'A-B' or 'B-A'.... nothing in the selection order change this...

This seems to be the 'symptom' :) Can anybody high-skilled programmer look at the code to confirm the bug and offer a 'fix'? :lol:
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Question on Arch Subtract

Post by paullee »

Possible root of bug

https://forum.freecadweb.org/viewtopic. ... 59#p292678

Anybody could compile and test if this is fixed?
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Question on Arch Subtract

Post by yorik »

Hi guys,
Sorry for being late to the party..

I played a bit with this yesterday and apparently there has been one change somewhere that screws both the Arch Add and Arch Remove tools: The FreeCADGui.Selection.getSelection() method doesn't follow selection order anymore, but sorts alphabetically. So in some case, by luck, it still works, in some other cases not.

I'm thinking the best way out of this, would be to make these tools work in two steps: 1) you select the host, 2) you select the object(s) you wish to add/subtract...

*EDIT* Werner's fix apparently fixes it for now... But in any case it would be good to think of a more robust solution
Post Reply