Hi,Radu
Thank you very much for your prompt reply. The issue you pointed out is correct: I made a mistake in the direction of the normal. When I corrected this issue, it seems to work properly. In this demo, I just tested using a triangular mesh for collisions, and in the future, I will use complex models for precise collisions You mentioned that there are many issues with my code, can you help me point them out? Thank you very much. I am very interested in this physics engine --Page 在2023年11月30日星期四 UTC+8 16:02:20<Radu Serban> 写道: > Page, > > > > First of all, please attach code as a text file, not a Word document! > > > > There are many issues with the code you provided and it’s not clear to me > why you are trying such a low-level approach when other solutions are > available. If you are convinced you need to create a > ChTriangleMeshConnected programmatically (hopefully for something other > than a box), please first make sure you understand well how those work and > how they should be created. > > > > Having said that, one problem with your code is that you define the mesh > with normal pointing inwards. The order of the vertices in each triangle > follows the right-hand rule. > > > > --Radu > > > > *From:* 'Page' via ProjectChrono <[email protected]> > *Sent:* Wednesday, November 29, 2023 10:03 AM > *To:* ProjectChrono <[email protected]> > *Subject:* [chrono] The collision is strange after using AddTriangleMesh > > > > Hi,all > > I write a simple demo, I built a ChBody, use AddTriangleMesh, add a cube > mesh, so that two cubes do collision, but the collision effect is obviously > wrong, I hope someone can help me, the following is the code and > demonstration video > > -- > 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 on the web visit > https://groups.google.com/d/msgid/projectchrono/e35df334-7e57-4030-9a14-38c6a60e37a7n%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/e35df334-7e57-4030-9a14-38c6a60e37a7n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 on the web visit https://groups.google.com/d/msgid/projectchrono/24ec914c-38e7-421f-822a-7a7b7e0c83ban%40googlegroups.com.
