← Back to team overview

yade-dev team mailing list archive

Re: Python scripts and clump creation

 

> Very nice! Now it looks like o.engines is a tuple of C functions even  
> if it should not be (I imagine)

Just like in c++, ClassName() creates instance of the type ClassName.
O.engines is a list of python objects and their python classes have same
names as the c++ classes they wrap. That means that it you instantiate
PersistentSAPCollider() in python, it creates wrapper object, which has
PersistentSAPCollider underneath (actually a shared_ptr to it).

More precisely, O.engines only looks like list of python objects, but
internally it mirrors what is in MetaBody::engines etc. You get the
idea, I think.

You can dump the simulation using O.save('/tmp/a.xml') and inspect the
XML if at all unsure.





References