(OCC 6.5.3 regression) BRepAlgoAPI_Cut returns wrong result

The following cut operation returns a wrong result in OCCT 6.5.3: only one face is returned.
The result is correct in OCCT 6.5.2: two faces are returned.

Draw script:

restore blower1.brep b
explode b
bop b_1 b_2
bopcut r
whatis r
explode r

Can you reproduce the problem?

It is noticable that the cut-operation is slower in 6.5.3.
This is also my general impression. Do you know why?

Kind regards,
Timo

Attachments: 
Pawel's picture

Hi Timo,

I can confirm this (current OCCT from the git repository).

The result looks a bit like the face (only scaled) that caused problems in:
http://www.opencascade.org/org/forum/thread_23594/?forum=3

Both problems look somehow similar.

Pawel

Timo Roth's picture

The similarity is because such kind of geometries are created by our application: a closed b-spline surface with a hole. But it's not only a scaled version of the other face. The shape is different. This one is more straight than the other one.

Regards,
Timo

Forum supervisor's picture

Dear Timo,
I would like to inform you that the posted problem has been checked and reproduced.
The result in OCC6.5.3 returns one shape.
But from the first point of view it looks correct (only one shape).
See the attached picture Capture.png. From the first point of view (taking into account position of arguments) it looks like to be returned one shape. At least result returned by OCC6.5.2 looks wrong.
See the attached picture Capture2.png. The second (the biggest) shape looks like wrong. As I see from the first picture there is no contact between object and tool to produce such face.
Regards

Attachments: 
Timo Roth's picture

Yes, the result of 6.5.2 looks topologically not to be what is expected. It also cannot be displayed in shaded mode.

But I think it would be right that 2 faces are returned.
The object is cut by a cylinder. Both have only a very small volume in common. So the biggest part of the object should be returned (see Capture.PNG).

In 6.5.2 a very small face and a big face (which seems to be invalid) are returned.
In 6.5.3 only a very small face is returned, but the bigger face is not returned at all.

But probably this is an extreme case for boolean operations because the object and the tool are very close and nearly tangential at some point. So, maybe this cannot be called a regression but rather a limitation of boolean operations?

Regards,
Timo

Forum supervisor's picture

Dear Timo,
So, it is not a regression and topological result looks wrong as in OCC6.5.2 as in OCC6.5.3.
The biggest part of the object should be returned.
But look, please to the MAX tolerances of the Object shape (b_1):
Draw[67]> toler b_1
Tolerance MAX=3.6044386775509497e-005 AVG=1.435511780934748e-005 MIN=9.9999999999999995e-008
FACE : MAX=9.9999999999999995e-008 AVG=9.9999999999999995e-008 MIN=9.9999999999999995e-008
EDGE : MAX=8.0486487089187406e-006 AVG=2.4548281547252102e-006 MIN=9.9999999999999995e-008
VERTEX : MAX=3.6044386775509497e-005 AVG=2.1493189120770902e-005 MIN=9.9999999999999995e-008
Open CASCADE Technology requires that :
Tolerance(Vertex) >= Tolerance(Edge) >= Tolerance(Face)
Probably it is the reason of such strange result.
I suggest you try to rebuild the b_1 shape taking into account the above provided expression.
Regards

Timo Roth's picture

Sorry, but I think the tolerance requirement is met.
Tolerance(Vertex) >= Tolerance(Edge) >= Tolerance(Face)
3.6044386775509497e-005 > 8.0486487089187406e-006 > 9.9999999999999995e-008
Regards

Forum supervisor's picture

Yes, for sure.
So, you are welcome to register the issue in Mantis Bugtracker which is available via the Collaborative portal - http://dev.opencascade.org/index.php?q=home/get_involved.
Regards

Timo Roth's picture