Boolean errors in part workbench

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
jgamble
Posts: 3
Joined: Thu May 30, 2019 4:20 am

Boolean errors in part workbench

Post by jgamble »

Hi All,

I'm having a strange problem with Boolean operations in the part workbench since updating FreeCAD versions.

Details of current version:
OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.2)
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)


When I attempt to intersect the following parts:
Starting geometry
Starting geometry
Screen Shot 2019-05-29 at 9.30.09 PM.png (40.53 KiB) Viewed 1177 times

I get the following result:
Result of buggy intersection
Result of buggy intersection
Screen Shot 2019-05-29 at 9.30.53 PM.png (27.66 KiB) Viewed 1177 times

In the following older version of FreeCAD (details below), this works fine:
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)


The resulting (correct) intersection is:
Correct intersection
Correct intersection
Screen Shot 2019-05-29 at 9.38.43 PM.png (10.7 KiB) Viewed 1177 times

Geometry file is attached - thanks in advance for any help, and sorry if I missed this issue being reported already!

Cheers,
John
Attachments
built_simplified.FCStd
Geometry file
(14.35 KiB) Downloaded 39 times
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Boolean errors in part workbench

Post by chrisb »

This is coming from the OCC kernel. Different versions seem to handle the so called coplanar issue differently. The should be avoided anyway whenever possible. If you move shape_2 by e.g. -10nm it succeds.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
likewei92
Posts: 4
Joined: Thu May 30, 2019 3:48 pm

Re: Boolean errors in part workbench

Post by likewei92 »

What is the coplanar issue and why should this be avoided? Why is this not just a bug? If it's not a bug, the recommendation is to slightly move one of the shapes?
jgamble
Posts: 3
Joined: Thu May 30, 2019 4:20 am

Re: Boolean errors in part workbench

Post by jgamble »

Thanks for the response and advice!

Can you please elaborate on the precise move (direction, too) you're using that makes it work? I've tried a variety of moves and it doesn't seem to fix it for me, and I'd love to have this workaround.

Also, is there a bug report in OCC that you know about? It seems like something that should be easy to catch with a test, and I'd be happy to follow up on that in the right venue.

Cheers,
John
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Boolean errors in part workbench

Post by chrisb »

The coplanar issue is the situation where faces are coplanar, i.e. the faces occupy so to say "the same space". Boolean operations tend to fail for such situations.
This is indeed a bug, which is well known, but there is no possibility for fixing this, as it comes from the OCC geometric kernel.

I attach the file modified according to the explanation above.

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16822 (Git)
Build type: Release
Branch: master
Hash: 243aebf2dfbfe192b5bbd067020a5318a0fa8d0d
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
built_simplified_cb.FCStd
(19.04 KiB) Downloaded 27 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jgamble
Posts: 3
Joined: Thu May 30, 2019 4:20 am

Re: Boolean errors in part workbench

Post by jgamble »

Thanks! Unfortunately, when I look at the attached FreeCAD file, things still appear to be weird with the intersection (just in a different way). The left side of the resulting arch doesn't appear to be solid (it's missing an interior face). For me it looks like this:
missing face
missing face
Screen Shot 2019-05-30 at 10.33.24 AM.png (28.34 KiB) Viewed 1127 times
Does it look like that to you, too?

Cheers,
John
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Boolean errors in part workbench

Post by chrisb »

Yes, it is here the same. If you perform in Part workbench CheckGeometry with BOP Check enabled the result shows lots of self intersections. This is perhaps due to the vertically only slightly inclined faces not being separated enough.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: Boolean errors in part workbench

Post by kisolre »

chrisb wrote: Thu May 30, 2019 5:25 pm I attach the file modified according to the explanation above
In your file shape_2 has errors. With the file from the original post and shape_2 at z=-100nm it works ok
built_simplified_kiss.JPG
built_simplified_kiss.JPG (95.47 KiB) Viewed 1106 times

Code: Select all

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16687 (Git)
Build type: Release
Branch: master
Hash: ff1fb11af15a7c5f7f0ba3ef79588e128f397c2c
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)
Attachments
built_simplified_kiss.FCStd
(23.86 KiB) Downloaded 26 times
Post Reply