Single edges not working well

Hello all! I really need some help with "Single edge shapes". What I am trying to do is make a "blob" body (a.k.a a soft-body) by connecting single-edges together with joints. Right now I just have a circle made of 20 edges, and am aiming at connecting each edge to the neighboring edge with a joint. Well, it seams Box2D doesn't like single edge shapes. I am using a masked circle to determine the mass of the edge. When I start my program the edges fall like they should, but when they hit the ground they "try" to react (bounce) but end up just falling through the floor. Any ideas what I am doing wrong? I am using the latest version of pyBox2D. Here is the code I am using to construct the bodies/shapes:

Code:
def build_body(World, Body):
   for Index1 in range(len(Body.Verts)):
      Index2 = (Index1 + 1) % len(Body.Verts)
      Index3 = (Index1 + 2) % len(Body.Verts)
      
      #Set up the edge
      EdgeVerts = [(Body.Verts[Index1].X, Body.Verts[Index1].Y), (Body.Verts[Index2].X, Body.Verts[Index2].Y)]
      EdgeVerts.reverse()
      
      #Calculate the center of the edge
      X1 = EdgeVerts[0][0]
      Y1 = EdgeVerts[0][1]
      X2 = EdgeVerts[1][0]
      Y2 = EdgeVerts[1][1]
      X3 = ((X2 - X1) / 2.0)
      Y3 = ((Y2 - Y1) / 2.0)
      
      #Recompute an edge with vertecies stemming from center point
      FinalEdgeVerts = [(-X3, -Y3), (X3, Y3)]
      
      #Make my program body
      TempBody = Base.GameBody(World)
      
      #The bodies in my program are drawn with my own data... not the Box2D data
      for V in FinalEdgeVerts:
         TempBody.Verts.append(Base.GameBodyVertex(V[0], V[1], 1.0, 1.0, 1.0, 1.0))
      
      #Create the Box2D body
      World.CreatePhysicsBody(TempBody)
      TempBody.PhysicsBody.SetBullet(True)
      
      #Create a small circle at the center of the edge to compute mass
      Weight = b2CircleDef()
      Weight.filter.categoryBits = 0x0001
      Weight.filter.maskBits = 0x0000
      Weight.density = 1.0
      Weight.radius = 0.50
      Weight.localPosition = (0.0, 0.0)
      TempBody.PhysicsBody.CreateShape(Weight)

      #Build said edge
      EdgeDef = b2EdgeChainDef()
      EdgeDef.setVertices(FinalEdgeVerts)
      EdgeDef.isALoop = False
      EdgeDef.mass = Body.Mass
      EdgeDef.density = Body.Density
      EdgeDef.restitution = Body.Restitution
      EdgeDef.friction = Body.Friction
      EdgeDef.filter.categoryBits = Body.Category
      EdgeDef.filter.maskBits = Body.Mask
      Shape = TempBody.PhysicsBody.CreateShape(EdgeDef)
      TempBody.PhysicsBody.SetMassFromShapes()
      TempBody.PhysicsBody.SetXForm((X1 + X3, Y1 + Y3), 0.0)
      World.AddBody(TempBody)
      
      #Destroy the incoming circle (only used as a template to build the edges)
      Body.Destroy = True
   


Please please help!
The problem is that edge shapes don't have any mass. Box2D is forced to assign some arbitrary mass properties to dynamic bodies that would otherwise have zero mass. Did you try using thin boxes instead of edge shapes?

That said, I would probably go a different route and use ray-casts and springs for a soft body.
What is a ray cast? Also, I wasn't able to find any spring joint... what do you mean?
I'm also trying to create a blob shape by connecting rectangular bodies from end to end. It works pretty well, except sometimes an edge will "pierce" the blob between two links, and then the bodies will be stuck together. I'm thinking about making a double wall with offset rectangles so there's no way for an edge to pierce straight thru, but I'm wondering if anyone else has ideas on how to prevent this issue.


thanks!
isBullet = true for any object that is dynamic and collides with the edge shapes.
An example of both spring joints and a blob-like figure can be found in testbed/test_Tribute.py.

It was contributed by Giorgos Giagas as a tribute to Gish.

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