yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #19908
[Question #681341]: Move or scale a facet
New question #681341 on Yade:
https://answers.launchpad.net/yade/+question/681341
How to move or scale a facet? In my opinion, 1. get the 3 vertices of the facet. 2. give a increment to x coordinate of the 3 vertices (e.g., move in x direction). 3. the facet move automatically, if not, use the new vertices to generate a new facet and remove the old one.
But i find the vertices obtained by the method of 'body.shape.vertices' are not the vertices i use to define the facet.
Here is the codes,
### define a facet using 3 points
v1 =(0,0,0)
v2 = (1,0,0)
v3 =(1,1,0)
f1 = facet((v1,v2,v3),wire=False)
O.bodies.append(f1)
### get the vertices of the facet
for eb in O.bodies:
print(eb.state.pos)
print(eb.shape.vertices)
The result is,
Vector3(0.7071067811865475,0.2928932188134525,0)
[Vector3(-0.7071067811865475,-0.2928932188134525,0), Vector3(0.29289321881345254,-0.2928932188134525,0), Vector3(0.29289321881345254,0.7071067811865475,0)]
So what is the meaning of the 3 vertices? How to move or scale a facet?
Thanks,
Xuesong
--
You received this question notification because your team yade-users is
an answer contact for Yade.