← Back to team overview

yade-users team mailing list archive

Re: [Question #190529]: deleting some liquid bridges in Law2_ScGeom_CapillaryPhys_Capillarity

 

Question #190529 on Yade changed:
https://answers.launchpad.net/yade/+question/190529

Luc Scholtès proposed the following answer:
Hi Jakob,

If you want to loop over interactions you can do like this (with Python,
right?)

for i in O.interactions:

To check wether the interaction is Real, you can use this

 if i.isReal:

To check wether the interaction is between spheres or not, you can use
something like this

    if isinstance(O.bodies[i.id1].shape,Sphere) and
isinstance(O.bodies[i.id2].shape,Sphere):

Then, to access bodies properties, you can do this

        y1 = O.bodies[i.id1].state.pos[1];

Hope it can help

Cheers

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.