# Beam & Frame Calculator: Shear, Moment, Deflection (`jumblemog/beam-calculator`) Actor

Structural analysis of beams, 2D frames and trusses: reactions, shear and bending moment diagrams, deflection, axial force, stress and L/360 checks. Plain-text loads and supports, SI or US units, PNG/SVG diagrams, CSV. For AI agents.

- **URL**: https://apify.com/jumblemog/beam-calculator.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** AI, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Beam & Frame Calculator: Shear, Moment, Deflection

**Analyze beams, 2D frames and trusses in one call, written the way an engineer says them.** Describe a beam in plain text, such as `6 m`, `pin at 0`, `roller at 6 m`, `20 kN at 2 m` and `5 kN/m`. Or give a frame or truss as nodes, members and loads in JSON. Each structure comes back with:

- **Support reactions.**
- **Shear force, bending moment, axial force, deflection and rotation** along every member.
- **The largest values** and where they occur.
- **A bending stress check** against the material's strength.
- **A deflection check** against a span limit such as **L/360**.
- **Diagrams** as PNG and SVG, the full data as **CSV**, a **Markdown** report and **JSON**.

The calculator reads **SI and US units** (`kN`, `kN/m`, `kNm`, `mm`, `MPa`, `kip`, `plf`, `kip-ft`, `in`, `ksi`), common **sections** (I-beams, channels, rectangles, tubes, boxes, `2x10` lumber, or your own I and A) and **materials** (S355, A992, aluminum 6061, C24 timber, Douglas fir, concrete and more). It also handles **internal hinges**, **overhangs**, **continuous beams**, **linearly varying loads**, **applied moments** and **self-weight**.

It's made for engineering students checking homework, builders and DIYers sizing a joist or a lintel, engineers who want a quick independent check, developers who need a beam solver behind an API, and AI agents that should compute a structure instead of guessing at it.

