Dividing Parts in more than one plane

The following is a sample containing simple walls and floors. The blue cuboid is a Mass I wish to use to “cut up” the Walls and Floors that intersect the edges of the Mass, i.e. determine the volume of the elements contained within the Mass.

image

As can be seen in the picture, it works when dividing along the vertical planes. However, for it to work perfectly, one more division would have to be created parallel to the two horizontal planes of the Mass.

I suspect that my final goal is not doable within Dynamo due to lack of workplane controls. Would this be possible using the API?