Or I guess if the Top profile curve was longer it could go like this. You have to build an extruded surface for the cutting object instead of just using the curve because you don't want to cut all the way through:
I hope I succeeded .... what do you think? .... obviously the two sides now I have joined them in one piece .... in what I am attaching they are divided and then joined .... now I have made a single piece as suggested by Michael and Pilou