Mannually Update Location of Components of Clumps
I did a test about mannually updating location of one clump's components:
## here is the example:
a = utils.sphere(
b = utils.sphere(
c = utils.sphere(
O.bodies.
##Now, I want to mannually change the position of 'a':
a.state.pos = Vector3(0,0,100)
##However I don't know what information of the clump that contains 'a' should be changed.
##If I use O.step(), then the clump will set the location of 'a' back.
O.step()
a.state.pos
##Output:
##According to those examples about Clump, I figured out one solution: That is to remove a from the clump and then add it back:
O.bodies.
O.bodies.
O.step()
a.state.pos
##Output:
##This is doable, but it will make the calculation really slow when there are many components. So I want to know if you can figure out some better solution?
Thanks for your precious time, and I'm looking forward to hearing from you!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- MikeZhao
- Solved:
- Last query:
- Last reply: