Is there a way to generate random parallepepeds with dimensions x, y, z, based on the script exists in the link: Generate random ellipsoids, which allows to generate random spheres. The purpose of my work is to make a study of a composite material which contains parallepeped reinforcements.
The problem of the script of generating spheres is that when parallelepede or cubes are used, the problem of overlapping between these particles will appear, since here we must check the condition between the two parallepeped bases which is different with the case of spheres.
The dimensions are displayed on the image such as the distance between the vertices of the two bases and the distance between the centers.
Thank you very much for your help.

scale_factor .. scale down to help fit
scale_factor = 1 domain = 1 only_cubes = True
tries_per_cube = 256 https://image.noelshack.com/fichiers/2019/24/2/1560276707-dsdsdsqd.png , How to adjust the dimensions of the cube and the distance between each two cubes, knowing that cubes are cuboids
– saded Jun 11 '19 at 18:08