Kangaroo "drape" collision between two Meshes?

I would like to “drape” a perforated mesh using something like a “cloth” (mesh plane) to fall down and collide with the perforated mesh, covering the holes by tightening the cloth so that it doesn’t fall through the holes. I found an example of a mesh colliding with a Brep, using SPC component (SolidPointCollision). This example:


(The GH: Self collision 2018.06.27_mcneel_forum2.gh (32.0 KB)

However, in my case the target for the collision isn’t a solid Brep, it’s an open Mesh, and I couldn’t find a component which directly handles mesh-mesh collisions. The collision I want is a kind of “Drape” over the mesh which is full of holes (to be covered):

I have tried the Rhino Drape command, but it seems the draped surface “falls through” the holes, and I can’t find any option making the “drape” stiff enough to stay on top of the mesh (slight downward “dents” is acceptable, if only the holes (tunnels) are essentially covered).

I also want the “drape” surface to have marked creases where it hangs over sharp edges so I can cut the “drape” using sharp weld angle (near 90º).

Is there any GH example where I can find out how to make such a “drape” collision between two meshes?

2019-12 Mesh to be Draped.3dm (346.9 KB)

// Rolf

Hi Rolf,

This is a little better - it uses a goal I posted here that does collision between the edges of the mesh being draped and the mesh being draped over (meaning it doesn’t have to be solid like with solid-point collision).
drape_over_linecollider.gh (18.4 KB)
I really should write a triangle-triangle collider though.

An alternative approach could be to use something like ball-pivot or iso-surfacing (though the latter will add some offset) to get a closed mesh to drape over

Thank you Daniel, this looked very promising! However, when the “cloth” had landed, it suddenly started “boiling”, like so:

Perhaps some parameter can calm this down?

Edit:

This MeshLineCollider component is interesting and a good start, although it tends to fall through the target mesh and also doesn’t seem to come to full rest. Trying to calm things down it tends to make the cloth either too stiff (won’t go very deep down in valleys and grooves), or if increasing the Load it tends to bleed through the target mesh.

So, if it the cloth could be more “heavy” and also more elastic (reaching closer to the bottoms of grooves and valleys) while at the same time not being able to “bleed into” the target mesh, then it will do a good job patching “hopeless” bad mesh surface, which would be very difficult to patch in any other way.
I have tried manipulating Load, Strength of LengthFactor (of the cloth), also the penetration Strength of the target mesh (MeshLineCollider), I also tried to modify the Smooth strength, but the cloth still wont come to rest, and also bleeds though a little bit in places.

But this is getting close, and I think this is pretty cool! :slight_smile: I also tried to play around with the code in the MeshLineCollider, but I didn’t achieve much. I guess you’re right in that a triangle collider would be better at preventing bleed through. Increased cloth elasticity perhaps can be fixesd with existing components? (I have not checked that as of yet but I have that next on my list). For performance reasons perhaps one could lump together some elasticity and load into the same collision solver?

Anyway, thank you very much for your work, it looks very promising and can open many new possibilities wrestling with “hopeless” meshes.

// Rolf