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

# Load & Support Diagram

> Display unfactored load types and supports on structural members

The Load & Support Diagram is used throughout the modern platform to plot a load and support diagram with all unfactored load types and supports. It uses diagram widget type `"beamLoadSupport"`.

## Implementation

<CodeBlock title="Basic Load & Support Diagram">
  ```json theme={null}
  {
      "type": "sheetTemplateWidgets",
      "attributes": {
          "type": "diagram",
          "diagram": [
              {
                  "type": "beamLoadSupport"
              }
          ],
          "equation": [
              {
                  "result": "{PARAMETERS}",
                  "condition": "CONDITIONS"
              }
          ],
          "referenceId": "load_support_diagram"
      }
  }
  ```
</CodeBlock>

## Plot Parameters

| Parameter      | Format           | Example           | Description                                                                                                              |
| -------------- | ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
| xData          | array of numbers | `remote.plot.x`   | X coordinates along the beam                                                                                             |
| r              | nxm array        | `x("r")`          | Support locations from a traditional template `r` widget. Either `rDict` or `r` is required                              |
| rDict          | array of dicts   | `remote.plot.R`   | Support locations and types, from the solver. Either `rDict` or `r` is required                                          |
| PL             | array of dicts   | `remote.plot.PL`  | Point load locations and magnitudes                                                                                      |
| DL             | array of numbers | `remote.plot.DL`  | Distributed load values at each X-coordinate                                                                             |
| ML             | array of dicts   | `remote.plot.ML`  | Moment load locations and magnitudes                                                                                     |
| AL             | array of dicts   | `remote.plot.AL`  | Axial load locations and magnitudes                                                                                      |
| ADL            | array of numbers | `remote.plot.ADL` | Axial distributed load values at each X-coordinate                                                                       |
| lenConvert     | number           | `0.001`           | (defaults to `0.001`) Conversion factor for lengths                                                                      |
| dlConvert      | number           | `1`               | (defaults to `1`) Conversion factor for distributed loads                                                                |
| loadLenConvert | number           | `1`               | (defaults to `1`) Conversion factor load lengths                                                                         |
| lenUnit        | string           | `"m"`             | (defaults to `"m"`) Unit for lengths                                                                                     |
| plUnit         | string           | `"kN"`            | (defaults to `"kN"`) Unit for point loads                                                                                |
| mlUnit         | string           | `"kNm"`           | (defaults to `"kNm"`) Unit for moment loads                                                                              |
| dlUnit         | string           | `"kN/m"`          | (defaults to `"kN/m"`) Unit for distributed loads                                                                        |
| dlAreaUnit     | string           | `"kPa"`           | (defaults to `"kPa"`) Unit for area distributed loads (i.e. the thing multiplied by the load width to get the magnitude) |
| column         | boolean          | `false`           | (defaults to `false`) Whether to plot diagram vertically, adjusting text locations appropriately                         |
| wall           | number           | `0`               | (defaults to `0`) Height of the wall to display                                                                          |
| openings       | nx6 array        | `[]`              | (defaults to `[]`) Format: `[["label", type, startY, heightY, startX, endX], ...]`                                       |

## Support Data Formats

### Traditional r Widget Format

When using the traditional `r` widget for supports:

<CodeBlock title="Traditional Support Format">
  ```javascript theme={null}
  r: [
      [0, 1, 1, 0],     // [location, Rx_restrained, Ry_restrained, Mz_restrained]
      [5000, 0, 1, 0],  // Pin support at 5m
      [10000, 1, 1, 1]  // Fixed support at 10m
  ]
  ```
</CodeBlock>

### Solver Support Format (rDict)

When using solver-generated support data:

<CodeBlock title="Solver Support Format">
  ```javascript theme={null}
  rDict: [
      {
          x: 0,
          type: "fixed",
          Rx: true,
          Ry: true,
          Mz: true
      },
      {
          x: 5000,
          type: "pin",
          Rx: false,
          Ry: true,
          Mz: false
      }
  ]
  ```
</CodeBlock>

## Load Data Formats

### Point Loads (PL)

