[how-to]-Boolean Operation Between bodies

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

[how-to]-Boolean Operation Between bodies

Post by nemesis »

So,
I'm trying the "Pat design Next" WB and, here is my first (suposed)bug :

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow)
Build type: Release
Branch: (detached from 081b86c)
Hash: 081b86c212de8a0d37ce537ce217b9d736ecda8e
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17

1 - create a new part
2 - add a new body
3 - add a addictive primitive in it (cube)
4 - Add a second Body
5 - Add a second additive primitive (cone) in the middle of the first body
6 - create a third body
7 - create a boolean operation between the 2 bodies, and it fail.

Code: Select all

Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Gui::DocumentItem::slotChangedObject(): Group references unknown object.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<type 'exceptions.TypeError'>: Property 'Bodies': type must be 'DocumentObject' or list of 'DocumentObject', not NoneType

Last edited by nemesis on Thu Apr 14, 2016 7:28 am, edited 1 time in total.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: [Bug?]-Boolean Operation Between bodies fail

Post by ickby »

Hello,

I can't reproduce your error message, for me it shows a clear indication of what the problem is in the report view. Could you please elaborate a bit more what you do after the creation of the 3rd body? What is selected when you use the boolean tool? And which body is the active one?
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: [Bug?]-Boolean Operation Between bodies fail

Post by nemesis »

ickby wrote: What is selected when you use the boolean tool? And which body is the active one?
so based on this question, I dig a little bit more and it works.
indeed I had the 3rd body selected. But it was on purpose.
I thought you need to make the boolean operation within a separate body.
so :

"How To perform boolean operations between bodies"

1 - activate the body on which you want to add/cut/fuse/intersect the operation.
2 - Select the last feature on which you want to perform the Boolean Operation
3 - Click on boolean operation
4 - add the body (can be considered as the "tool body")
5 - the Boolean operation ends in the 1st Body

ps : I thought I tried it yesterday, but it seams that midnight is not the right hour to test PDN (Part Design Next)
Attachments
boolean_Operation_PDN.png
boolean_Operation_PDN.png (136.53 KiB) Viewed 3328 times
Last edited by nemesis on Thu Apr 14, 2016 7:13 pm, edited 1 time in total.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: [how-to]-Boolean Operation Between bodies

Post by ickby »

ah yes, in PartDesign the boolean works like any other feature, it gets added to the linear feature stack and can be used as basis for other features as well. The nice thing is that when you add new features to the "cut out body" it gets also directly propagated to the top level bodie (and break all features based on the boolean, topologicalnaming jeahh :) )
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: [how-to]-Boolean Operation Between bodies

Post by nemesis »

I just modify the sequence I put.
I saw that you need to have the body activated, AND the feature selected.
if only the body is activated, the boolean operation comes at the end of the tree. better with a Warning message maybe? (like "No Feature Selected!").

If you select the boolean operation, you can have bodies to it, but it doesn't work. I think that's what put me in the wrong way.
Attachments
booleanPDN.png
booleanPDN.png (47.32 KiB) Viewed 3267 times
Post Reply