Thank you both for your comments.
I tried salvo’s script and it was successful! Thank you.
I also found the simple way to solve this problem based on the Jacob’s comment.
I extracted minimum and maximum point from the point list and created bounding box which can be converted into the Cube.
Anyway, thank you for helping me!