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:

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:
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:
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
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:
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_Fuseto 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:
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:
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