View Issue Details

IDProjectCategoryView StatusLast Update
0033064CommunityOCCT:Modeling Algorithmspublic2022-08-08 11:15
Reporterfestive-shrimp Assigned Toazv 
PrioritynormalSeveritymajor 
Status newResolutionopen 
PlatformLinuxOSUbuntu 20.04 
Product Version7.6.2 
Summary0033064: BRepAlgoAPI_Common fails to find common shape
DescriptionIn some cases, BRepAlgoAPI_Common silently fails to compute the common shape between two overlapping shapes. One such pair of quite simple shapes are attached here in BREP format. However, both of the shapes appear to be valid (verified with BRepCheckAnalyzer and in FreeCAD), so the expected behaviour would be the intersection of the two shapes.
Steps To ReproduceUse BRepAlgoAPI_Common on the two shapes. For convenience, a small C++ program which reads the two shapes and writes out their intersection as a BREP file is attached. The following commands can be used to easily compile the program, run it and list the contents of the generated BREP file:

g++ occt-common.cpp -I/usr/local/include/opencascade -o occt-common -lTKernel -lTKTopAlgo -lTKBRep -lTKMath -lTKBO
./occt-common
cat intersection.brep

Make sure to put the files occt-common.cpp, first.brep and second.brep in the same directory.
TagsNo tags attached.
Test case number

Attached Files

  • occt-common.cpp (935 bytes)
  • second.brep (30,944 bytes)
  • first.brep (58,680 bytes)

Activities

festive-shrimp

2022-07-12 13:46

reporter   ~0109777

The files did not appear at first, so here they are re-uploaded.
occt-common.cpp (935 bytes)
second.brep (30,944 bytes)
first.brep (58,680 bytes)

festive-shrimp

2022-08-08 11:15

reporter   ~0110145

After further investigation, it appears that this is caused by the coplanarity of some faces of the two shapes. A workaround could be to slightly displace one of the coplanar faces along its normal, however it would be ideal if this was fixed upstream.

Issue History

Date Modified Username Field Change
2022-07-12 13:44 festive-shrimp New Issue
2022-07-12 13:44 festive-shrimp Assigned To => msv
2022-07-12 13:46 festive-shrimp Note Added: 0109777
2022-07-12 13:46 festive-shrimp File Added: occt-common.cpp
2022-07-12 13:46 festive-shrimp File Added: second.brep
2022-07-12 13:46 festive-shrimp File Added: first.brep
2022-07-12 14:21 msv Assigned To msv => azv
2022-08-08 11:15 festive-shrimp Note Added: 0110145