Wrong Shape from the BRepAlgoAPI_Cut.

Dear All,
I found there might be a problem of the BRepAlgoAPI_Cut algorithm.
For 2 spheres,s1 and s2:
s1=BRepPrimAPI_MakeSphere(gp_Pnt(0,5.5,18),4.0).Shape()
s2=BRepPrimAPI_MakeSphere(gp_Pnt(0,4.5,14),1.0).Shape()

as shown in pict1. when I cut the s2 from s1 using the BRepAlgoAPI_Cut and got the shape s3:
s3=BRepAlgoAPI_Cut(s1,s2).Shape()

The result is shown in pict2. It seems the result is wrong.
But when I change the radius of sphere s2 from 1.0 to 0.99, I got the right shape as shown in pict3.

Could anyone explain this problem? or is is a bug in the BRepAlgoAPI_Cut: algorithm? Thank you.

Bin

Dmitrii Pasukhin's picture

Hello. Looks like a bug (looks like a prolem with precision).

Could you please create an issue into bug-tracker? https://tracker.dev.opencascade.org

If not - I will report by myself.

Best regards, Dmitrii.

bin zhang's picture

Thank you for your quick reply and it's better if you can report it.

Dmitrii Pasukhin's picture

Done: https://tracker.dev.opencascade.org/view.php?id=33570

The ticket is in the queue for analysis.

Best regards, Dmitrii.