Skip to content

Cables

Cable Tools


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.

Attach Points

It is possible to attach the cable at a desired position (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,

  1. Physicalize your attaching part.
  2. Select your part and go to INTERACT > Physics > Add Cable Attach Point.
  3. 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 !

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.

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.

Cables curvatures with different minimal radii

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 monitoringin [PhysicsManager] under XdeScene.

Inspect a node's curvature in editor

To get the curvature value at one specific node, use the Inspect Cable editor tool by hovering over it with the mouse cursor.

  1. Toggle the magnify glass icon in the Unity editor tools (if you cannot see it, you might need to click the arrow and then select "Inspect Cable").
  2. Select your cable in the hierarchy (or click the cable in your scene).
  3. Hover over your cable with the cursor, and you should see a white circle around the closest node, with its index and curvature.

Where is the node ?

If you cannot see anything, make sure that gizmos are enabled in Unity (in the scene tab). You should also check that your decimation factor is not too low or that you are not zooming too much on the cable.