BRepAlgoAPI_Fuse error (Sphere and cylinder)

this is my code:
I get a result FusedShape,but this shape is error,anybody help me,please...
gp_Circ c = gp_Circ(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 5);
TopoDS_Edge Ec = BRepBuilderAPI_MakeEdge(c);
TopoDS_Wire w = BRepBuilderAPI_MakeWire(Ec);
BRepBuilderAPI_MakeFace mkf(w);
TopoDS_Face f = mkf.Face();

TopoDS_Shape theShp1 = BRepPrimAPI_MakePrism(f, gp_Vec(0,0,10));//cylinder

TopoDS_Shape theShp2 = BRepPrimAPI_MakeSphere(gp_Pnt(5,0,10), 5);//Sphere

TopoDS_Shape FusedShape = BRepAlgoAPI_Fuse(theShp1,theShp2);

sergey zaritchny's picture

Hello hoya5121,

I would like to inform you that the posted problem is checked and reproduced.
The corresponding issue with ID = OCC22306 has been registered.
Later you can know if the issue is resolved by checking references to the specified ID in OCCT Release Notes. The analysis of the issue will take some time depending on our technical capability and availability of resources.
If you can't wait and the problem is urgent for you, you may contact us via Contact Form
We will try to find a solution/workaround acceptable for you.
As well as training and e-learning courses are at your disposal -