Bug in DecomposeConvexAndAddTo

Hello!
When I put this vertex list in DecomposeConvexAndAddTo, I take incorrect result:
Code:
544.000000 -96.000000
544.000000 -160.000000
480.000000 -160.000000
480.000000 -224.000000
544.000000 -224.000000
544.000000 -288.000000
608.000000 -288.000000
608.000000 -224.000000
672.000000 -224.000000
672.000000 -160.000000
608.000000 -160.000000
608.000000 -96.000000

But, then I make some change in list, like change first-x-coordinate, result is correct:
Code:
545.000000 -96.000000
544.000000 -160.000000
480.000000 -160.000000
480.000000 -224.000000
544.000000 -224.000000
544.000000 -288.000000
608.000000 -288.000000
608.000000 -224.000000
672.000000 -224.000000
672.000000 -160.000000
608.000000 -160.000000
608.000000 -96.000000

How to fix this bug???
P.S. I take source code from: http://code.google.com/p/entonetics/sou ... omposition
It appears a bug fix from a while back never made it to SVN (my bad, I don't know what happened there). Luckily, it's an extremely simple fix that you can do yourself: go into b2Triangle.cpp, and change the last statement in the last function (the poorly named IsInside function) so that all the inequality tests have = as well, so it should look like:

Code:
return ((u>=0)&&(v>=0)&&(u+v<=1));

That should fix things up - as soon as I can, I'll check it into SVN so it doesn't bite other people.

FWIW, make sure you're applying some scaling, too (read up on pixel units vs. meter units either in the Box2d FAQ or here on the forums), your shape is awfully big to be in meters, and pixel units don't play well with Box2d!
ewjordan
Thanks you for fast fix and especially for some words about scalling!!
No problem, thanks for the bug report.

Fix is now in Box2d SVN, rev 205.

Original thread: https://box2d.org/forum/viewtopic.php?t=2676