I have encountered a strange behaviour in very rare cases when a particle hits exactly a common node of two triangles.
Attached a simple testcase with a single particle and a mesh with two triangles.
When the particle is at
0.075 0.0750001 0.425
everything works fine,
but if it is at
0.0750001 0.075 0.425
the contact is not detected.
I looked deep in the code but don't understand everything what happens in tri_mesh_I resolveEdgeContactBary.
The function everytime ends up in
....
else{
double closestPoint[3];
if(!edgeActive(iTri)[iEdge])
return LARGE_TRIMESH;
It seems to me that for both triangles the edge is not active, and in this case the distance is not calculated by any triangle.
Cheers,
Christian.
Attachment | Size |
---|---|
script.tar_.gz | 1.19 KB |
aaigner | Wed, 03/25/2015 - 18:35
Thx Christian.
Thx Christian.
I opened an issue in the master repository... somebody will care about it ;-)
cheers,
Andreas
ckloss | Fri, 04/03/2015 - 09:35
Hi Christian,
Hi Christian,
thanks for the info - we'll have a closer look in the frame of the next release!
Best wishes
Christoph
ckloss | Sat, 04/25/2015 - 15:26
Hi Christian,
Hi Christian,
thanks for posting this test case. I'll post a patch that improves the handling of such meshes in the release next week
Cheers
Christoph
richti83 | Wed, 04/29/2015 - 15:44
what has changes
Hi Christoph,
could you please be so kind and tell me what in detail has changed in the code to solve this issue ? It's impossible to find the right place in the commit because of 4848 files has been changed.
Thanks,
Christian.