> For the complete documentation index, see [llms.txt](https://doc.realvirtual.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.realvirtual.io/components-and-scripts/motion/cable.md).

# Cable (Pro)

{% hint style="info" %}
The Cable component is part of realvirtual **Professional**. Find it under **realvirtual > Mechanical (Pro) > Cable** and **Cable Point**.
{% endhint %}

## Overview

The **Cable** makes a cable, hose, or dress pack **flexible**. You place **Cable Points** along the route, and the Cable calculates how the cable sags, bends, and follows moving machine parts such as robot axes or linear slides. The result is deterministic, so the same motion always gives the same cable shape — suitable for virtual commissioning.

Two components work together:

| Component       | What it is                                                                                              |
| --------------- | ------------------------------------------------------------------------------------------------------- |
| **Cable**       | The cable itself: its length, thickness, stiffness, and how it is drawn                                 |
| **Cable Point** | A child object of the Cable that marks where the cable is **fixed** (Anchor) or **led through** (Guide) |

The Cable can deform an existing CAD mesh, draw a generated tube, or show a simple line. In the Scene view you see a live preview of the cable shape while you place the points, even without running the simulation.

## Quick Start

1. Add a **Cable** to a GameObject. For a CAD cable, use the GameObject that holds the cable mesh and leave **Render Mode** on **DeformMesh**.
2. Click **Add Anchor** twice to create the start and end point of the cable. Add **Add Guide** points for clips or supports in between.
3. Move the points in the Scene view with the standard Unity move tool. Each point has its own gizmo, so you can click it directly.
4. For an end that sits on a moving part, drag that part (for example a robot axis) into **Connected To** of the Cable Point.
5. Leave **Cable Length** at 0 for an automatic length, or enter the real length in millimeters.
6. Press Play. The cable follows the moving parts.

## Cable

### Cable

**Points** (list of Cable Point) The ordered anchors and guides along the cable, from start to end. The first and last entry are the two cable ends; at least two points are required. Use the **Add Anchor** and **Add Guide** buttons to create points as children of the Cable.

**Cable Length** (float, millimeters) The rest length of the cable. 0 calculates it automatically as 1.05 times the distance along the points, which gives a slightly slack cable. Enter the real length to get realistic sag and reach.

**Diameter** (float, millimeters) Thickness of the cable. It sets the tube thickness, the line width, and the clearance used for collisions.

**Render Mode** (DeformMesh / ProceduralTube / LineOnly) How the cable is drawn. **DeformMesh** bends an existing CAD mesh along the solved cable. **ProceduralTube** generates a tube of the given Diameter. **LineOnly** draws a simple line, useful for debugging. If the CAD mesh cannot be deformed, the cable switches to ProceduralTube and logs a warning.

**Source Mesh** (MeshFilter) The mesh to deform in DeformMesh mode. Leave it empty to use the mesh on the Cable's own GameObject.

{% hint style="info" %}
DeformMesh needs a mesh with **Read/Write** enabled in its import settings. CAD imports often have it switched off.
{% endhint %}

### Simulation

**Segments** (integer) Number of calculation segments between the first and last point. More segments give a smoother cable but cost more calculation time. The minimum is 2.

**Solver Iterations** (integer) How often the cable constraints are refined per step. Higher values give a more accurate, stiffer result at higher cost. Together with Segments it sets the cost of the cable.

**Stiffness** (0 to 1) Bending stiffness. Low values give a limp cable, high values a stiff hose that resists bending.

**Min Bend Radius** (float, millimeters) The smallest radius the cable can be bent to. Set it to the bending radius from the cable datasheet so the cable never kinks. 0 means unlimited.

**Damping** (0 to 1) Calms the cable motion. Higher values make it settle faster and swing less.

### Collision

**Collide With Scene** (boolean) Pushes the cable out of colliders it would run into, for example the robot arms. The colliding objects need Colliders; a convex Mesh Collider on each robot link is enough. Non-convex Mesh Colliders cannot be used and produce a warning.

**Collision Layers** (layer mask) The layers the cable collides with. Only shown when **Collide With Scene** is on.

**Collision Clearance** (float, millimeters) Extra gap kept between the cable surface and the colliders. Only shown when **Collide With Scene** is on.

### Status

**Overstretched** (boolean, read-only) True while the points are further apart than the cable length. The cable is then pulled taut and drawn in orange in the Scene view. Increase **Cable Length** or move the points closer.

## Cable Point

**Mode** (Anchor / Guide) **Anchor** pins the cable to this point. **Guide** only leads the cable through or near the point, so the cable can slide through it like a clip or a cable guide.

**Connected To** (Transform) Optional moving part this point follows, such as a robot axis or a slide. Leave it empty to use the point's own position. When it is set, the point is positioned by that part, and its direction is taken from that part as well.

**Guide Radius** (float, millimeters) Only for guides. The allowed slack around the guide point. 0 holds the cable exactly on the point; larger values let it move freely inside that radius.

**Direction Length** (float, millimeters) Length over which the cable is held straight along the point's local Z axis (the blue arrow). On an **Anchor** the cable is rigidly fixed in that direction, like a cable gland. On a **Guide** the direction is held but the cable can still slide through, like a clip. 0 leaves the cable free.

{% hint style="info" %}
Direction Length was added in realvirtual **6.3.6** (Professional)
{% endhint %}

### Scene View

Cable Points draw their own gizmo, so you can click them in the Scene view and move or rotate them with the standard Unity tools. Rotate a point to change the direction of its straight run.

| Color  | Meaning                                                  |
| ------ | -------------------------------------------------------- |
| Red    | Anchor                                                   |
| Yellow | Anchor that follows a moving part (**Connected To** set) |
| Green  | Guide                                                    |

The cable itself is drawn blue, or orange when it is overstretched. A line from the point shows the **Direction Length**; for a guide it extends in both directions.

## Common Use Cases

* **Robot Dress Pack** – Replace the rigid CAD hoses on a robot with a cable that follows every axis.
* **Energy Chain Replacement** – Show a festoon or supply cable between a fixed point and a moving slide.
* **Cable Gland and Clip Behavior** – Use **Direction Length** to leave a connector straight and to hold a cable in a clip.
* **Concept Layouts** – Visualize cable routing early, without modeling every hose by hand.

## Tips

* Set **Min Bend Radius** from the datasheet. A realistic bending radius prevents unnatural kinks.
* Place a **Guide** wherever the real cable is held by a clip or sleeve. The cable then slides through it instead of being pinned.
* Use an **Anchor** with **Direction Length** at a connector so the cable leaves it straight before it bends.
* If the cable sinks into a robot arm, enable **Collide With Scene** and give each link a convex Mesh Collider.

## See Also

* [Robot Inverse Kinematics](/components-and-scripts/robot-inverse-kinematics.md) — robots whose axes the cable follows
* [Drive](/components-and-scripts/motion/drive.md) — the drives that move the parts the cable is attached to
* [Ribbon (Web) Handling](/components-and-scripts/motion/ribbon-handling.md) — flexible material running over rollers


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.realvirtual.io/components-and-scripts/motion/cable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
