Simple Boolean Cut Operations on Solids never return a Solid

Can someone please advise me on what should be a simple problem but appears not to be.
If I have a finite prism formed by using BRepPrimAPI_MakePrism constructed with a valid bounded face as the initial geometry
and I then cut that with a half space solid created using BRepPrimAPI_MakeHalfSpace constructed with a plane that does intersect the prism and I do this use the BRepAlgoAPI_Cut function
Why do I always get a result that is a compound solid? Why not a valid solid? and is it possible to get the solid from the result?

Forum supervisor's picture

Dear Steve,
Compound is just a container for the result.
Explore it and you will get the expected solid.