yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02747
Re: acces to sphere/wall information
> if O.bodies[i.id1].shape=='Facet' or O.bodies[i.id2].shape=='Facet':
> print O.bodies[i.id1].shape, O.bodies[i.id2].shape
if O.bodies[i.id1].shape.name=='Facet' etc (did I write it wrong last
time?). shape is Shape object in c++ (used to be InteractingGeometry),
the .name gives you class name as string.
> O.bodies[i.id1].shape['diffuseColor']=(1,0,0),
> O.bodies[i.id2].shape['diffuseColor']=(1,0,0)
>
> and I get this message
>
> SyntaxError: can't assign to literal
Works for me; fresh start:
O.bodies.append(utils.sphere([1,1,1],0))
O.bodies[0].shape['diffuseColor']=(3,4,5)
O.bodies[0].shape['diffuseColor']
-> Vector3(3,4,5)
v
Follow ups
References
-
acces to sphere/wall information
From: Emanuele Catalano, 2009-12-14
-
Re: acces to sphere/wall information
From: Bruno Chareyre, 2009-12-14
-
Re: acces to sphere/wall information
From: Václav Šmilauer, 2009-12-14
-
Re: acces to sphere/wall information
From: Emanuele Catalano, 2009-12-16
-
Re: acces to sphere/wall information
From: Václav Šmilauer, 2009-12-16
-
Re: acces to sphere/wall information
From: Bruno Chareyre, 2009-12-16
-
Re: acces to sphere/wall information
From: Václav Šmilauer, 2009-12-16
-
Re: acces to sphere/wall information
From: Bruno Chareyre, 2009-12-16
-
Re: acces to sphere/wall information
From: Václav Šmilauer, 2009-12-16
-
Re: acces to sphere/wall information
From: luc scholtes, 2009-12-16