Rectangular section depth is rotated by 90 degrees - Grasshopper Rhino

Query 250111.gh (8.8 KB)

Thank you, It works now! @leopoldomonzani. May I know what the problem and the logic of solution was