← Back to team overview

yade-users team mailing list archive

Re: [Question #703662]: How to count the number of spheres and how to change the color of the facet

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> How does the following code count the number of spheres
> how to change the color of the facet

please read [1] (point 5) and next time please open separate question
for separate problem

> How does the following code count the number of spheres

the code does not count anything

> how to change the color of the facet

###
for b in O.bodies:
    if isinstance(b.shape,Facet):
        b.shape.color = someColor
        # b.shape.wire = False # maybe?
###

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.