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.
brjhaverkamp
Posts: 112
Joined: Thu Sep 24, 2015 3:14 pm

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

Postby brjhaverkamp » Mon Feb 18, 2019 11:28 am

Hello all,

In my "quest" to model our attic, I wanted to create a hole in the floor object for the staircase.
But I either do something wrong, or there is a bug in the arch subtract function.
Attached is a simple example with only 2 objects I want to subtract structure 2 from structure 1, leaving a slit in it.
But whatever I try, I end up subtracting structure 1 from structure 2, cutting the thinner structure in 2 pieces.

What is the right way of doing this?

Regards,

Bert
Attachments
example subtract.FCStd
(12.67 KiB) Downloaded 16 times
Last edited by Kunda1 on Mon Jun 17, 2019 7:40 am, edited 1 time in total.
Reason: Updated forum thread name
Roy_043
Posts: 469
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Postby Roy_043 » Mon Feb 18, 2019 3:14 pm

The selection order is the key. If I select 'Structure 1' first, the result is as you desire. I seem to remember that for some other Arch/BIM tools the last object is the parent object. But here the reverse applies.

Code: Select all

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Dutch/Netherlands (nl_NL)
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Question on Arch Subtract

Postby regis » Mon Feb 18, 2019 3:48 pm

it goes as follow, create shape that goes through structure 1 with the profile of the sketch for structure 2 you have created. Once you do that, Select Structure1 and then Select the extrusion and hit the down arrow bottom to subtract. Not the Minus
Attachments
Screenshot from 2019-02-18 10-45-13.png
Screenshot from 2019-02-18 10-45-13.png (151.02 KiB) Viewed 560 times
Screenshot from 2019-02-18 10-43-30.png
Screenshot from 2019-02-18 10-43-30.png (201.96 KiB) Viewed 560 times
example subtract.FCStd
(17.56 KiB) Downloaded 10 times
brjhaverkamp
Posts: 112
Joined: Thu Sep 24, 2015 3:14 pm

Re: Question on Arch Subtract

Postby brjhaverkamp » Tue Feb 19, 2019 11:53 am

Hi Regis, Roy,

Thanks for both your replies with 2 different approaches.
@Roy, Indeed, I was expecting it to depend on the selection order. This is how the boolean operations in the Parts workbench work. But whether I select Structure 1 first, or structure 2, the results is the same.
Interesting, up reloading the example file today, it is now reverse of yesterday, I can only create the split in structure 1, independent of which I select first. So I am more and more starting to suspect a bug.
It is working for you, right? Which version of freecad are you using?
Mine is one of the latest 0.18. If you are on 0.17, could you try with 0.18?

@Regis, I am missing something in your explanation. What do you mean with "create shape that goes through structure 1". Structure 2 does that, right? Why would you make a separate extrusion for this? Or do you mean something different? And you are using the functions from the part workbench, right? That would be an other option indeed. If I cut structure1 with structure 2 (or visa versa) I get indeed the expected results. But I wanted to stay in the Arch tool and experiment with subtract.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15816 (Git)
Build type: Release
Branch: master
Hash: 7ee0e4d43909ec688299b8498b240cccf8362c47
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Question on Arch Subtract

Postby regis » Tue Feb 19, 2019 1:06 pm

Download your file I re uploaded with changes in my reply and youbwill see. When I opened your file structure 2 was split so perhaps explaining why you couldn't cut. So I created another shape extrusion that crosses structure 1 to use it for the split cut and it worked no problemo.
Roy_043
Posts: 469
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Postby Roy_043 » Fri Feb 22, 2019 1:21 pm

@brjhaverkamp
See my previous message for that info.

@regis
Structure 2 seems to be split. But if I open the original file, switch to wireframe and then recompute, the object appears to be a continuous solid.
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Question on Arch Subtract

Postby regis » Sat Feb 23, 2019 2:23 am

Roy_043 wrote:
Fri Feb 22, 2019 1:21 pm
Structure 2 seems to be split. But if I open the original file, switch to wireframe and then recompute, the object appears to be a continuous solid.
Yes i had noticed it was split aswell, that's probably why i guessed that i didn't work. And that's why in the file I re uploaded I had to create a new object to create the boolean. So something somewhere went wrong if the strcture 2 wasn't originally split but displayed as split.
brjhaverkamp
Posts: 112
Joined: Thu Sep 24, 2015 3:14 pm

Re: Question on Arch Subtract

Postby brjhaverkamp » Mon Mar 04, 2019 8:43 pm

Hello all,

I understand what you are saying about strucure 1 seeming to be split in 2. But that is only due to a missing recompute. Just mark it for recompute, then recompute it and the gap is filled and it is a normal box. Apparently a left over of my try and undo afterward. Sorry for the confusion.
After doing the recompute, Structure 1 and 2 are both rectangle boxes of different sizes again that intersect.

Select structure 1, ctrl+ select structure 2, hit substract, and you end up with structure 2 minus structure 1.
Selecg structure 2, ctrl+ select structure 1, hit substract, and you end up with structure 2 minus structure 1.
There is no way to create structure 1 minus structure 2 with the subtract fuction!
And of course I could use the boolean function from the part workbench, but that is not the point here.

There now is a thread with a similar issue on the Add function.
https://forum.freecadweb.org/viewtopic.php?f=23&t=34429
Possibly the 2 are related.

I have created a bug report on this one and mentioned the add problem there as well
https://www.freecadweb.org/tracker/view.php?id=3882

Kind regards,

Bert
Roy_043
Posts: 469
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Postby Roy_043 » Tue Mar 05, 2019 8:06 am

As already explained I cannot reproduce your bug.

Code: Select all

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16028 (Git)
Build type: Release
Branch: master
Hash: 9079de7516eca945587e18f6076ec74eb7bd043c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Dutch/Netherlands (nl_NL)
Attachments
2019-03-05_BIM_Subtract.gif
2019-03-05_BIM_Subtract.gif (272.88 KiB) Viewed 374 times
Roy_043
Posts: 469
Joined: Thu Dec 27, 2018 12:28 pm

Re: Question on Arch Subtract

Postby Roy_043 » Tue Mar 05, 2019 8:22 am

BTW:
I find it strange, contrary to what you would expect(?), that a newly opened document can be in a state where a recalculation has to take place.