Cable Tools
Here are several tools available when setting up an INTERACT simulation with cables or hoses. These are quite useful when trying to simulate a cable harness or evaluate its bending radius in real time.
Attach Rigid bodies to cable 
It is possible to attach the cable to a certain rigid body (and not only at the Start and End nodes) using the XdeCircularBeamAttach component. For example, it can be used to place hose clamps on your cable.
To do so,
- Physicalize your attaching part.
- Select your part and go to INTERACT > Physics > Cable > Add Cable Attach Point.
- Use the Cable Node Picker in the XdeCircularBeamAttach component to select the node on the desired cable that the attach point is bound to.
You can now manipulate the cable with your grasp manipulator (desktop or VR) and use it in your assembly scenario !
Connect multiple cables 
You can connect cables by selecting the cables to connect and using INTERACT > Physics > Cable > Merge Cable Attach Points.
It merges selected cables' attach points that have the same position. In other terms, one attach point game object will have as many XdecircularBeamAttach components as there are attach points with the same position and other ones will be destroyed. This way, cables are connected together easily.
Bend radius 
Bend radius is the minimum radius one can bend a cable without damaging it. You can ensure that a cable fits this specification by switching to Curvature rendering mode in the XdeBeamMeshRenderer component.
This view indicates whether a cable's curvature is below a given threshold, which can help spot parts of the cable that are most likely to be damaged.
The minimal bend radius is in meters.
Raising Events on bend radius 
You can subscribe to events in order to trigger custom behaviours when a cable is bent too much:
onLowerThanMinimumBendRadius
is triggered when the cable's bending radius is below the chosen minimum curvature and might therefore be damaged.onGreaterThanMinimumBendRadius
is triggered when the cable's bending radius gets back to its safe value.
using UnityEngine;
using Interact.XdeExtension;
public class CableEvent : MonoBehaviour
{
public XdeBeamMeshRenderer l_renderer;
void OnEnable()
{
l_renderer.onGreaterThanMinimumBendRadius += OnOverEventCatch;
l_renderer.onLowerThanMinimumBendRadius+= OnUnderEventCatch;
}
void OnOverEventCatch(XdeBeamMeshRenderer p_sender)
{
Debug.Log("Back to normal bending on :"+ p_sender);
}
void OnUnderEventCatch(XdeBeamMeshRenderer p_sender)
{
Debug.Log("Too much bending on :" + p_sender);
}
}
Self-interference 
To perform auto-collision on a cable, you must set Contact
in the Collision Matrix between cables in the cable collision group itself.
You must also disable the Contact monitoring
in [PhysicsManager] under XdeScene.
Manipulate cables
There are several ways to manipulate a cable during a simulation:
- Use a Manipulator on the cable's Start or End Attach.
- Add an Attach Point on a physicalized object. The cable will follow this object when manipulated.
- An alternative is to add friction between its materials. This costs more in terms of performance but allows you to affect the entire cable.
Unweld
Don't forget to uncheck the Weld At Start toggle on the cable's Start/End attach components if you want to be able to move them.