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

# Force

## Force

Inherits from: `object`

A class to represent 3D force.

Represents force in 3D space with x, y, and z components.
Supports mathematical operations and conversions to/from various formats.

Attributes:
x (float): x-component of force (N)
y (float): y-component of force (N)
z (float): z-component of force (N)

### **init**

```python theme={null}
Force.__init__(x: float, y: float, z: float) -> None
```

Initialize a Force object.

<ResponseField name="Arguments">
  <ParamField query="x (float)" type="float" required>
    x-component of force in Newtons
  </ParamField>

  <ParamField query="y (float)" type="float" required>
    y-component of force in Newtons
  </ParamField>

  <ParamField query="z (float)" type="float" required>
    z-component of force in Newtons
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="returns" type="None" />
</ResponseField>

### to\_dict

```python theme={null}
Force.to_dict() -> dict
```

Serialize to dictionary for JSON transfer.

<ResponseField name="Returns">
  <ResponseField name="dict" type="dict">
    Dictionary representation of the force
  </ResponseField>
</ResponseField>

### from\_dict

```python theme={null}
Force.from_dict(data: dict) -> 'Force'
```

Deserialize from dictionary.

<ResponseField name="Arguments">
  <ParamField query="data (dict)" type="dict" required>
    Dictionary containing force data
  </ParamField>
</ResponseField>

<ResponseField name="Returns">
  <ResponseField name="Force" type="'Force'">
    Reconstructed force object
  </ResponseField>
</ResponseField>
