You just need to make a boolean union before using the contour tool, that way you’ll be slicing a single object without the bottom faces. You can just use the contour command in Rhino, unless you need to do something else in GH.
Boolean union works when the bottom face is overlapping with the ground plane.
In this case you should use booleanSplit and then booleanUnion. If you skip the boolean union you might get the same but with the contour lines separated between the ground and volumes.
Thanks, Jose! I think it is possible to use BooleanUnion to get rid of the bottom side and then cut the plan in grasshopper. Because I need to test different distance between section line to get the ideal result.