Skip to content

Boolean fuse operation fails when rotation is involved #1041

@skelliam

Description

@skelliam

Description

This is related to this FreeCAD issue: FreeCAD/FreeCAD#27252

While investigating this issue, I found that it comes from the OCCT kernel, so I set out to write a test case in this repo to prove it and hopefully fix it.

Here is a video of the issue in FreeCAD:

Image

I have written some unittests in this repo (PR will be added) that reproduce the issue here on the master branch. The issue manifests itself slightly differently but there is still a bug here.

Here are the tests with one occurrence (no rotation), two occurrences (180 degree rotation), three occurrences (120 degree rotation), and so on until seven occurrences. I am creating a shape in OCCT like the FreeCAD user, then rotating it and attempting to use BRepAlgoAPI_Fuse to fuse the resulting geometry. Then I assert that the surface area of the result should be greater than the surface area of one shape multiplied by (occurrences - 1), for some cases I added a factor 0.80. When all of the actual surface areas are known this could be changed to assert the actual surface area value.

Expected Behavior

Expect all fuse operations complete successfully.

Actual Behavior

The results:

Image

The test case has an option to enable a .step file dump of the test which is useful for inspection. Here is what the shapes look like after the fuse operation:

Image

Sample Code or DRAW Tcl Script

I will make a pull request with at least the test cases shortly.

Operating System

Windows

Compiler

MSVC

Bitness

64-bit

OCCT Version

latest

Additional Files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. NewThe issue was created, but not updated by maintainer. Waiting for updates labels and categories2. BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions