← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 1941: Optional porosity in makeCloud, giving a value discards rMean (avoid guessing rMean when you know...

 

> Bruno, your change broke python's makeCould, can you fix/revert that
> please? (py/_packSpheres.cpp). Try scripts/test/periodic-compress.py or
> anything with pack.randomDensePack etc.
You could change

.def("makeCloud",&SpherePack::makeCloud,python::args("minCorner","maxCorner","rMean","rRelFuzz","num","periodic"),"Create random packing encosed in box given by minCorner and maxCorner, containing num spheres. Returns number of created spheres, which can be < num if the packing is too tight.")

to

.def("makeCloud",&SpherePack::makeCloud,(python::arg("minCorner"),python::arg("maxCorner"),python::arg("rMean"),python::arg("rRelFuzz"),python::arg("num"),python::arg("periodic")=false,python::arg("porosity")=-1),"Documentation here")

that should do the trick, actually. Note that you have to duplicate
default values in the wrapper, since there is no way to know what the
default values is from c++.

v





Follow ups

References