yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25763
Re: [Question #697545]: How to create a cylinder model with hard and soft interlayer
Question #697545 on Yade changed:
https://answers.launchpad.net/yade/+question/697545
Liu Changdong posted a new comment:
Hi Jan:
I have tried the second method you gave me ‘using the pack.inHalfSpace’ . However, the 'predicate(pos,r)' shows an error.
After my trial and error, I found the following method should to be
used:
halfSpace1 = pack.inHalfSpace((0.4,0.4,.4),Vector3(1,1,1)) # pack.inHalfSpace(point,normal direction)
halfSpace2 = pack.inHalfSpace((0.6,0.6,.6),Vector3(-1,-1,-1))
#predicate0 = halfSpace1 & halfSpace2 # intersection
def isSoftRockParticle(b):
pos = b.state.pos
r = b.shape.radius
return halfSpace1(pos,r) and halfSpace2(pos,r)
Thanks again!
changdong Liu
--
You received this question notification because your team yade-users is
an answer contact for Yade.