Void size from duct size

Hello again Dynamo friends!

Today i´m struggling with getting the size of ducts/pipes because of different orientations…i think.

I am making intersection-solids of walls/ducts and create a cuboid by a bounding box. The problem is that for some voids i would need cuboid width and hight, for others i would need cuboid length and hight.

As you can see here it works for the left wall, but for the right wall i would have needed cuboid length instead of width:

So what i don`t understand is what the cuboid measurements depend on? Is this a Coordinatesystem thing? Or is it more like, the longest side of the cuboid is the “length” or something like this?

I already have a coordinatesystem for every wall instance, should i use that somehow?
Or is there a better way than working with a boundingbox/cuboid?

Would appreciate any advice :slight_smile: Full DYN attached.Durchbrüche5.dyn (145.5 KB)