<CodeBlock title="Point Loads Format">
  ```javascript theme={null}
  PL: [
      {
          x: 2500,       // Location along beam (mm)
          P: 150,        // Load magnitude (kN)
          label: "Dead Load",
          type: "dead"   // Load type for color coding
      }
  ]
  ```
</CodeBlock>

### Distributed Loads (DL)

<CodeBlock title="Distributed Loads Format">
  ```javascript theme={null}
  xData: [0, 1000, 2000, 3000, 4000, 5000],
  DL: [0, 5, 5, 8, 8, 0]  // Load values at each x coordinate
  ```
</CodeBlock>

### Area Distributed Loads

For loads applied over an area (like floor loads):

<CodeBlock title="Area Load Example">
  ```javascript theme={null}
  {
      DL: area_load_intensity,     // Load per unit area (kPa)
      dlAreaUnit: "kPa",
      loadWidth: beam_tributary_width  // Width over which load is applied
  }
  ```
</CodeBlock>

## Openings in Walls

For wall applications, you can specify openings:

<CodeBlock title="Wall Openings Format">
  ```javascript theme={null}
  openings: [
      ["Window 1", "window", 1000, 1200, 2000, 4000],  // [label, type, startY, height, startX, endX]
      ["Door 1", "door", 0, 2100, 6000, 7500]
  ]
  ```
</CodeBlock>

## Example Implementation

<CodeBlock title="Complete Load & Support Diagram">
  ```json theme={null}
  {
      "type": "sheetTemplateWidgets",
      "attributes": {
          "type": "diagram",
          "diagram": [
              {
                  "type": "beamLoadSupport"
              }
          ],
          "equation": [
              {
                  "result": "{
                      xData: remote.plot.x,
                      rDict: remote.plot.R,
                      PL: remote.plot.PL,
                      DL: remote.plot.DL,
                      ML: remote.plot.ML,
                      lenUnit: \"m\",
                      plUnit: \"kN\",
                      dlUnit: \"kN/m\",
                      mlUnit: \"kNm\",
                      lenConvert: 0.001
                  }",
                  "condition": "@default"
              }
          ],
          "referenceId": "loads_supports",
          "label": "Loads and Supports",
          "showInSuperSummary": true
      }
  }
  ```
</CodeBlock>

## Column/Wall Configuration

For vertical members, use the column configuration:

<CodeBlock title="Vertical Member Diagram">
  ```json theme={null}
  {
      "result": "{
          xData: height_coordinates,
          PL: vertical_loads,
          DL: distributed_vertical_loads,
          rDict: support_conditions,
          column: true,
          wall: total_height,
          openings: wall_openings,
          lenUnit: \"m\",
          plUnit: \"kN\"
      }"
  }
  ```
</CodeBlock>

## Integration with Templates

### With Traditional Templates

<CodeBlock title="Traditional Template Integration">
  ```javascript theme={null}
  {
      r: x("r"),              // From support table widget
      PL: point_load_data,    // From point load table
      DL: distributed_loads,  // From distributed load calculation
      // ...
  }
  ```
</CodeBlock>

### With Solver Templates

<CodeBlock title="Solver Template Integration">
  ```javascript theme={null}
  {
      rDict: remote.plot.R,   // From beam solver
      PL: remote.plot.PL,     // From beam solver
      DL: remote.plot.DL,     // From beam solver
      // ...
  }
  ```
</CodeBlock>

## Best Practices

1. **Unfactored Loads**: This diagram shows unfactored loads - ensure you're not passing factored values
2. **Load Types**: Use consistent load type categorization (dead, live, wind, etc.)
3. **Units**: Maintain consistent units throughout the diagram
4. **Support Definition**: Choose between `r` and `rDict` based on your template architecture
5. **Color Coding**: Different load types will be automatically color-coded

<Note>
  The Load & Support Diagram is ideal for showing the initial loading condition before load combinations are applied. It provides a clear view of the structural system for engineers to verify load placement and support conditions.
</Note>

<Warning>
  Ensure that either `r` or `rDict` is provided, but not both. The diagram requires one of these parameters to properly display support conditions.
</Warning>

<Tip>
  For wall applications with openings, the diagram will automatically adjust the distributed load display to account for the openings, providing a realistic representation of load distribution.
</Tip>
