Generated box2d b2PolygonShapes

Hi.

I wrote a simple svg2Box2d parser.
Where I'm basically getting all the paths from a SVG convert those into vertices.

Then when i have the vertices i check if the count of vertices are bigger then 8 (b2_maxPolygonVertices) if so use this class:
http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml To split my shapes into smaller vertices.

But when all this is done, i try to create the PolygonShapes everything works fine until sometimes it gets stuck on this method:
Code:
static b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count)


more specific on this line:
Code:
   // Centroid
   b2Assert(area > B2_FLT_EPSILON);


Anyone got a idea whats the reason?

Cheers
Emil
Drawing inside out shapes? Polygons must be convex and always must be clockwise ordering (or counter clockwise, depending on how you draw). Also, the testbed has a mini SVG parser.
Which file contains the svg stuff ?
I ran into a similar problem when using triangulated polygons. The most efficient triangulators will sometimes produce very thin triangles. It may be the case that some of the generated triangles are just too small, ie the triangle area is less than float epsilon.

-nick

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