A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Cyrus » Tue Oct 12, 2010 10:15 am
Hi
I'm using NewtonCollisionCollide to detect the collision between two compound objects. I observed that, NewtonCollisionCollide is returning zero eventhough objects are penetrated as shown in the attached image (when we place fork horizontally over the plate, the penetration never occurs!!), this issue occurs only when I place the fork vertically over the plate.
I'm using Newton 2.20 (mogrenewt 1.7)
Please let me know if there is a way to debug this?
Regards
Cyrus
- Attachments
-

- Compound Objects Penetration
- Insertion.jpeg (47.45 KiB) Viewed 2753 times
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Tue Oct 12, 2010 10:34 am
That is wierd because the internal collision are based on calls to collide collide.
does it ever return a non zero penetrations?
-
Julio Jerez
- Moderator

-
- Posts: 12452
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Tue Oct 12, 2010 10:52 am
When placing the fork vertically NewtonCollisionCollide always returns 0 although it is penetrated
The origin of the fork is at the middle of the length of the fork. ( is this an issue?)
This issue occurs only when the attempt is made to place the fork vertically.
When placing the fork horizontally, NewtonCollisionCollide returns correct values.
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Stucuk » Sat Nov 06, 2010 1:38 pm
Berserkguard wrote:Have you tried placing it other than horizontally or vertically? (I mean, can you rotate it different ways and have it work as intended?)
If its a bug in Newton it shouldn't matter how he places it, its likely to end up on occasion becoming vertical assuming it has proper physics (Gravity).
-

Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Cyrus » Thu Nov 11, 2010 9:42 am
Hi,
Sorry for delayed reply.
I will be explaining here what exactly i am trying to do.
Initially we will pick and place the tray at some location using SetPositionOrientation(Vector3, Quaternion) api, later we place the Fork at some location using same API. There maybe chances that both the objects are placed in such a way that they are penetrated, We start using NewtonCollisionCollide api to check if they are penetrated, if fork is penetrated then we try to raise up the fork along y axis (using SetPositionOrientation(Vector3, Quaternion) ) by some units and check with NewtonCollisionCollide (recursively called until it returns zero(means no collision between objects)) until it gives the no collision value.
If we place the fork horizontally then the penetration is detected (using NewtonCollisionCollide) and the fork is raised up along Y axis and placed properly over tray. But, if we place it vertically at some point of time the api NewtonCollisionCollide fails and returns zero (no collision return value) eventhough objects are penetrated.
This problem is not because of gravity, in the beginning itself (while placing the objects in the editor) objects are penetrated then we are trying to separate them.
Thanks,
Cyrus
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Thu Nov 11, 2010 9:49 am
Cyrus wrote:If we place the fork horizontally then the penetration is detected (using NewtonCollisionCollide) and the fork is raised up along Y axis and placed properly over tray. But, if we place it vertically at some point of time the api NewtonCollisionCollide fails and returns zero (no collision return value) eventhough objects are penetrated.
It could be a Bug but without a test to reproduce it I do not know how to fix it.
those are very hard to track without a test to expose it.
-
Julio Jerez
- Moderator

-
- Posts: 12452
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Stucuk » Fri Nov 12, 2010 6:41 am
Julio Jerez wrote:It could be a Bug but without a test to reproduce it I do not know how to fix it.
those are very hard to track without a test to expose it.
Aka, Please Post an Example which Julio can Debug.
-

Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Cyrus » Fri Nov 12, 2010 8:40 am
Hello
I attached the models with which I'm facing the problem.
@Julio, Stucuk: I PMed the password for attached models.
Thanks
Cyrus
- Attachments
-
Models.rar
- Test Models
- (73.27 KiB) Downloaded 132 times
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Fri Nov 12, 2010 12:33 pm
the problem Cyrus is that you have a very specific case, The mesh do not do any good to my because I will have to set the same conditions you are using.
you can do two things,
1: send me a running demo tah I can run and attacj too in the DLL,
2: link the Alckemdia scene alchove manager to your project, and export the newton world, that way I can load it and see what is going on.
maybe option one is quicker.
-
Julio Jerez
- Moderator

-
- Posts: 12452
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 46 guests