Separation (Cutting?) Algorithm?

Greetings!
In my project I have a space ship that build of a blocks. Connection structure is not a grid but free form, meaning blocks can be connected in different angles and positions to other block sockets.
Each Block knows about all blocks that connected to him.
Also ship have main block named “Core”

If ship blocks being destroyed in a way that cuts ship in half, I need a way to create new “ship” object from cutted clamp of blocks and make it fly separately from original object.

Visual demonstration:



What is the algorithm to doing so?