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

    Status: Open => Answered

Jan Stránský proposed the following answer:
> I modified the code

please provide the code

> def qiyong():
> def qiyong1():

do the center values need to be hardcoded?
Or is there some logic, e.g. "center + 
Vector3(radius*cos(angle),radius*sin(angle))", which would help significantly 
to understand the problem?

E.g. here:
> d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center 
> of "b"
> if d < circleRadius
>     O.bodies.erase(b.id)

are you sure about the values? What about adding b.shape.radius to the d value?
With the hardcoded centers in "qiyong" function it is really diffucult to tell 
where the problem is..

> def checkUnbalanced():
>     ...
>     for b in O.bodies:
>          qiyong()
>          qiyong1()

Also this, as provided, is most likely wrong, you do not to add
particles inside "for b in O.bodies:" loop.

> blue particles (i.e. old particles) still exist in the circular hole,
and white particles (new particles) coincide with the surrounding blue
particles.

As I already told, you have these options:
1) make the hole larger (make larger radius of the hole)
2) put new particles closer to the center
3) if none of above two options is possible, then you are doomed to have 
overlaps
There is nothing more to tell :-)

Cheers
Jan

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to