← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2185: py wrapping for shop::getSpheresVolume(). Used e.g. for computing porosity in a periodic cell.

 

> +	py::def("getSpheresVolume",getSpheresVolume,"Compute the total volume of spheres in the simulation (might crash for now if dynamic bodies are not spheres)");
is it THAT difficult to check that? (what I read recently, using
typeid(Sphere)==typeid(*b->shape) might be faster than dynamic_cast).
One of my goals was that you "cannot" crash yade from python. If you
can, it is a bug. (Of course I know many ways to crash ;-) )

v








Follow ups

References