← Back to team overview

yade-users team mailing list archive

Re: [Question #686571]: Access to UNV facets

 

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

Jan Stránský proposed the following answer:
> I hope that this description is more understandable :)

not really :-D

> So, I want to have an access to to this data.

you have access to facet data the same way as any other shape..
###
for b in O.bodies:
   if not isinstance(b.shape,Facet): continue # skip non-facet bodies
   area = b.shape.area
   position = b.state.pos
   ... # whatever with area and position
###
or
###
def functionWhichDependsOnAreaAndPositionOfEachFacet(facet):
   area = facet.shape.area
   position = facet.state.pos
   ... # whatever with area and position

for b in O.bodies:
   if not isinstance(b.shape,Facet): continue # skip non-facet bodies
   functionWhichDependsOnAreaAndPositionOfEachFacet(b)
###

Another point, if the next question is not related with UNV (the
original topic), please open a new question [1]

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.