> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Breakable joint

This example considers a breakable joint. A breakable joint is a joint that
cannot withstand an internal force higher than a given value. To create a
breakable joint:

1. Get the joint by inserting a command on a planar joint:

   ```python theme={null}
   joint=CS_Joint.Find(_jid)
   ```

2. Create a joint condition to prescribe zero velocity on the two translational degrees of freedom:

   ```python theme={null}
   driver=CS_Driver(Joint,System.Array[int]([0,1]),CS_Driver.E_MotionType.E_Velocity)
   ```

3. Define the value of the velocity, then retrieve the time measure:

   ```text theme={null}
   Env=CS_Environment.GetDefault()
   Sys=Env.System
   (ret,found,time)=Sys.FindOrCreateInternalMeasure(CS_Measure.E_MeasureType.E_Time)
   ```

4. Define the time as a variable, and use constant values for the two components:

   ```text theme={null}
   driver.SetInputMeasure(time)
   driver.SetConstantValues(System.Array[float]([0.,0.]))
   ```

   Next, make the driver only active if the force in the joint is less than a
   maximum threshold of 3N. To do that, create a [Condition](https://developer.synopsys.com/docs/rigid-body-dynamics/command-reference-for-rigid-dynamics-systems/2025-r2/condition.md) based on the joint
   force measure norm.

5. Retrieve the force on the joint:

   ```python theme={null}
   force=joint.GetForce()
   ```

6. Create a component measure, that is the norm 2 of the force. To be computed at each time step, this measure has to be added to the system.

   ```text theme={null}
   norm=CS_ComponentMeasure(force,-2)
   Sys.AddMeasure(norm)
   ```

7. Now, create the condition and assign it to the driver:

   ```text theme={null}
   cond=CS_Condition(CS_Condition.E_ConditionType.E_LessThan,norm,3.0)
   driver.Condition=cond
   ```

8. Finally, add the driver to the environment:

   ```python theme={null}
   Env.Drivers.Add(driver)
   ```
