Loading polygons into Box2D

Hey,

I'm trying to load information for Box2D to use from a file. I have the info setup as vertexes of a polygon. I load it in with a b2PolyDef, for example:

(202, 412)
(577, 419)
(580, 166)
(209, 171)

This should make a rectangle in the middle of the screen (my world mins/maxs are 0,0 and 800,600). I load it in, but when I check the b2Body that I loaded it into the values have been severely offset, and that part that shows up on the screen, the ball doesn't collide with. I've tried offsetting the origin position by the offset, like so:
Code:
            brushes[brush]->SetOriginPosition(b2Vec2(element.data[0]-((b2PolyShape *)(brushes[i]->m_shapeList))->m_vertices[0].x, element.data[1]-((b2PolyShape *)(brushes[i]->m_shapeList))->m_vertices[0].y), 0);

And the rectangle then rendered in the correct position, but the ball still didn't collide. What's going on here, and how can I fix it?

If I don't find a solution, I guess I'll have to resort to using boxDef's, but that would be bad because I'd have to sacrifice slanted surfaces and such, and just build my maps with rectangles. If you need more information about the problem, hop on #Box2D, I'm usually there.
I've created a FAQ. Hopefully this will resolve your issue:

http://www.box2d.org/faq.html

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