Closing breps


My breps are a mixture of trimmed, untrimmed and open breps. I want them to close so i have a total of 16 Closed breps. I’ve tried creating an object that surrounds my object and then using solid difference. Do anyone have an idea how i can make this happen?

Thanks in advance!

Upload code.