Transform geometry not working

Hello, I am trying to create cuboids at specific origins but aligned via a coordinate system that I give it. I tried to transform them by giving them local coordinate systems, but that seemed to make matters worse, and moved the cuboids to the middle of nowhere. I am assuming its is somehow related to the world coordinate system, buy I cant seem to place them just right, can anyone point me in the right direction?