Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Filo - Calculating weight on cable point
#4
(18-03-2020, 09:32 AM)josemendez Wrote: Hi there,

Yes, a cable is made up of multiple cable joints, that attach to links. Each link can be of 4 different types (attachment, rolling, pinhole or hybrid). So a cable looks like this:
Code:
Link ----(cable joint)--- Link ----(cable joint)---- Link ---...etc

Each cable joint stores a value (impulse magnitude) that is basically the amount of "instant" force applied by each joint. To convert an impulse to a force you need to divide by the delta time, so you can get a tension force in Newtons. To get the mass in Kilograms "seen" by the cable at its ends, divide by acceleration (since F = ma). In case of a simple load hanging from the cable, use gravity (-9.81f m/s2). This will print out the force applied and mass lifted by each cable joint in a cable:

Code:
IList<CableJoint> joints = cable.Joints;
foreach (CableJoint j in joints){
           float force = j.ImpulseMagnitude / Time.fixedDeltaTime;
           Debug.Log(force + " N, Mass:" + force/-9.81f +" Kg");
}

After a bit more fiddling with it, I see some hiccups in my implementation. So the large element is hoisted by four cables and each cable can be moved around in a crane-like system. What this means is that each cable does not necessarily lift the load vertically, like you described in the example above. For me to calculate the load, wouldn't I need the ImpulseMagnitude to be a Vector3 instead? Or do I need to calculate the direction of the Impulse myself?

An image of a similar crane like system:

[img] https://omis.net/upl/medium/6-Jibs%20and...System.jpg[/img]
Reply


Messages In This Thread
RE: Filo - Calculating weight on cable point - by MarcPilgaard - 19-03-2020, 09:33 AM