How to create a single floor from closed loops?


Hello Dynamo Users I am trying to extract the geometry of this structural foundation slab and want to create a exact same floor with the help of dynamo. the problem i am facing is that there are two closed loops and when i am going to create a floor from the extracted top surface I am getting two floors 1st small closed loop and 2nd the bigger closed loop.

Any Idea how to create the same floor with a closed loop inside it from dynamo?

What have you tried so far? Which Revit version are you in? Have you searched the forum?