![Diagrams from this Actor for an 8 m steel I-beam on a pin and a roller at 6 m, with a 12 kN/m load, 30 kN at 2.5 m and 20 kN at the overhang's tip: the loads and reactions (42.83 kN and 103.2 kN), the shear diagram (-59.17 kN largest), the bending moment diagram (69.58 kN·m sagging, -64 kN·m over the support) and the deflection curve (11.43 mm down in the span, 1.005 mm up on the overhang)](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/beam-calculator-example.png?signature=1RHRSL9VDGJf2b34IjDLx)

### What it does

- **Beams**:
  - **Supports**: simply supported, cantilever, fixed at both ends, propped cantilever, or any mix of pins, rollers and fixed supports at any position. A beam on three or more supports is a continuous beam.
  - **Loads**: point loads, uniform loads over the whole beam or part of it, triangular and trapezoidal loads, applied moments, and axial loads.
  - **Hinges** inside the beam, for Gerber beams.
- **Frames and trusses**:
  - Nodes at any x and y, with supports: pin, roller, fixed or guided.
  - Members with their own section and material, rigid or pinned at either end.
  - Loads on nodes (forces and moments) and loads along members, in global or member axes.
  - Set `truss: true` and every member is pin-ended, so it carries axial force only.
- **Results**:
  - Reactions at each support.
  - The largest shear, sagging and hogging moments, deflection or displacement, rotation, tension and compression, each with where it occurs.
  - The stress use of each member: stress over strength.
  - Deflection per span against your limit, with cantilevers checked at twice their length.
  - For frames, a table of members.
- **Diagrams**:
  - For a beam, four panels on one axis: the loads and reactions, shear, moment and deflection.
  - For a frame, the deformed shape and the moment drawn on the tension side, at true proportions. A truss gets its axial forces, colored by tension or compression, in place of the moment.
- **Clear errors**: an unstable layout (one support, a hinge that makes a mechanism, a truss panel without a diagonal) is reported with what to add, and isn't billed.
- **Batches**: up to 100 structures per run. Shared section, material and units apply to every entry that doesn't set its own.

### Who it's for

- **Students** of statics, mechanics of materials and structural analysis, to check hand calculations and see the diagrams.
- **Builders, carpenters and DIYers** sizing a deck joist, header or shelf, with US lumber sizes and loads in plf.
- **Engineers** who want a quick independent check of a beam or a small frame, in a report they can paste anywhere.
- **Developers** of calculators, estimating tools and educational apps that need a structural solver behind an API.
- **AI agents** asked "what size beam do I need" or "draw the shear and moment diagram": one call returns exact numbers and a picture.

### How to use it

1. Set the **Beam length**, such as `6 m` or `20 ft`.
2. Add **Supports**: `simply supported`, `cantilever`, or lines such as `pin at 0` and `roller at 6 m`.
3. Add **Loads**, one per line: `20 kN at 2 m`, `5 kN/m`, `0 to 8 kN/m from 0 to 6 m`, `4 kNm clockwise at 3 m`.
4. Pick the **Cross-section** and **Material** (or keep the default steel I-beam).
5. Click **Start**. Open the diagram and the report from the results table.

For a frame or truss, fill **Frame or truss (JSON)** instead of the beam fields.

### Examples

All three below ran on this Actor; the numbers are from the results.

**A steel beam with an overhang** (the picture above): 8 m, `pin at 0`, `roller at 6 m`, loads `12 kN/m`, `30 kN at 2.5 m` and `20 kN at 8 m`, section `I 300 x 150 x 10.7 x 7.1 mm`, material `S355`.

> Reactions: pin at 0 m: 42.83 kN up; roller at 6 m: 103.2 kN up. Largest moment: 69.58 kN·m at x = 2.5 m and -64 kN·m at x = 6 m. Largest shear: 59.17 kN at x = 6 m. Largest deflection: 11.43 mm down at x = 2.66 m. Bending stress uses 37% of the material's strength. Deflection L/525 (within L/360).

**A wood deck joist** in US units: `14 ft`, `simply supported`, `80 plf`, section `2x10`, material `douglas fir`, with self-weight.

> Reactions: pin at 0 ft: 0.5823 kip up; roller at 14 ft: 0.5823 kip up. Largest moment: 2.038 kip·ft at x = 7 ft. Largest shear: 0.5823 kip at x = 14 ft. Largest deflection: 0.4556 in down at x = 7 ft. Bending stress uses 127% of the material's strength (over it). Deflection L/369 (within L/360).

The 127% compares the stress with the reference bending value of No. 2 Douglas fir (900 psi), before the size and repetitive-member factors a design code would apply. That's why the stress check is a screen, not a design check.

**A portal frame** with fixed bases, 4 m tall and 6 m wide, with 10 kN of wind at the top left and 8 kN/m on the roof beam:

```json
{
  "nodes": [
    {"id": "A", "x": 0, "y": 0, "support": "fixed"},
    {"id": "B", "x": 0, "y": 4},
    {"id": "C", "x": 6, "y": 4},
    {"id": "D", "x": 6, "y": 0, "support": "fixed"}
  ],
  "members": [
    {"id": "1", "from": "A", "to": "B"},
    {"id": "2", "from": "B", "to": "C"},
    {"id": "3", "from": "C", "to": "D"}
  ],
  "loads": [{"node": "B", "fx": 10}, {"member": "2", "w": -8}]
}
```

> Reactions: fixed at A: 21.34 kN up, 1.706 kN right, 3.138 kN·m counterclockwise; fixed at D: 26.66 kN up, 11.71 kN left, 20.88 kN·m counterclockwise. Largest moment: 20.88 kN·m in member 3 and -25.94 kN·m in member 3. Largest shear: 26.66 kN in member 2. Largest displacement: 4.202 mm at (2.791 m, 4 m). Largest compression: 26.66 kN in member 3. The most stressed member uses 15% of the material's strength.

### How-to examples

These are the examples under **Examples** above, written as complete inputs; the result lines are from their runs.

#### How to calculate beam reactions, shear and bending moment

```json
{"length": "8 m", "supports": ["pin at 0", "roller at 6 m"], "loads": ["12 kN/m", "30 kN at 2.5 m", "20 kN at 8 m"],
 "section": "I 300 x 150 x 10.7 x 7.1 mm", "material": "S355"}
```

Result: "Reactions: pin at 0 m: 42.83 kN up; roller at 6 m: 103.2 kN up. Largest moment: 69.58 kN·m at x = 2.5 m and -64 kN·m at x = 6 m. Largest shear: 59.17 kN at x = 6 m. Largest deflection: 11.43 mm down at x = 2.66 m..." with shear, moment and deflection diagrams.

#### How to check the deflection of a wood joist

```json
{"length": "14 ft", "supports": ["simply supported"], "loads": ["80 plf"], "section": "2x10", "material": "douglas fir", "selfWeight": true}
```

Result: "Largest moment: 2.038 kip·ft at x = 7 ft... Largest deflection: 0.4556 in down at x = 7 ft... Deflection L/369 (within L/360)." The stress line compares the stress with the wood's reference bending value, before design-code factors, so treat it as a screen.

#### How to analyze a 2D portal frame or truss

Give nodes, members and loads in `frame`, as in the portal frame example above (fixed bases, 4 m by 6 m, 10 kN of wind and 8 kN/m on the roof). Result: "Reactions: fixed at A: 21.34 kN up, 1.706 kN right, 3.138 kN·m counterclockwise; fixed at D: 26.66 kN up, 11.71 kN left, 20.88 kN·m counterclockwise..." with each member's forces and the largest displacement.

#### How to let an AI agent check a beam

Add this Actor to the [Apify MCP server](https://mcp.apify.com) with `https://mcp.apify.com/?tools=jumblemog/beam-calculator`. The agent writes supports and loads the way an engineer says them ("pin at 0", "20 kN at 2 m") and passes on the reactions, moments and deflection instead of working them out by hand.

### FAQ

**What can it analyze?** Beams with any supports, overhangs and hinges, continuous beams, 2D frames and trusses, with point loads, distributed and varying loads, and moments.

**Which units does it use?** Metric or US. Each value can carry its unit (`kN/m`, `plf`, `ft`), or set `units`.

**Which sections and materials does it know?** I-beams, channels, rectangles, tubes and boxes by their dimensions, `2x10` style lumber, or your own I and A, with materials such as S355, A992, aluminum 6061, C24 timber, Douglas fir and concrete.

**Is it a design check?** No. It gives the analysis and a stress and deflection screen. Code checks need the factors of your design code; see the steel and wood member calculators for those.

**Does it work with Zapier, Make or n8n?** Yes. Call the Actor with its Apify app or an HTTP request and pass the results on.

### Input

| Field | What it is |
|---|---|
| `length` | The beam's length with a unit: `6 m`, `4500 mm`, `20 ft`. |
| `supports` | `simply supported` (default), `cantilever`, `fixed both ends`, `propped cantilever`, or lines like `pin at 0`, `roller at 6 m`, `fixed at end`, `roller at L/2`. |
| `loads` | One per line, downward unless it says `up`. Examples: `10 kN at 3 m`, `5 kN/m`, `5 kN/m from 1 to 4 m`, `2 to 8 kN/m from 0 to 6 m`, `4 kNm clockwise at 2 m`, `15 kN horizontal at end`. Positions can be `mid`, `end`, `L/3`. |
| `hinges` | Internal hinges: `at 4 m`. |
| `section` | `rectangle 100 x 200 mm` (width x depth), `square 50 mm`, `circle 40 mm`, `tube 60.3 x 4 mm`, `box 100 x 50 x 5 mm`, `I 300 x 150 x 10.7 x 7.1 mm` (depth x width x flange x web), `channel ...`, `2x10`, or `I = 8360 cm4, A = 53.8 cm2, depth = 300 mm`. |
| `material` | `steel`, `S235`/`S275`/`S355`, `A36`, `A992`, `A500`, `stainless`, `aluminum`/`6061`/`6063`, `timber`, `C16`, `C24`, `glulam`, `douglas fir`, `spf`, `southern pine`, `concrete`, `titanium`, `copper`, `pvc`, `plywood`, or `E = 200 GPa, fy = 355 MPa`. |
| `selfWeight` | Add the member's own weight (default false). |
| `deflectionLimit` | The span limit as L/n: 360 (default), 240, 180... |
| `units` | `auto` (default), `SI` or `US`. Sets the unit of bare numbers and of the results. |
| `frame` | A frame or truss: `nodes` (`id`, `x`, `y`, `support`), `members` (`id`, `from`, `to`, optional `section`, `material`, `release`: `start`, `end` or `both`), `loads` (`{"node", "fx", "fy", "moment"}` or `{"member", "w", "w2", "wx", "wLocal", "from", "to"}`), optional `truss`, `section`, `material`, `selfWeight`. Coordinates in m (ft in US units), y up. Loads are in global axes, so downward is negative. |
| `structures` | Several structures in one run: a list of objects with the fields above. |
| `title` | A title for the results and files. |
| `dataPoints` | Diagram points included in each result (default 200). The CSV has them all. |

Sign conventions: upward and rightward forces and counterclockwise moments are positive in reactions and frame loads. A beam's applied moment is `clockwise` unless it says `counterclockwise`. Positive bending moment is sagging (tension at the bottom), positive shear follows the moment's slope, and axial force is positive in tension.

### Output

One dataset item per structure, also saved together in the run's `OUTPUT` record (shortened):

```json
{
  "title": "Steel floor beam with an overhang",
  "status": "solved",
  "kind": "beam",
  "units": "SI",
  "unitLabels": {"length": "m", "force": "kN", "moment": "kN·m", "line": "kN/m", "stress": "MPa", "deflection": "mm"},
  "section": {"name": "I-section I 300 x 150 x 10.7 x 7.1 mm (depth x width x flange x web)", "area": 5188.1, "inertia": 79990000.0, "modulus": 533270.0},
  "material": {"name": "Steel S355", "E": 210000.0, "strength": 355.0},
  "reactions": [
    {"node": "x=0", "x": 0.0, "y": 0.0, "support": "pin", "fx": 0.0, "fy": 42.833, "moment": 0.0},
    {"node": "x=6", "x": 6.0, "y": 0.0, "support": "roller", "fx": 0.0, "fy": 103.17, "moment": 0.0}
  ],
  "maxima": {
    "shear": {"value": -59.167, "x": 6.0},
    "momentPositive": {"value": 69.583, "x": 2.5},
    "momentNegative": {"value": -64.0, "x": 6.0},
    "rotation": {"value": -0.0067432, "x": 0.0},
    "deflection": {"value": -11.429, "x": 2.66}
  },
  "checks": {
    "deflectionLimit": "L/360",
    "spans": [
      {"from": 0.0, "to": 6.0, "cantilever": false, "deflection": -11.429, "at": 2.66, "allowed": 16.667, "ratio": "L/525", "ok": true},
      {"from": 6.0, "to": 8.0, "cantilever": true, "deflection": 1.0054, "at": 6.92, "allowed": 11.111, "ratio": "L/3979", "ok": true}
    ],
    "bendingStressOk": true, "deflectionOk": true, "maxUtilization": 0.3676
  },
  "diagram": [{"x": 0.0, "shear": 42.833, "moment": 0.0, "deflection": 0.0, "rotation": -0.0067432}, "..."],
  "equilibriumError": 4.79e-09,
  "summary": "Reactions: pin at 0 m: 42.83 kN up; roller at 6 m: 103.2 kN up. Largest moment: 69.58 kN·m at x = 2.5 m ...",
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/structure-001-Steel-floor-beam-with-an-overhang.png",
  "svgUrl": "...", "csvUrl": "...", "markdownUrl": "...", "jsonUrl": "...",
  "report": "# Steel floor beam with an overhang\n\n...",
  "notes": []
}
```

Frames also have `members`: each member's length, largest moment and shear, axial force, deflection, stress and use. In frames, `maxima` has `displacement`, `axialTension` and `axialCompression`, and each place is given as member, distance along it and x, y. A structure that can't be solved has `"status": "failed"` and the reason in `error`, and isn't billed.

### How it works

1. The text is read into numbers in SI units: lengths, forces, line loads and moments with their units, positions like `mid` or `L/3`, and sections and materials from built-in tables.
2. The structure becomes a 2D frame model: beam nodes at supports, hinges and load ends, members with Euler-Bernoulli bending and axial stiffness. Each member is cut into short elements, about 400 for a beam, so the diagrams are smooth.
3. Distributed loads become consistent nodal loads, and the stiffness matrix is solved with NumPy. A hinge gets its own rotation, and a structure that can move freely is caught from the stiffness matrix's condition number before solving.
4. Shear, moment and axial force come from each element's end forces. The displacements are exact at every element end, and the reactions are checked against the loads (`equilibriumError`).
5. The diagrams are drawn with Vega-Lite and rendered to PNG and SVG with vl-convert.

### Pricing

You pay per **structure analyzed**, at the price shown on this page, with every file included. Structures that can't be solved are never charged. If you set a maximum cost per run, the Actor stops before a structure that wouldn't fit.

### Speed

A beam or a small frame solves in well under a second. A large frame of a few hundred members takes a few seconds. A run through the API answers in about 5 to 10 seconds, including the cloud container starting and the files being saved.

### Tips and limits

- **This is an elastic analysis, not a design-code check.** It doesn't check buckling of columns or compression members, lateral-torsional buckling, shear, bearing, vibration or connections. It applies no load factors or combinations. Have a qualified engineer design anything people rely on.
- **The stress check** compares the largest bending plus axial stress with the material's yield strength for metals, or its reference bending value for timber, without code factors. Concrete has no strength value, because a cracked section needs a real design.
- **Small deflections** are assumed. When a displacement passes 1/50 of the structure's size, a note says the numbers are a sign of overload rather than accurate values.
- **Point loads on frame members** aren't supported. Add a node where the load acts and split the member there.
- **Units**: a bare number takes the system's default unit (m, kN, kN/m, kN·m in SI; ft, kip, kip/ft, kip·ft in US). With `auto`, US is picked when most of the units you write are US units.
- **Limits**: beams up to 1000 m, frames up to 300 nodes and 500 members, 100 structures per run.

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool: pass `length`, `supports` and `loads` as text (or a `frame`), and read `summary`, `reactions`, `maxima`, `checks` and `imageUrl` from the result. A direct API call that waits for the answer:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~beam-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"length": "6 m", "supports": ["pin at 0", "roller at 6 m"], "loads": ["5 kN/m", "20 kN at 2 m"], "section": "I 300 x 150 x 10.7 x 7.1 mm", "material": "S355"}'
```

`run-sync` instead returns the run's `OUTPUT`: the status, how many structures were solved and every result as JSON.

In Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/beam-calculator").call(run_input={
    "units": "US",
    "structures": [
        {"title": "Deck joist", "length": "14 ft", "loads": ["80 plf"], "section": "2x10", "material": "douglas fir"},
        {"title": "Header", "length": "8 ft", "loads": ["450 plf"], "section": "rectangle 3.5 x 9.25 in", "material": "douglas fir"},
    ],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["summary"], item["imageUrl"])
```

### Credits

- Solving: [NumPy](https://numpy.org) (BSD-3-Clause).
- Diagrams: [Vega-Lite](https://vega.github.io/vega-lite/) and [vl-convert](https://github.com/vega/vl-convert) (BSD-3-Clause), with the [Inter](https://rsms.me/inter/) font (SIL Open Font License).

# Actor input Schema

## `length` (type: `string`):

The beam's length with a unit, such as 6 m, 4500 mm or 20 ft. A bare number uses metres (or feet when the other inputs are in US units).

## `supports` (type: `array`):

Where the beam is held: 'simply supported', 'cantilever' (fixed at the left), 'fixed both ends', 'propped cantilever', or one line per support such as 'pin at 0', 'roller at 6 m', 'fixed at 0', 'roller at L/2', 'roller at end'. Default: simply supported.

## `loads` (type: `array`):

One load per line, downward unless it says up: point loads ('10 kN at 3 m', '2 kip at mid'), uniform loads over the whole beam ('5 kN/m', '200 lb/ft') or part of it ('5 kN/m from 1 to 4 m'), linearly varying loads ('0 to 8 kN/m from 0 to 6 m'), applied moments ('4 kNm clockwise at 2 m') and axial loads ('15 kN horizontal at end').

## `hinges` (type: `array`):

Positions of internal hinges (no moment carried), such as 'at 4 m', for Gerber beams.

## `section` (type: `string`):

The beam's section: 'rectangle 100 x 200 mm' (width x depth), 'square 50 mm', 'circle 40 mm', 'tube 60.3 x 4 mm' (diameter x wall), 'box 100 x 50 x 5 mm', 'I 300 x 150 x 10.7 x 7.1 mm' (depth x width x flange x web), 'channel ...', nominal lumber '2x10', or its properties 'I = 8360 cm4, A = 53.8 cm2, depth = 300 mm'. Default: a 300 mm steel I-beam (12 in in US units).

## `material` (type: `string`):

steel, S235, S275, S355, A36, A992, A500, stainless, aluminum (6061, 6063), timber, C16, C24, glulam, douglas fir, spf, southern pine, concrete, titanium, copper, pvc, plywood, or 'E = 200 GPa, fy = 355 MPa'. The strength is used for the stress check. Default: steel.

## `selfWeight` (type: `boolean`):

Add the member's own weight (from the section area and the material's density) as a downward load.

## `deflectionLimit` (type: `integer`):

Each span's deflection is checked against span / this number (cantilevers: twice their length / this number). 360 is typical for floors, 240 for roofs, 180 for cantilevers.

## `units` (type: `string`):

Units for bare numbers and for the results. Automatic picks US when most units written are US units.

## `frame` (type: `object`):

A 2D frame or truss instead of a beam: {"nodes": \[{"id": "A", "x": 0, "y": 0, "support": "fixed"}, ...], "members": \[{"id": "1", "from": "A", "to": "B", "section": "...", "material": "...", "release": "start|end|both"}], "loads": \[{"node": "B", "fx": 10, "fy": -20, "moment": 5}, {"member": "2", "w": -8, "w2": -4, "from": 0, "to": 3}, {"member": "3", "wLocal": -2}], "truss": true}. Coordinates in metres (feet in US units), y up; loads in global axes, so downward is negative; supports pin, roller, roller-x, fixed, guided. Example: {"nodes": \[{"id": "A", "x": 0, "y": 0, "support": "fixed"}, {"id": "B", "x": 0, "y": 4}, {"id": "C", "x": 6, "y": 4}, {"id": "D", "x": 6, "y": 0, "support": "pin"}], "members": \[{"id": "1", "from": "A", "to": "B"}, {"id": "2", "from": "B", "to": "C"}, {"id": "3", "from": "C", "to": "D"}], "loads": \[{"node": "B", "fx": 10}, {"member": "2", "w": -8}]}

## `structures` (type: `array`):

A list of structures to analyze in one run, each an object with the fields above (length, supports, loads, ... or frame, plus title). Fields set outside the list (section, material, units, deflectionLimit, selfWeight) apply to every entry that doesn't set its own.

## `title` (type: `string`):

A title for the results and files. Empty: one made from the supports and length.

## `dataPoints` (type: `integer`):

How many points of the shear, moment and deflection diagrams to include in each result's diagram field. The CSV file always has every computed point.

## Actor input object example

```json
{
  "length": "6 m",
  "supports": [
    "simply supported"
  ],
  "loads": [
    "5 kN/m",
    "20 kN at 2 m"
  ],
  "section": "I 300 x 150 x 10.7 x 7.1 mm",
  "material": "S355",
  "selfWeight": false,
  "deflectionLimit": 360,
  "units": "auto",
  "dataPoints": 200
}
```

# Actor output Schema

## `results` (type: `string`):

One row per structure: the diagram, the summary and the files.

## `reactions` (type: `string`):

Every support reaction.

## `output` (type: `string`):

The OUTPUT record: every structure in one JSON object.

## `files` (type: `string`):

Diagrams (PNG, SVG), CSV, Markdown and JSON in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "length": "6 m",
    "supports": [
        "simply supported"
    ],
    "loads": [
        "5 kN/m",
        "20 kN at 2 m"
    ],
    "section": "I 300 x 150 x 10.7 x 7.1 mm",
    "material": "S355"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/beam-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "length": "6 m",
    "supports": ["simply supported"],
    "loads": [
        "5 kN/m",
        "20 kN at 2 m",
    ],
    "section": "I 300 x 150 x 10.7 x 7.1 mm",
    "material": "S355",
}

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/beam-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "length": "6 m",
  "supports": [
    "simply supported"
  ],
  "loads": [
    "5 kN/m",
    "20 kN at 2 m"
  ],
  "section": "I 300 x 150 x 10.7 x 7.1 mm",
  "material": "S355"
}' |
apify call jumblemog/beam-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/beam-calculator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WwbDvnhquIqMSbrJq/builds/DccO0c51nlY3FMjbI/openapi.json
