I posted an issue on the github page for chrono a long time ago (no answers 
except for my own workaround) and this might be what is giving you problems 
here. From what I've observed, collisions with even very simple meshes 
(when not marked as being convex) just doesn't work as it should:

https://github.com/projectchrono/chrono/issues/541

I'm not sure what to do except for creating convex hulls from the 
input-mesh. It seems that then the collision-checking ends up using a 
different approach which seems to work.

fredag den 17. oktober 2025 kl. 11.51.17 UTC+2 skrev [email protected]:

> Dear all,
>
> This is a follow-up to the discussion I opened on the 1st of october 
> called "Contact detection on mesh objects". By setting up the radius 
> parameter of ChCollisionShapeTriangleMesh to a non zero value, some 
> contacts between meshes were detected, but many contacts are not detected 
> and the meshes continue to go through each others. I added a video to show 
> what is happening concretely.
>
> The two gears are controlled by a motor links, controlled by speed, that 
> go in opposite directions so that the gears collide. For information, to 
> get the .stl files, I open an assembly file in FreeCAD, select a part and 
> export it in .stl format.
>
> Here is what I tried:
>
> - Subdivide the mesh to create more triangles. The idea was that by adding 
> more triangles, the chance of detecting a contact would increase. But it 
> changed nothing 
> -  Tune the radius, envelope and margin parameters but I didn't find a 
> combination that solves all the problems 
> - Saved the mesh object in STL and OBJ formats but none of the two brought 
> better results 
> - In the code attached bellow, there is a scaling in load_stl_mesh so that 
> everything is in mm, I tried to remove it, but it did not help 
> - Let the second gear rotate freely using a revolut joint instead of a 
> motor link, but it did not help
>
> I am stuck in my learning of pychrono and rigid body collision and any 
> help would be greatly appreciated ! I put the code bellow but 
> unfortunately, I can't send you the .stl files.
>
> PS: I won't be available next week but I wanted to ask for help before 
> being unjoinable 
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/10cc7f1a-18d8-46aa-a421-a844f277d60cn%40googlegroups.com.

Reply via email to