Question #253401 on Yade changed: https://answers.launchpad.net/yade/+question/253401
Jan Stránský proposed the following answer: Hi Henry, Block in your example is not Body instance, it is some gts object (actually list, therefore it has no state). Bodies (some number of facets) are created by pack.gtsSurface2Facets function. At this moment, you can assign mass to individual facets. But they are independent. To make them like one body, use appendClumped instead of just append (see my last email). However, I've never used clump made of facets, so I can't guarantee that it will work as you want, but it is worth to try :-) to summarize: Block=gts.read(open(mesh+'.gts')) # this creates some gts object, not yet Yade body facets = pack.gtsSurface2Facets(Block, wire=True) # creates list of facets, each facet is actual Yade body clumpID,clumpMembersIds = O.bodies.appendClumped(someListOfFacets) # add facets as one clump to the simulation, returns ids of appended bodies clump = O.bodies[clumpID] # get actual body form its id clump.state.mass = whatever # now you can operate with the clump Also, what is your goal of this approach? Do you have only one such mesh particle and then only spheres? Because there is no implementation of facet-facet interaction, so two such mesh bodies would not interact with each other.. cheers Jan 2014-08-21 16:07 GMT+02:00 Henry <[email protected]>: > Question #253401 on Yade changed: > https://answers.launchpad.net/yade/+question/253401 > > Henry posted a new comment: > Furthermore there are some errors: > > Block1.state.mass=1.0e8 > AttributeError: 'list' object has no attribute 'state' > > -- > You received this question notification because you are a member of > yade-users, which is an answer contact for Yade. > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-users > Post to : [email protected] > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

