yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11574
[Branch ~yade-pkg/yade/git-trunk] Rev 3507: Allowed Polyhedra-Wall interaction if Wall.sense==0
------------------------------------------------------------
revno: 3507
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Tue 2014-10-28 13:00:01 +0100
message:
Allowed Polyhedra-Wall interaction if Wall.sense==0
modified:
pkg/dem/Polyhedra_Ig2.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/Polyhedra_Ig2.cpp'
--- pkg/dem/Polyhedra_Ig2.cpp 2014-10-22 10:13:18 +0000
+++ pkg/dem/Polyhedra_Ig2.cpp 2014-10-28 12:00:01 +0000
@@ -124,7 +124,13 @@
//move wall
Vector3r normal = Vector3r(0,0,0);
- normal[PA] = sense;
+ if (sense != 0) {
+ normal[PA] = sense;
+ } else {
+ normal[PA] = 1;
+ Real dot = normal.dot(se32.position-se31.position);
+ if (dot<1) { normal[PA] = -1; }
+ }
CGALvector CGALnormal = CGALvector(normal[0],normal[1],normal[2]);
Plane A = Plane(CGALpoint(se31.position[0],se31.position[1],se31.position[2]),CGALvector(normal[0],normal[1],normal[2]));