Appearance
WASM API Reference
A narrative guide to the 57 WASM exports it covers, out of the 167 the Rust boundary exposes.
Each function takes a JSON string argument and returns a JSON string.
Units are SI throughout (m, N, Pa, N·m) unless explicitly noted.
This page is a guide, not the whole boundary. The complete reference is WASM exports: every one of the 167 exports, its signature, and the fields of the JSON it reads and returns, with each type on WASM types. Those pages are generated from the Rust source and its types by
npm run docs:wasmand checked in CI, so they cannot fall behind the code; this page is written by hand and can. Where the two disagree, the generated pages are right. Both numbers above are checked against the manifest byscripts/gen_wasm_manifest.mjs.
Table of Contents
- Units & Conventions
- Common Types
- Solver / Analysis
- Results / Reports
- Steel Design (AS 4100)
- Steel Design (AS 5100)
- Steel Design (AISC 360)
- Steel Design (Eurocode 3)
- Steel Design (AS 4600)
- Timber (AS 1720)
- Concrete (AS 3600)
- Concrete Slabs (AS 3600)
- Composite (AS 2327)
- Pad Footing
- Retaining Wall
- Seismic
- Time History
- Influence Lines
- Load Generation
- Connections
- Section Properties
- Import / Export
- Merge (Phase 4)
Units & Conventions
| Quantity | Unit | Notes |
|---|---|---|
| Length | m | Some concrete/steel design modules convert to mm internally. |
| Force | N | |
| Stress | Pa | Concrete design modules convert to MPa internally. |
| Moment | N·m | |
| Area | m² | |
| Mass | kg | Node mass field. |
| Angle | rad | beta, rotations. |
| Time | s | Modal / time-history only. |
Internal scaling notes:
pad_footing_design: b/d/h in m → mm internally, fPrimeC Pa → MPa internally.retaining_wall_design: gammaSoil/gammaConc in N/m³, qAllowable in Pa. Core converts footing dimensions m→mm, fPrimeC Pa→MPa.rc_shear_torsion_combined: vStar [N], tStar [N·m] (converted to N·mm internally), b/d/h [m], fPrimeC [Pa], aSt [m²].- Concrete beam/column/slab exports: dimensions m→mm, stress Pa→MPa, steel area m²→mm²; moments returned in N·m.
- Connection exports (
fin_plate_check,end_plate_check,base_plate_check): lengths m→mm, stresses Pa→MPa internally; capacities returned as forces (N) or moments (N·m). aisc360_member_check&ec3_member_check: SI inputs converted to mm/MPa internally; capacities returned in N / N·m.as5100_member_check: section geometry in mm, material in MPa, effective lengths in m; capacities returned in N / N·m.
Common Types
Many exports share the following input/output structs.
WasmModel
Standard FEM model definition used by solver exports.
json
{
"nodes": [WasmNode],
"members": [WasmMember],
"materials": [WasmMaterial],
"sections": [WasmSection],
"load_cases": [WasmLoadCase],
"nodal_loads": [WasmNodalLoad],
"member_loads": [WasmMemberLoad],
"plates": [WasmPlate],
"plate_loads": [WasmPlateLoad],
"load_combinations": [WasmLoadCombination]
}| Field | Type | Description |
|---|---|---|
nodes | [WasmNode] | Structural nodes. |
members | [WasmMember] | 1D members (beams / trusses). |
materials | [WasmMaterial] | Linear-elastic material definitions. |
sections | [WasmSection] | Cross-section properties. |
load_cases | [WasmLoadCase] | Load case definitions. |
nodal_loads | [WasmNodalLoad] | Concentrated nodal loads. |
member_loads | [WasmMemberLoad] | Distributed / point member loads. |
plates | [WasmPlate] | Quad shell elements (optional). |
plate_loads | [WasmPlateLoad] | Pressure loads on plates (optional). |
load_combinations | [WasmLoadCombination] | Linear combination definitions (optional). |
WasmNode
json
{
"id": 1,
"x": 0.0,
"y": 0.0,
"z": 0.0,
"restraint_flags": 63,
"mass": 0.0,
"spring_stiffness": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"settlement": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique node identifier. |
x / y / z | f64 | Global coordinates (m). |
restraint_flags | u32 | Bit mask: Tx(1) Ty(2) Tz(4) Rx(8) Ry(16) Rz(32). |
mass | f64 | Lumped nodal mass (kg). Default 0. |
spring_stiffness | [f64; 6] | Ground spring stiffness per DOF (N/m or N·m/rad). Default all 0. |
settlement | [f64; 6] | Prescribed support settlement per DOF. Default all 0. |
WasmMember
json
{
"id": 1,
"node_a": 1,
"node_b": 2,
"material_id": 1,
"section_id": 1,
"member_type": 0,
"beta": 0.0,
"fixity_a": 0,
"fixity_b": 0,
"offset_a": [0.0, 0.0, 0.0],
"offset_b": [0.0, 0.0, 0.0],
"ke_x": 1.0,
"ke_y": 1.0
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique member identifier. |
node_a / node_b | i32 | End-node IDs. |
material_id | i32 | Reference to WasmMaterial.id. |
section_id | i32 | Reference to WasmSection.id. |
member_type | i32 | 0=Beam, 1=Truss, 4=TensionOnly, 5=CompressionOnly. |
beta | f64 | Roll angle about local x-axis (rad). |
fixity_a / fixity_b | u32 | End-release bit mask (same bits as restraint_flags). Default 0. |
offset_a / offset_b | [f64; 3] | Rigid end offsets in global coordinates (m). Default all 0. |
ke_x | f64 | Effective-length factor for major-axis buckling / LTB. Default 1.0. |
ke_y | f64 | Effective-length factor for minor-axis compression buckling. Default 1.0. |
WasmMaterial
json
{
"id": 1,
"name": "Steel",
"e": 200e9,
"g": 80e9,
"nu": 0.3,
"rho": 7850.0,
"alpha": 1.2e-5,
"fy": 250e6,
"fu": 400e6
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique material identifier. |
name | String | Human-readable name. Default "". |
e | f64 | Young's modulus (Pa). |
g | f64 | Shear modulus (Pa). |
nu | f64 | Poisson's ratio. Default 0.3. |
rho | f64 | Density (kg/m³). Default 7850. |
alpha | f64 | Thermal expansion coefficient (/°C). Default 1.2e-5. |
fy | f64 | Yield strength (Pa). Default 250e6. |
fu | f64 | Ultimate strength (Pa). Default 400e6. |
WasmSection
json
{
"id": 1,
"a": 0.01,
"iyy": 1e-4,
"izz": 1e-4,
"j": 2e-4,
"zyy": 0.0,
"zzz": 0.0,
"syy": 0.0,
"szz": 0.0,
"d": 0.0,
"bf": 0.0,
"tf": 0.0,
"tw": 0.0,
"fy": 0.0,
"name": ""
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique section identifier. |
a | f64 | Cross-sectional area (m²). |
iyy | f64 | Minor-axis second moment of area (m⁴). |
izz | f64 | Major-axis second moment of area (m⁴). |
j | f64 | Torsion constant (m⁴). |
zyy / zzz | f64 | Elastic section moduli (m³). Default 0. |
syy / szz | f64 | Plastic section moduli (m³). Default 0. |
d / bf / tf / tw | f64 | Section geometry for steel design (m). Default 0. |
fy | f64 | Section-specific yield strength override (Pa). Default 0 (use material). |
name | String | Section name. Default "". |
WasmLoadCase
json
{
"id": 1,
"name": "Dead",
"self_weight_factor": 0.0,
"load_case_type": 0
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique load-case identifier. |
name | String | Human-readable name. |
self_weight_factor | f64 | Self-weight multiplier. Default 0. |
load_case_type | i32 | 0=Dead, 1=Live, 2=Wind, 3=Seismic, 4=Snow, 5=Other, 6=WindUltimate, 7=WindServiceability, 8=SeismicServiceability. Default 0. |
WasmNodalLoad
json
{
"node_id": 1,
"load_case_id": 1,
"fx": 0.0,
"fy": 0.0,
"fz": -1000.0,
"mx": 0.0,
"my": 0.0,
"mz": 0.0
}| Field | Type | Description |
|---|---|---|
node_id | i32 | Target node. |
load_case_id | i32 | Load case. |
fx / fy / fz | f64 | Force components (N). |
mx / my / mz | f64 | Moment components (N·m). Default 0. |
WasmMemberLoad
json
{
"member_id": 1,
"load_case_id": 1,
"load_type": 0,
"qx": 0.0,
"qy": 0.0,
"qz": -5000.0,
"qx2": 0.0,
"qy2": 0.0,
"qz2": 0.0,
"start_ratio": 0.0,
"end_ratio": 1.0
}| Field | Type | Description |
|---|---|---|
member_id | i32 | Target member. |
load_case_id | i32 | Load case. |
load_type | i32 | 0=UniformDistributed, 1=PointLoad, 2=Trapezoidal. Default 0. |
qx / qy / qz | f64 | Start / uniform load intensities (N/m). |
qx2 / qy2 / qz2 | f64 | End load intensities for trapezoidal (N/m). Default 0. |
start_ratio | f64 | Normalised start position along member [0, 1]. Default 0. |
end_ratio | f64 | Normalised end position. For UDL, if <= start_ratio it defaults to 1.0 (whole member). Default 0. |
WasmPlate
json
{
"id": 1,
"node_ids": [1, 2, 3, 4],
"material_id": 1,
"thickness": 0.01
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique plate identifier. |
node_ids | [i32; 4] | Corner node IDs (quad only). |
material_id | i32 | Reference to WasmMaterial.id. |
thickness | f64 | Plate thickness (m). |
WasmPlateLoad
json
{
"plate_id": 1,
"load_case_id": 1,
"pressure": -5000.0
}| Field | Type | Description |
|---|---|---|
plate_id | i32 | Target plate. |
load_case_id | i32 | Load case. |
pressure | f64 | Normal pressure (Pa, positive = toward plate local -Z). |
WasmLoadCombination
json
{
"id": 101,
"name": "1.2D+1.5L",
"terms": [
{ "load_case_id": 1, "factor": 1.2 },
{ "load_case_id": 2, "factor": 1.5 }
]
}| Field | Type | Description |
|---|---|---|
id | i32 | Unique combination identifier. |
name | String | Human-readable name. |
terms | [WasmComboTerm] | Constituent load cases and factors. |
WasmComboTerm
| Field | Type | Description |
|---|---|---|
load_case_id | i32 | Load case to factor. |
factor | f64 | Load factor. |
WasmResults
Top-level results returned by solve_model and related solver exports.
json
{
"load_cases": [WasmLoadCaseResults],
"combinations": [WasmCombinationResults],
"envelope": WasmEnvelopeResults | null
}| Field | Type | Description |
|---|---|---|
load_cases | [WasmLoadCaseResults] | Per load-case results. |
combinations | [WasmCombinationResults] | Per combination results (empty if none defined). |
envelope | WasmEnvelopeResults | null | Max/min envelopes over combinations (null if none). |
WasmLoadCaseResults
json
{
"load_case_id": 1,
"displacements": [WasmNodeDisplacement],
"member_forces": [WasmMemberForce],
"reactions": [WasmReaction],
"plate_results": [WasmPlateResult],
"member_station_forces": [WasmMemberStationForces],
"member_capacities": [WasmMemberCapacity]
}| Field | Type | Description |
|---|---|---|
load_case_id | i32 | Echo of load case ID. |
displacements | [WasmNodeDisplacement] | Nodal displacements. |
member_forces | [WasmMemberForce] | End forces for each member. |
reactions | [WasmReaction] | Support reactions. |
plate_results | [WasmPlateResult] | Plate stress / moment results. |
member_station_forces | [WasmMemberStationForces] | Internal forces at stations along each member. |
member_capacities | [WasmMemberCapacity] | AS 4100 capacity check results (populated when steel design is enabled). |
WasmNodeDisplacement
| Field | Type | Description |
|---|---|---|
node_id | i32 | Node identifier. |
ux / uy / uz | f64 | Translations (m). |
rx / ry / rz | f64 | Rotations (rad). |
WasmMemberForce
| Field | Type | Description |
|---|---|---|
member_id | i32 | Member identifier. |
fx1 / fy1 / fz1 | f64 | Force at end A (N). |
mx1 / my1 / mz1 | f64 | Moment at end A (N·m). |
fx2 / fy2 / fz2 | f64 | Force at end B (N). |
mx2 / my2 / mz2 | f64 | Moment at end B (N·m). |
WasmReaction
| Field | Type | Description |
|---|---|---|
node_id | i32 | Restrained node. |
rx / ry / rz | f64 | Reaction forces (N). |
mx / my / mz | f64 | Reaction moments (N·m). |
WasmPlateResult
| Field | Type | Description |
|---|---|---|
plate_id | i32 | Plate identifier. |
sx / sy / txy | f64 | Membrane stresses at centroid (Pa). |
mx / my / mxy | f64 | Bending / twisting moments per unit width (N·m/m). |
mx_star_bottom / my_star_bottom | f64 | Design moments at bottom face (N·m/m). |
mx_star_top / my_star_top | f64 | Design moments at top face (N·m/m). |
vonMises | f64 | von Mises stress (Pa). |
bucklingFactor | f64 | null | Critical buckling load factor (if computed). |
sxTop / syTop / sxBottom / syBottom | f64 | Membrane stresses at top / bottom faces (Pa). |
sigma1Top / sigma2Top / thetaPTop | f64 | Principal stresses & angle at top face (Pa, rad). |
sigma1Bottom / sigma2Bottom / thetaPBottom | f64 | Principal stresses & angle at bottom face (Pa, rad). |
WasmMemberStationForces
| Field | Type | Description |
|---|---|---|
member_id | i32 | Member identifier. |
stations | [WasmStationForce] | Internal forces at evaluation points. |
WasmStationForce
| Field | Type | Description |
|---|---|---|
s_norm | f64 | Normalised position [0, 1] along member. |
s | f64 | Absolute distance from end A (m). |
n | f64 | Axial force (N). |
vy / vz | f64 | Shear forces (N). |
mx / my / mz | f64 | Moments (N·m). |
dy / dz | f64 | Local deflections (m). |
WasmMemberCapacity
json
{
"member_id": 1,
"fy": 300e6,
"phi": 0.9,
"axis_x": WasmAxisCapacity,
"axis_y": WasmAxisCapacity,
"compression": WasmCompressionCapacity,
"phiNt": 1200e3,
"phiVv": 450e3,
"utilBiaxialSection": 0.42,
"utilBiaxialMember": 0.38,
"utilMax": 0.42,
"assumptions": WasmCapacityAssumptions
}| Field | Type | Description |
|---|---|---|
member_id | i32 | Member identifier. |
fy | f64 | Yield strength used (Pa). |
phi | f64 | Capacity reduction factor. |
axis_x / axis_y | WasmAxisCapacity | Major / minor axis capacities. |
compression | WasmCompressionCapacity | Compression buckling capacity. |
phiNt | f64 | Tension capacity φNt (N). |
phiVv | f64 | Shear capacity φVv (N). |
utilBiaxialSection | f64 | Section-level biaxial utilisation. |
utilBiaxialMember | f64 | Member-level biaxial utilisation. |
utilMax | f64 | Maximum utilisation across all checks. |
assumptions | WasmCapacityAssumptions | Assumptions used (Le, kt, kl, kr, αm, αs, αb). |
WasmAxisCapacity
| Field | Type | Description |
|---|---|---|
compactness | WasmAxisCompactness | Section compactness classification. |
Ze | f64 | Effective section modulus (m³). |
phiMs | f64 | Section moment capacity φMs (N·m). |
phiMb | f64 | Member moment capacity φMb (N·m). |
WasmAxisCompactness
| Field | Type | Description |
|---|---|---|
flange / web | WasmPlateCompactness | Slenderness limits. |
class | String | "compact", "non-compact", "slender". |
WasmPlateCompactness
| Field | Type | Description |
|---|---|---|
lambda_e | f64 | Element slenderness. |
lambda_ep | f64 | Plastic limit. |
lambda_ey | f64 | Yield limit. |
WasmCompressionCapacity
| Field | Type | Description |
|---|---|---|
kf | f64 | Form factor. |
Ns | f64 | Squash capacity (N). |
phiNcx / phiNcy | f64 | Compression capacities about x / y (N). |
lambda_n | f64 | Modified slenderness. |
alpha_c | f64 | Member slenderness reduction factor. |
WasmCapacityAssumptions
| Field | Type | Description |
|---|---|---|
le_x / le_y | f64 | Effective lengths (m). |
kt / kl / kr | f64 | Twist / load / rotation restraint factors. |
alpha_m / alpha_s / alpha_b | f64 | Moment modification, slenderness reduction, and residual-stress factors. |
WasmCombinationResults
Same fields as WasmLoadCaseResults but with combination_id and name instead of load_case_id.
| Field | Type | Description |
|---|---|---|
combination_id | i32 | Combination identifier. |
name | String | Combination name. |
displacements | [WasmNodeDisplacement] | Combined displacements. |
member_forces | [WasmMemberForce] | Combined member end forces. |
reactions | [WasmReaction] | Combined reactions. |
WasmEnvelopeResults
| Field | Type | Description |
|---|---|---|
displacements_max / displacements_min | [WasmNodeDisplacement] | Envelope extremes. |
member_forces_max / member_forces_min | [WasmMemberForce] | Envelope extremes. |
reactions_max / reactions_min | [WasmReaction] | Envelope extremes. |
WasmBucklingResults / WasmBucklingMode
json
{
"modes": [
{ "index": 1, "load_factor": 15.3, "mode_shape": [WasmNodeDisplacement] }
]
}| Field | Type | Description |
|---|---|---|
index | usize | Mode number (1-based). |
load_factor | f64 | Buckling load factor. |
mode_shape | [WasmNodeDisplacement] | Normalised buckled shape. |
WasmModalResults / WasmModalMode
json
{
"modes": [
{ "index": 1, "frequency_hz": 3.45, "eigenvalue": 21.7, "mode_shape": [WasmNodeDisplacement] }
]
}| Field | Type | Description |
|---|---|---|
index | usize | Mode number (1-based). |
frequency_hz | f64 | Natural frequency (Hz). |
eigenvalue | f64 | Eigenvalue (rad/s). |
mode_shape | [WasmNodeDisplacement] | Normalised mode shape. |
Other Shared Types
WasmStoreyDefinition
| Field | Type | Description |
|---|---|---|
elevation | f64 | Storey height above datum (m). |
nodeIds | [i32] | Node IDs whose tributary mass contributes to this storey. |
WasmStoreyForce
| Field | Type | Description |
|---|---|---|
elevation | f64 | Storey elevation (m). |
weight | f64 | Lumped storey weight (N). |
force | f64 | Lateral force assigned to this storey (N). |
cv | f64 | Distribution coefficient w·h^k / Σ(w·h^k). |
Solver / Analysis
solve_model
Performs a full linear static analysis for all load cases in the model.
Input: WasmModel JSON
Output: WasmResults JSON (see Common Types).
Notes:
- Automatically subdivides physical members at intermediate nodes before solving.
- If
load_combinationsare provided, they are solved and an envelope is computed. - Returns
{"error": "..."}on parse or solve failure.
solve_model_pdelta
Iterative P-Delta (geometric stiffness) analysis for the first load case.
Input: WasmModel JSON + extra arguments:
json
{
"model": { ... },
"max_iterations": 10,
"tolerance": 1e-6
}Wait - the actual WASM signature is solve_model_pdelta(json_input: &str, max_iterations: usize, tolerance: f64).
The caller must pass the JSON string as arg 0 and the two scalars as separate JS arguments.
Output: WasmResults JSON (single load case only).
Notes:
- P-Delta is applied to the first load case only.
- Uses
fem_core::solver::solve_load_case_pdeltainternally.
solve_model_tc
Tension/compression-only member analysis for the first load case (iterative removal of members that go into tension or compression depending on their type).
Input: WasmModel JSON + extra argument:
Signature: solve_model_tc(json_input: &str, max_iterations: usize)
Output: WasmResults JSON (single load case only).
Notes:
- Members with
member_type: 4(TensionOnly) or5(CompressionOnly) are iteratively removed when they develop the wrong sign of axial force. max_iterationscaps the iteration count.
solve_model_buckling
Linear buckling (eigenvalue) analysis.
Signature: solve_model_buckling(json_input: &str, load_case_id: i32, n_modes: usize)
Input: WasmModel JSON
Output: WasmBucklingResults JSON
json
{
"modes": [
{ "index": 1, "load_factor": 15.3, "mode_shape": [WasmNodeDisplacement] }
]
}Notes:
- Applies the specified
load_case_idas the reference load vector. load_factoris the multiplier at which buckling occurs under that reference load.
solve_model_modal
Undamped free-vibration (modal) analysis.
Signature: solve_model_modal(json_input: &str, n_modes: usize)
Input: WasmModel JSON
Output: WasmModalResults JSON
json
{
"modes": [
{ "index": 1, "frequency_hz": 3.45, "eigenvalue": 21.7, "mode_shape": [WasmNodeDisplacement] }
]
}Notes:
- Consistent mass matrix built from nodal masses and material density.
- Physical members are auto-subdivided before solving (same as
solve_model).
member_capacities_only
Compute AS 4100 member capacities without running a full FEM solve. Fast path for auto-sizing.
Input: WasmMemberCapacitiesInput JSON
json
{
"model": { ... },
"member_forces": [WasmMemberForce]
}| Field | Type | Description |
|---|---|---|
model | WasmModel | Model definition (geometry, sections, materials). |
member_forces | [WasmMemberForce] | Optional solved end forces for αm / utilisation update. |
Output: WasmMemberCapacitiesOutput JSON
json
{
"member_capacities": [WasmMemberCapacity]
}Notes:
- If
member_forcesare empty, utilisations andalpha_muse default / uniform-moment assumptions. - Catches panics internally and returns
{"error": "Capacity computation panicked"}.
Results / Reports
analysis_report
Generates a concise JSON summary of a solved model: stats, extreme reactions / displacements, per-member utilisation, and a pass/fail rollup.
Signature: analysis_report(model_json: &str, results_json: &str) -> String
Input: Two JSON strings: the WasmModel and the WasmResults.
Output: AnalysisReport JSON
json
{
"stats": {
"nodeCount": 4,
"memberCount": 3,
"plateCount": 0,
"loadCaseCount": 2,
"combinationCount": 1,
"hasEnvelope": true
},
"maxReactions": [
{ "component": "Ry", "value": 12000.0, "node_id": 1, "load_case_id": 1 }
],
"maxDisplacements": [
{ "component": "uz", "value": 0.012, "node_id": 3, "load_case_id": 1 }
],
"memberUtilisation": [
{ "member_id": 1, "utilMax": 0.42, "governing": "biaxial section", "pass": true }
],
"passFailRollup": {
"totalMembersChecked": 3,
"passingMembers": 3,
"failingMembers": 0,
"maxUtilOverall": 0.42,
"pass": true
}
}| Field | Type | Description |
|---|---|---|
stats | ModelStats | Model size and envelope presence. |
maxReactions | [ReactionExtreme] | Peak reaction per component across all load cases. |
maxDisplacements | [DisplacementExtreme] | Peak absolute displacement per component. |
memberUtilisation | [MemberUtilSummary] | Governing utilisation per member (first load case with capacities). |
passFailRollup | PassFailRollup | Overall pass/fail summary. |
ReactionExtreme / DisplacementExtreme
| Field | Type | Description |
|---|---|---|
component | String | Component name (e.g. "Ry", "uz"). |
value | f64 | Extreme value (N or m / rad). |
node_id | i32 | Node where extreme occurs. |
load_case_id | i32 | Load case where extreme occurs. |
MemberUtilSummary
| Field | Type | Description |
|---|---|---|
member_id | i32 | Member identifier. |
utilMax | f64 | Maximum utilisation. |
governing | String | "biaxial section" or "biaxial member". |
pass | bool | true if utilMax <= 1.0. |
PassFailRollup
| Field | Type | Description |
|---|---|---|
totalMembersChecked | usize | Count of members with capacity data. |
passingMembers | usize | Count with pass = true. |
failingMembers | usize | Count with pass = false. |
maxUtilOverall | f64 | Maximum utilMax across all members. |
pass | bool | true if failingMembers == 0. |
Steel Design (AS 4100)
as4100_phi_ms
AS 4100 section moment capacity φMs for a doubly symmetric I-section.
Input: WasmAs4100SectionInput JSON
json
{
"d": 0.248,
"bf": 0.124,
"tf": 0.008,
"tw": 0.005,
"z_x": 4.8e-6,
"s_x": 5.5e-6,
"fyf": 300e6,
"fyw": 300e6
}| Field | Type | Description |
|---|---|---|
d | f64 | Overall depth (m). |
bf | f64 | Flange width (m). |
tf | f64 | Flange thickness (m). |
tw | f64 | Web thickness (m). |
z_x | f64 | Elastic section modulus (m³). |
s_x | f64 | Plastic section modulus (m³). |
fyf / fyw | f64 | Flange / web yield strength (Pa). |
Output: WasmAs4100PhiMsResult JSON
json
{
"section_class": "compact",
"lambda_s": 8.2,
"lambda_sp": 9.0,
"lambda_sy": 15.0,
"z_ex": 5.5e-6,
"m_sx": 1650.0,
"phi_m_sx": 1485.0
}| Field | Type | Description |
|---|---|---|
section_class | String | "compact", "non-compact", "slender". |
lambda_s | f64 | Section slenderness. |
lambda_sp / lambda_sy | f64 | Plastic / yield slenderness limits. |
z_ex | f64 | Effective section modulus (m³). |
m_sx | f64 | Nominal moment capacity (N·m). |
phi_m_sx | f64 | Design moment capacity φMs (N·m). |
as4100_phi_nc
AS 4100 member compression capacity φNc.
Input: WasmAs4100PhiNcInput JSON
json
{
"area": 3.25e-3,
"r": 0.038,
"fy": 300e6,
"kf": 1.0,
"alpha_b": 0.0,
"le_mm": 5000.0,
"phi": 0.9
}| Field | Type | Description |
|---|---|---|
area | f64 | Cross-sectional area (m²). |
r | f64 | Radius of gyration (m). |
fy | f64 | Yield strength (Pa). |
kf | f64 | Form factor. Default 1.0. |
alpha_b | f64 | Residual-stress parameter. Default 0. |
le_mm | f64 | Effective length (mm) - note: mm, not m. |
phi | f64 | Capacity reduction factor. Default 0.9. |
Output: WasmAs4100PhiNcResult JSON
json
{
"lambda_n": 0.85,
"alpha_c": 0.92,
"n_s": 975e3,
"n_c": 897e3,
"phi_n_c": 807e3
}| Field | Type | Description |
|---|---|---|
lambda_n | f64 | Modified slenderness. |
alpha_c | f64 | Member slenderness reduction factor. |
n_s | f64 | Squash capacity (N). |
n_c | f64 | Nominal member capacity (N). |
phi_n_c | f64 | Design capacity φNc (N). |
as4100_phi_mbx
AS 4100 member moment capacity φMbx (LTB check).
Input: WasmAs4100PhiMbxInput JSON
json
{
"d": 0.248,
"bf": 0.124,
"tf": 0.008,
"tw": 0.005,
"z_x": 4.8e-6,
"s_x": 5.5e-6,
"fyf": 300e6,
"fyw": 300e6,
"i_y": 3.5e-5,
"j": 1.5e-7,
"i_w": 0.0,
"e": 200000.0,
"g": 80000.0,
"le_mm": 5000.0,
"alpha_m_case": 0,
"beta_m": 0.0,
"phi": 0.9
}| Field | Type | Description |
|---|---|---|
| (section fields) | Same as WasmAs4100SectionInput (all in m, Pa). | |
i_y | f64 | Minor-axis second moment of area (m⁴). |
j | f64 | Torsion constant (m⁴). |
i_w | f64 | Warping constant (m⁶). Default 0. |
e | f64 | Young's modulus (MPa). Default 200_000. |
g | f64 | Shear modulus (MPa). Default 80_000. |
le_mm | f64 | Effective length (mm). |
alpha_m_case | i32 | 0=UniformMoment, 1=SimplySupportedUdl, 2=SimplySupportedPointLoad, 3=EndMoments, 4=CantileverUdl. |
beta_m | f64 | End-moment ratio for alpha_m_case: 3. Default 0. |
phi | f64 | Capacity reduction factor. Default 0.9. |
Output: WasmAs4100PhiMbxResult JSON
json
{
"m_sx": 1650.0,
"m_o": 4500.0,
"alpha_s": 0.55,
"alpha_m": 1.0,
"phi_m_bx": 817.0
}| Field | Type | Description |
|---|---|---|
m_sx | f64 | Section capacity (N·m). |
m_o | f64 | Elastic buckling moment (N·m). |
alpha_s | f64 | Slenderness reduction factor. |
alpha_m | f64 | Moment modification factor. |
phi_m_bx | f64 | Design capacity φMbx (N·m). |
as4100_phi_vv
AS 4100 web shear capacity φVv.
Input: WasmAs4100PhiVvInput JSON
json
{
"d": 0.248,
"tw": 0.005,
"tf": 0.008,
"fy": 300e6,
"section_name": "250UB25.7"
}| Field | Type | Description |
|---|---|---|
d | f64 | Overall depth (m). |
tw | f64 | Web thickness (m). |
tf | f64 | Flange thickness (m). |
fy | f64 | Yield strength (Pa). |
section_name | String | Section name (used for special-case tables). |
Output: WasmAs4100PhiVvResult JSON
json
{ "phi_vv": 280e3 }| Field | Type | Description |
|---|---|---|
phi_vv | f64 | Design shear capacity φVv (N). |
as4100_alpha_b
Returns the AS 4100 residual-stress factor αb for a given section name.
Signature: as4100_alpha_b(section_name: &str) -> f64
Input: Plain string (not JSON). Example: "250UB25.7"
Output: f64 - the αb value (e.g. 0.0 for hot-rolled I sections).
as4100_alpha_m
Computes the AS 4100 moment-modification factor αm from end moments.
Input: WasmAs4100AlphaMInput JSON
json
{ "my1": 50e3, "my2": -30e3 }| Field | Type | Description |
|---|---|---|
my1 / my2 | f64 | End moments (N·m). |
Output: WasmAs4100AlphaMResult JSON
json
{ "alpha_m": 1.35 }| Field | Type | Description |
|---|---|---|
alpha_m | f64 | Moment modification factor. |
as4100_combined
AS 4100 combined axial + biaxial bending capacity check (Section 8).
Input: WasmAs4100CombinedInput JSON
json
{
"m_star_x": 80e3,
"m_star_y": 20e3,
"n_star": -500e3,
"phi_msx": 120e3,
"phi_msy": 45e3,
"phi_mbx": 100e3,
"phi_mby": 45e3,
"phi_ncx": 600e3,
"phi_ncy": 250e3,
"phi_nt": 800e3,
"ns": 975e3,
"section_class": "compact",
"kf": 1.0
}| Field | Type | Description |
|---|---|---|
m_star_x / m_star_y | f64 | Design moments (N·m). Default m_star_y = 0. |
n_star | f64 | Design axial force (N, negative = compression). |
phi_msx / phi_msy | f64 | Section moment capacities (N·m). Default phi_msy = 0. |
phi_mbx / phi_mby | f64 | Member moment capacities (N·m). Default phi_mby = 0. |
phi_ncx / phi_ncy | f64 | Compression capacities (N). |
phi_nt | f64 | Tension capacity (N). |
ns | f64 | Squash capacity (N). |
section_class | String | "compact", "non-compact", "slender". |
kf | f64 | Form factor. Default 1.0. |
Output: WasmAs4100CombinedResult JSON
json
{
"phi_m_rx": 120e3,
"phi_m_ry": 45e3,
"phi_m_ox": 100e3,
"phi_m_oy": 45e3,
"section_util_x": 0.67,
"section_util_y": 0.44,
"member_util_x": 0.80,
"member_util_y": 0.44,
"axial_util": 0.83,
"util_biaxial_section": 0.89,
"util_biaxial_member": 0.94,
"util_max": 0.94
}| Field | Type | Description |
|---|---|---|
phi_m_rx / phi_m_ry | f64 | Reduced section moment capacities (N·m). |
phi_m_ox / phi_m_oy | f64 | Reduced member moment capacities (N·m). |
section_util_x / section_util_y | f64 | Section-level utilisations. |
member_util_x / member_util_y | f64 | Member-level utilisations. |
axial_util | f64 | Axial force utilisation. |
util_biaxial_section | f64 | Combined section utilisation. |
util_biaxial_member | f64 | Combined member utilisation. |
util_max | f64 | Maximum of all utilisations. |
Steel Design (AS 5100)
as5100_member_check
Full AS 5100.6 bridge steel member check: section classification, moment, compression, tension, shear, and combined.
Input: WasmAs5100MemberInput JSON
json
{
"d": 248.0,
"bf": 124.0,
"tf": 8.0,
"tw": 5.0,
"a": 3250.0,
"iyy": 3.5e7,
"izz": 4.8e8,
"j": 1.5e5,
"zzz": 0.0,
"szz": 0.0,
"zyy": 0.0,
"syy": 0.0,
"fy": 300.0,
"fu": 440.0,
"e": 200000.0,
"leMajor": 5.0,
"leMinor": 2.5,
"alphaMCase": 1,
"beta_m": 0.0,
"nStar": -300e3,
"mxStar": 80e3,
"myStar": 10e3,
"vxStar": 50e3
}| Field | Type | Description |
|---|---|---|
d / bf / tf / tw | f64 | Section geometry in mm. |
a | f64 | Area mm². |
iyy / izz / j | f64 | Second moments mm⁴. |
zzz / szz / zyy / syy | f64 | Section moduli mm³ (auto-computed if 0). |
fy / fu / e | f64 | Material MPa. Default e = 200_000. |
leMajor / leMinor | f64 | Effective lengths m. |
alphaMCase | i32 | Same cases as AS 4100. |
beta_m | f64 | End-moment ratio. Default 0. |
nStar / mxStar / myStar / vxStar | f64 | Applied forces N / N·m. |
Output: WasmAs5100MemberResult JSON
json
{
"phiMsx": 120e3,
"phiMsy": 45e3,
"phiMbx": 100e3,
"phiMby": 45e3,
"phiNcx": 600e3,
"phiNcy": 250e3,
"phiNt": 800e3,
"phiVv": 280e3,
"section_class": "compact",
"utilAxial": 0.50,
"utilFlexX": 0.80,
"utilFlexY": 0.22,
"utilShear": 0.18,
"utilCombined": 0.94,
"utilMax": 0.94,
"governing": "OK",
"assumptions": { "leMajor": 5.0, "leMinor": 2.5, "alpha_m": 1.13, "alpha_s": 0.55, "section_class": "compact" }
}| Field | Type | Description |
|---|---|---|
phiMsx / phiMsy | f64 | Section moment capacities (N·m). |
phiMbx / phiMby | f64 | Member moment capacities (N·m). |
phiNcx / phiNcy | f64 | Compression capacities (N). |
phiNt | f64 | Tension capacity (N). |
phiVv | f64 | Shear capacity (N). |
section_class | String | Compactness classification. |
utilAxial / utilFlexX / utilFlexY / utilShear / utilCombined / utilMax | f64 | Utilisations. |
governing | String | "OK" or "OVER". |
assumptions | WasmAs5100Assumptions | Effective lengths and factors used. |
Notes:
- Invalid geometry (zero or negative) returns a result with all zeros and
governing: "invalid input". - Minor-axis LTB is not reduced (φMby = φMsy per AS 5100 Cl 5.3.1).
as5100_combined
AS 5100.6 combined capacity check (same interaction equations as AS 4100 Section 8 but with AS 5100 factors).
Input: WasmAs5100CombinedInput JSON - same fields as WasmAs4100CombinedInput but with camelCase keys (mStarX, phiMsx, etc.).
Output: WasmAs5100CombinedResult JSON - same utilisations as AS 4100 combined but with camelCase keys (phiMRx, sectionUtilX, utilBiaxialMember, etc.).
Steel Design (AISC 360)
aisc360_member_check
Full AISC 360-16 member check: tension, compression, flexure, shear, and interaction.
Input: WasmAisc360MemberInput JSON
json
{
"d": 0.248,
"bf": 0.124,
"tf": 0.008,
"tw": 0.005,
"a": 3.25e-3,
"iyy": 3.5e-5,
"izz": 4.8e-6,
"j": 1.5e-7,
"zzz": 0.0,
"szz": 0.0,
"fy": 300e6,
"fu": 450e6,
"e": 200e9,
"leMajor": 5.0,
"leMinor": 2.5,
"lb": 5.0,
"cb": 1.0,
"nStar": -300e3,
"mxStar": 80e3,
"myStar": 10e3,
"vxStar": 50e3
}| Field | Type | Description |
|---|---|---|
d / bf / tf / tw | f64 | Section geometry m. |
a | f64 | Area m². |
iyy / izz / j | f64 | Second moments m⁴. |
zzz / szz | f64 | Section moduli m³ (auto-computed if 0). |
fy / fu / e | f64 | Material Pa. Default e = 200e9. |
leMajor / leMinor | f64 | Effective lengths m. |
lb | f64 | LTB unbraced length m. |
cb | f64 | Lateral-torsional buckling modification factor. Default 1.0. |
nStar / mxStar / myStar / vxStar | f64 | Applied forces N / N·m. |
Output: WasmAisc360MemberResult JSON
json
{
"phiPn": 900e3,
"phiPnComp": 700e3,
"phiMnx": 120e3,
"phiMny": 35e3,
"phiVn": 280e3,
"section_class": "compact",
"utilAxial": 0.43,
"utilFlexX": 0.67,
"utilFlexY": 0.29,
"utilShear": 0.18,
"utilCombined": 0.88,
"utilMax": 0.88,
"governing": "H1-1a",
"assumptions": { "leMajor": 5.0, "leMinor": 2.5, "lb": 5.0, "cb": 1.0 }
}| Field | Type | Description |
|---|---|---|
phiPn | f64 | Tension capacity (N). |
phiPnComp | f64 | Compression capacity (N). |
phiMnx / phiMny | f64 | Major / minor axis moment capacities (N·m). |
phiVn | f64 | Shear capacity (N). |
section_class | String | "compact", "non-compact", "slender". |
utilAxial / utilFlexX / utilFlexY / utilShear / utilCombined / utilMax | f64 | Utilisations. |
governing | String | Interaction equation ("H1-1a", "H1-1b", "none"). |
assumptions | WasmAisc360Assumptions | Effective lengths and cb used. |
Notes:
- Invalid geometry returns zeros with
governing: "invalid input". - Minor-axis flexure is estimated as
0.9·Fy·ZywhereZy = Iyy / (bf/2).
Steel Design (Eurocode 3)
ec3_member_check
Full EN 1993-1-1 member check: cross-section resistances, flexural buckling, LTB, shear, and simplified M-N interaction.
Input: WasmEc3MemberInput JSON
json
{
"d": 0.248,
"bf": 0.124,
"tf": 0.008,
"tw": 0.005,
"a": 3.25e-3,
"iyy": 3.5e-5,
"izz": 4.8e-6,
"j": 1.5e-7,
"zzz": 0.0,
"szz": 0.0,
"w_pl_y": 0.0,
"w_el_y": 0.0,
"fy": 300e6,
"e": 200e9,
"lcrY": 5.0,
"lcrZ": 2.5,
"lcrLT": 5.0,
"c1": 1.0,
"nStar": -300e3,
"myStar": 80e3,
"mzStar": 10e3,
"vyStar": 50e3
}| Field | Type | Description |
|---|---|---|
d / bf / tf / tw | f64 | Section geometry m. |
a | f64 | Area m². |
iyy / izz / j | f64 | Second moments m⁴. |
zzz / szz | f64 | Major-axis moduli m³ (auto if 0). |
w_pl_y / w_el_y | f64 | Plastic / elastic modulus m³ (auto if 0). |
fy / e | f64 | Material Pa. Default e = 200e9. |
lcrY / lcrZ / lcrLT | f64 | Buckling lengths m. |
c1 | f64 | LTB equivalent uniform moment factor. Default 1.0. |
nStar / myStar / mzStar / vyStar | f64 | Applied forces N / N·m. |
Output: WasmEc3MemberResult JSON
json
{
"NtRd": 900e3,
"NcRd": 975e3,
"NbYRd": 700e3,
"NbZRd": 300e3,
"MyRd": 135e3,
"MzRd": 30e3,
"MbRd": 110e3,
"VplRd": 280e3,
"section_class": "class 1",
"utilAxial": 0.43,
"utilFlexY": 0.59,
"utilFlexZ": 0.33,
"utilShear": 0.18,
"utilCombined": 0.95,
"utilMax": 0.95,
"governing": "EC3 6.3.3",
"assumptions": { "lcrY": 5.0, "lcrZ": 2.5, "lcrLT": 5.0, "c1": 1.0, "curveY": "a", "curveZ": "b", "curveLT": "a" }
}| Field | Type | Description |
|---|---|---|
NtRd | f64 | Tension resistance (N). |
NcRd | f64 | Compression resistance (N). |
NbYRd / NbZRd | f64 | Flexural buckling resistances (N). |
MyRd / MzRd | f64 | Major / minor axis moment resistances (N·m). |
MbRd | f64 | LTB resistance (N·m). |
VplRd | f64 | Shear resistance (N). |
section_class | String | "class 1" … "class 4". |
utilAxial / utilFlexY / utilFlexZ / utilShear / utilCombined / utilMax | f64 | Utilisations. |
governing | String | Interaction check reference. |
assumptions | WasmEc3Assumptions | Buckling lengths, c1, and buckling curves used. |
Notes:
- Invalid geometry returns zeros with
governing: "invalid input". - Interaction uses EC3 6.3.3 simplified M-N with
ky = kz = kLT = 1.0.
Steel Design (AS 4600)
as4600_capacity
AS 4600 cold-formed steel section capacity (compression + bending).
Input: WasmAs4600Input JSON
json
{
"section_type": "LippedC",
"d": 0.15,
"b": 0.075,
"t": 0.0015,
"r": 0.003,
"f_y": 450e6,
"e": 200e9,
"lip": 0.02
}| Field | Type | Description |
|---|---|---|
section_type | String | "PlainC", "LippedC", "Z", "SHS", "RHS". |
d | f64 | Depth (m). |
b | f64 | Width (m). |
t | f64 | Thickness (m). |
r | f64 | Internal corner radius (m). Default 0. |
f_y | f64 | Yield strength (Pa). |
e | f64 | Young's modulus (Pa). Default 200e9. |
lip | f64 | Lip length for lipped C-sections (m). Default 0. |
Output: WasmAs4600Result JSON
json
{
"phiNc": 85e3,
"phiMs": 12e3,
"aGross": 4.5e-4,
"aEff": 3.8e-4,
"zGross": 1.2e-5,
"zEff": 9.5e-6,
"governing": "compression"
}| Field | Type | Description |
|---|---|---|
phiNc | f64 | Design compression capacity (N). |
phiMs | f64 | Design moment capacity (N·m). |
aGross / aEff | f64 | Gross / effective area (m²). |
zGross / zEff | f64 | Gross / effective section modulus (m³). |
governing | String | Governing limit state. |
Timber (AS 1720)
as1720_timber_check
AS 1720.1 timber member check for a rectangular sawn, MGP or glulam section: bending, compression about each axis, tension and shear. φ, k4, k6, k9 and k12 are derived from the inputs; k1 is given. Cross-checked against timberas and the SA HB 108 worked examples, not yet verified against the standard (see docs/reference/as1720_validation.md).
Units: millimetres, N and N·mm (unlike most exports, which are SI base).
Input: WasmAs1720Input JSON
json
{
"grade": "MGP10",
"species": "softwood",
"seasoned": true,
"category": 2,
"b": 35,
"d": 190,
"length": 2800,
"la_y": 0,
"restraint_edge": "compression",
"g13x": 1.0,
"g13y": 1.0,
"k1": 1.0,
"m_star": 5e6,
"n_star": 2e3,
"nt_star": 0,
"v_star": 10e3
}| Field | Type | Description |
|---|---|---|
grade | String | "F4"…"F34", "MGP10"/"MGP12"/"MGP15", "GL8"…"GL18". Anything else is an error. |
species | String | "softwood" (default) or "hardwood"; an F-grade's f't depends on it. |
seasoned | bool | Default true; selects the ρb / ρc expressions of Appendix E2. |
category | u8 | Application category 1-3 (Table 2.1), sets φ. Default 2. |
b / d | f64 | Breadth of one board and depth (mm). |
n_boards | u32 | Boards fixed side by side (default 1). |
length | f64 | Member length L (mm): column length and span for k9. Absent -> no stability check. |
la_y | f64 | Lateral restraint spacing (mm) for S1 and S4. Defaults to length. |
la_phi | f64 | Torsional restraint spacing (mm), for restraint_edge: "tension_and_torsional". |
restraint_edge | String | "compression" (default), "tension" or "tension_and_torsional". |
g13x / g13y | f64 | Effective length factors (Table 3.2). Default 1.0. |
r | f64 | Temporary / total action ratio for ρb, ρc. Default 0.25. |
n_members / spacing | u32 / f64 | Parallel system for k9 (members, spacing mm). Default 1 / 0. |
partial_seasoning / high_temp | bool | Table 2.5 k4 for unseasoned timber; k6 = 0.9 regions. |
a_t | f64 | Net tension area (mm²). Defaults to the gross area. |
k1 | f64 | Load duration factor. Default 1.0. |
k4 / k6 / k9 / k12 / k12c | f64 | Optional overrides of the derived factors. |
m_star / n_star / nt_star / v_star | f64 | Design actions (N·mm / N). Default 0. |
le_bending / le_compression | f64 | Legacy: read as la_y / length when those are absent. |
Output: WasmAs1720Result JSON
json
{
"phiM": 1300000, "phiN": 2855, "phiNcx": 66560, "phiNcy": 2855, "phiNt": 33050, "phiV": 7758,
"phi": 0.7, "k1": 1, "k4": 1, "k6": 1, "k9": 1,
"k12": 0.5514, "k12x": 0.7943, "k12y": 0.03407, "k12c": 0.03407,
"rhoB": 0.7283, "rhoC": 0.9577, "S1": 26.05, "S3": 14.74, "S4": 80,
"continuousRestraint": false, "stabilityAssessed": true,
"fB": 16, "fT": 7.1, "fS": 2.5, "fC": 18, "E": 10000,
"utilM": 3.845, "utilN": 0.7006, "utilNt": 0, "utilV": 1.289, "utilMax": 3.845,
"governing": "bending"
}(The input above, run through the export, rounded to four figures. The 2.8 m stud is unrestrained about its minor axis, so k12y is 0.034 and bending governs at 3.8.)
| Field | Type | Description |
|---|---|---|
phiM / phiNt / phiV | f64 | Capacities (N·mm / N). |
phiN | f64 | Compression capacity, the smaller of phiNcx and phiNcy (N). |
phi, k1, k4, k6, k9 | f64 | Factors used. |
k12 / k12x / k12y / k12c | f64 | Stability factors: bending, compression about x and y, governing compression. |
rhoB / rhoC / S1 / S3 / S4 | f64 | Material constants and slenderness coefficients behind k12. |
continuousRestraint | bool | Whether la_y is within L_CLR (Eq 3.2(6)). |
stabilityAssessed | bool | false when no length was given: k12 is then 1 and stability was not checked. |
fB / fT / fS / fC / E | f64 | Characteristic values after the size notes (MPa). |
utilM / utilN / utilNt / utilV / utilMax | f64 | Utilisations. |
governing | String | Governing check. |
Concrete (AS 3600)
as3600_rc_member_check
Combined RC beam/column check: bending, axial, and shear.
Input: WasmRcMemberInput JSON
json
{
"b": 0.4,
"d_section": 0.6,
"d": 0.55,
"d_sc": 0.05,
"f_prime_c": 32e6,
"f_sy": 500e6,
"a_st": 0.0025,
"a_sc": 0.0,
"n_star": 500e3,
"m_star": 200e3,
"v_star": 180e3
}| Field | Type | Description |
|---|---|---|
b | f64 | Section width (m). |
d_section | f64 | Overall depth (m). |
d | f64 | Effective depth to tension steel (m). |
d_sc | f64 | Cover to compression steel (m). Default 0. |
f_prime_c | f64 | Concrete strength (Pa). |
f_sy | f64 | Steel yield strength (Pa). |
a_st / a_sc | f64 | Tension / compression steel area (m²). Default a_sc = 0. |
n_star / m_star / v_star | f64 | Design actions (N / N·m / N). |
Output: WasmRcMemberResult JSON
json
{
"phiMu": 320e3,
"phiNuo": 4500e3,
"phiMN": 280e3,
"phiVuc": 210e3,
"util_bending": 0.63,
"util_axial": 0.11,
"util_interaction": 0.71,
"util_shear": 0.86,
"util_max": 0.86,
"governing": "shear"
}| Field | Type | Description |
|---|---|---|
phiMu | f64 | Bending capacity (N·m). |
phiNuo | f64 | Axial-only capacity (N). |
phiMN | f64 | Axial-bending combined capacity (N·m). |
phiVuc | f64 | Concrete shear capacity (N). |
util_bending / util_axial / util_interaction / util_shear / util_max | f64 | Utilisations. |
governing | String | Governing check ("bending", "axial", "shear", etc.). |
Notes:
- Dimensions converted m→mm, stresses Pa→MPa,
m_starN·m→N·mm internally. - Returned moments are converted back to N·m.
as3600_rc_beam_moment
RC beam moment capacity (singly or doubly reinforced).
Input: WasmRcBeamInput JSON
json
{
"b": 0.4,
"d": 0.55,
"d_sc": 0.05,
"f_prime_c": 32e6,
"f_sy": 500e6,
"a_st": 0.0025,
"a_sc": 0.0
}| Field | Type | Description |
|---|---|---|
b / d | f64 | Width and effective depth (m). |
d_sc | f64 | Compression steel cover (m). Default 0. |
f_prime_c / f_sy | f64 | Concrete and steel strengths (Pa). |
a_st / a_sc | f64 | Steel areas (m²). Default a_sc = 0. |
Output: WasmRcBeamResult JSON
json
{
"phiMu": 320e3,
"kU": 0.28,
"a": 0.154,
"phi": 0.8,
"overReinforced": false
}| Field | Type | Description |
|---|---|---|
phiMu | f64 | Moment capacity (N·m). |
kU | f64 | Neutral-axis depth ratio k_u = d_n / d. |
a | f64 | Equivalent rectangular stress-block depth (m). |
phi | f64 | Strength-reduction factor. |
overReinforced | bool | true if concrete crushes before steel yields. |
as3600_rc_beam_shear
RC beam concrete shear capacity φVuc per AS 3600.
Input: WasmRcShearInput JSON
json
{
"b": 0.4,
"d": 0.55,
"f_prime_c": 32e6,
"a_st": 0.0025
}| Field | Type | Description |
|---|---|---|
b / d | f64 | Width and effective depth (m). |
f_prime_c | f64 | Concrete strength (Pa). |
a_st | f64 | Tensile steel area (m²). |
Output: WasmRcShearResult JSON
json
{
"phiVuc": 210e3,
"vUc": 280e3,
"rhoW": 0.005,
"phi": 0.7
}| Field | Type | Description |
|---|---|---|
phiVuc | f64 | Design shear capacity (N). |
vUc | f64 | Nominal shear capacity (N). |
rhoW | f64 | Steel ratio A_st / (b·d). |
phi | f64 | Strength-reduction factor. |
as3600_rc_column_capacity
RC column capacity check including interaction curve.
Input: WasmRcColumnInput JSON
json
{
"b": 0.4,
"d_section": 0.6,
"d": 0.55,
"d_sc": 0.05,
"f_prime_c": 32e6,
"f_sy": 500e6,
"a_st": 0.0025,
"a_sc": 0.0,
"n_star": 2000e3,
"m_star": 300e3
}| Field | Type | Description |
|---|---|---|
b / d_section / d / d_sc | f64 | Dimensions (m). |
f_prime_c / f_sy | f64 | Strengths (Pa). |
a_st / a_sc | f64 | Steel areas (m²). |
n_star / m_star | f64 | Design actions (N / N·m). |
Output: WasmRcColumnResult JSON
json
{
"phiNuo": 4500e3,
"phiMu": 420e3,
"phiMN": 380e3,
"util_n": 0.44,
"util_m": 0.71,
"util_interaction": 0.76,
"util_max": 0.76,
"curve": { ... }
}| Field | Type | Description |
|---|---|---|
phiNuo | f64 | Axial-only capacity (N). |
phiMu | f64 | Pure bending capacity (N·m). |
phiMN | f64 | Combined capacity at n_star (N·m). |
util_n / util_m / util_interaction / util_max | f64 | Utilisations. |
curve | WasmRcColumnCurveResult | Full N-M interaction curve points. |
WasmRcColumnCurveResult
json
{
"points": [
{ "c": 0.0, "n": 4500e3, "m": 0.0, "phi": 0.6, "phiN": 4500e3, "phiM": 0.0, "label": "pure_compression" }
],
"phiNuo": 4500e3,
"phiMu": 420e3,
"nBalanced": 2200e3,
"mBalanced": 380e3
}| Field | Type | Description |
|---|---|---|
points | [WasmRcColumnCurvePoint] | Interaction curve vertices. |
phiNuo | f64 | Pure compression capacity (N). |
phiMu | f64 | Pure moment capacity (N·m). |
nBalanced / mBalanced | f64 | Balanced point (N / N·m). |
WasmRcColumnCurvePoint
| Field | Type | Description |
|---|---|---|
c | f64 | Neutral-axis depth fraction. |
n / m | f64 | Nominal N and M at this point. |
phi | f64 | Strength-reduction factor. |
phiN / phiM | f64 | Factored capacities. |
label | String | Point label. |
as3600_rc_column_interaction_curve
Returns the full N-M interaction curve for an RC column without checking a specific demand.
Input: WasmRcColumnInput JSON (same as as3600_rc_column_capacity, but n_star and m_star are ignored).
Output: WasmRcColumnCurveResult JSON (same curve object as above).
rc_shear_torsion_combined
AS 3600 combined shear + torsion capacity check.
Input: WasmShearTorsionInput JSON
json
{
"vStar": 180e3,
"tStar": 45e3,
"b": 0.4,
"d": 0.55,
"h": 0.6,
"fPrimeC": 32e6,
"aSt": 0.0025
}| Field | Type | Description |
|---|---|---|
vStar | f64 | Design shear force (N). |
tStar | f64 | Design torsion (N·m). |
b / d / h | f64 | Section dimensions (m). |
fPrimeC | f64 | Concrete strength (Pa). |
aSt | f64 | Longitudinal tensile steel area (m²). |
Output: WasmShearTorsionResult JSON
json
{
"phiVUc": 210e3,
"phiTUc": 68e3,
"utilV": 0.86,
"utilT": 0.66,
"utilCombined": 0.94,
"utilMax": 0.94,
"governing": "combined"
}| Field | Type | Description |
|---|---|---|
phiVUc | f64 | Concrete shear capacity φVuc (N). |
phiTUc | f64 | Torsion capacity φTuc (N·m). |
utilV / utilT / utilCombined / utilMax | f64 | Utilisations. |
governing | String | "shear", "torsion", or "combined". |
Notes:
tStaris converted N·m → N·mm internally.- Dimensions converted m → mm, fPrimeC Pa → MPa, aSt m² → mm².
Concrete Slabs (AS 3600)
as3600_slab_check
Combined slab check: moment capacity, minimum steel, punching shear, and deflection.
Input: WasmSlabInput JSON
json
{
"d": 0.25,
"cover": 0.03,
"f_prime_c": 32e6,
"f_sy": 500e6,
"a_st_per_m": 0.001,
"m_star": 50e3,
"col_a": 0.4,
"col_b": 0.4,
"n_star": 1000e3,
"span": 6.0,
"support_type": 0
}| Field | Type | Description |
|---|---|---|
d | f64 | Overall slab thickness (m). |
cover | f64 | Concrete cover (m). |
f_prime_c / f_sy | f64 | Strengths (Pa). |
a_st_per_m | f64 | Tensile steel area per unit width (m²/m). |
m_star | f64 | Design moment per unit width (N·m/m). |
col_a / col_b | f64 | Column dimensions for punching check (m). |
n_star | f64 | Design axial load for punching (N). |
span | f64 | Slab span for deflection check (m). |
support_type | i32 | 0=SimplySupported, 1=Continuous, 2=Cantilever. Default 0. |
Output: WasmSlabResult JSON
json
{
"phiMu": 85e3,
"a_st_provided": 0.001,
"a_st_min": 8e-4,
"util_min_steel": 0.80,
"util_moment": 0.59,
"phiVUo": 1200e3,
"util_punching": 0.83,
"lOverDActual": 24.0,
"lOverDLimit": 32.0,
"util_deflection": 0.75,
"util_max": 0.83,
"governing": "punching"
}| Field | Type | Description |
|---|---|---|
phiMu | f64 | Moment capacity (N·m/m). |
a_st_provided / a_st_min | f64 | Steel areas (m²/m). |
util_min_steel / util_moment | f64 | Utilisations. |
phiVUo | f64 | Punching shear capacity (N). |
util_punching | f64 | Punching utilisation. |
lOverDActual / lOverDLimit | f64 | Span/depth ratios. |
util_deflection | f64 | Deflection utilisation (actual / limit). |
util_max | f64 | Maximum utilisation. |
governing | String | Governing check. |
as3600_slab_strip_moment
Slab strip moment capacity and minimum steel check.
Input: WasmSlabStripInput JSON
json
{
"d": 0.25,
"cover": 0.03,
"f_prime_c": 32e6,
"f_sy": 500e6,
"a_st_per_m": 0.001,
"m_star": 50e3
}| Field | Type | Description |
|---|---|---|
d / cover | f64 | Thickness and cover (m). |
f_prime_c / f_sy | f64 | Strengths (Pa). |
a_st_per_m | f64 | Steel area per unit width (m²/m). |
m_star | f64 | Design moment (N·m/m). |
Output: WasmSlabStripResult JSON
json
{
"phiMu": 85e3,
"a_st_provided": 0.001,
"a_st_min": 8e-4,
"util_min_steel": 0.80,
"util_moment": 0.59
}| Field | Type | Description |
|---|---|---|
phiMu | f64 | Moment capacity (N·m/m). |
a_st_provided / a_st_min | f64 | Steel areas (m²/m). |
util_min_steel / util_moment | f64 | Utilisations. |
as3600_slab_punching_shear
AS 3600 slab punching shear capacity at a column.
Input: WasmSlabPunchingInput JSON
json
{
"d": 0.25,
"cover": 0.03,
"f_prime_c": 32e6,
"col_a": 0.4,
"col_b": 0.4,
"n_star": 1000e3
}| Field | Type | Description |
|---|---|---|
d / cover | f64 | Thickness and cover (m). |
f_prime_c | f64 | Concrete strength (Pa). |
col_a / col_b | f64 | Column dimensions (m). |
n_star | f64 | Design axial load (N). |
Output: WasmSlabPunchingResult JSON
json
{
"d": 0.22,
"u": 2.4,
"f_cv": 1.8,
"vUo": 1200e3,
"phiVUo": 950e3,
"util_punching": 0.83
}| Field | Type | Description |
|---|---|---|
d | f64 | Effective depth (m). |
u | f64 | Critical perimeter (m). |
f_cv | f64 | Concrete shear stress factor. |
vUo | f64 | Design punching shear force (N). |
phiVUo | f64 | Punching shear capacity (N). |
util_punching | f64 | Utilisation. |
as3600_slab_deflection
AS 3600 simplified slab deflection span/depth check.
Input: WasmSlabDeflectionInput JSON
json
{
"span": 6.0,
"d": 0.25,
"f_sy": 500e6,
"support_type": 0
}| Field | Type | Description |
|---|---|---|
span | f64 | Span (m). |
d | f64 | Effective depth (m). |
f_sy | f64 | Steel yield strength (Pa). |
support_type | i32 | 0=SimplySupported, 1=Continuous, 2=Cantilever. Default 0. |
Output: WasmSlabDeflectionResult JSON
json
{
"lOverDActual": 24.0,
"lOverDLimit": 32.0,
"util_deflection": 0.75
}| Field | Type | Description |
|---|---|---|
lOverDActual | f64 | Actual span/depth ratio. |
lOverDLimit | f64 | AS 3600 limit. |
util_deflection | f64 | actual / limit. |
Composite (AS 2327)
composite_beam_check
Simply-supported composite steel-concrete beam capacity check.
Input: WasmCompositeBeamInput JSON
json
{
"span": 10.0,
"beam_spacing": 3.0,
"d": 0.5,
"b_f": 0.19,
"t_f": 0.014,
"t_w": 0.009,
"f_y": 300e6,
"z_e": 1.2e-3,
"d_s": 0.12,
"f_prime_c": 32e6,
"n_studs": 20,
"d_stud": 0.019,
"f_u_stud": 450e6,
"m_star": 500e3
}| Field | Type | Description |
|---|---|---|
span | f64 | Beam span (m). |
beam_spacing | f64 | Tributary width (m). |
d / b_f / t_f / t_w | f64 | Steel section geometry (m). |
f_y | f64 | Steel yield strength (Pa). |
z_e | f64 | Elastic section modulus (m³). |
d_s | f64 | Slab thickness above deck (m). |
f_prime_c | f64 | Concrete strength (Pa). |
n_studs | i32 | Number of shear studs. |
d_stud | f64 | Stud diameter (m). |
f_u_stud | f64 | Stud ultimate strength (Pa). |
m_star | f64 | Design moment (N·m). |
Output: WasmCompositeBeamResult JSON
json
{
"bEff": 2.5,
"fCc": 3200e3,
"fSt": 2800e3,
"mFull": 650e3,
"mBare": 420e3,
"phiMbv": 585e3,
"eta": 0.88,
"pnaInSlab": true,
"phiNQ": 2500e3,
"nStudsReq": 17.6,
"util_stud": 0.88,
"util_moment": 0.85,
"util_max": 0.88
}| Field | Type | Description |
|---|---|---|
bEff | f64 | Effective slab width (m). |
fCc | f64 | Concrete compression force (N). |
fSt | f64 | Steel tension force (N). |
mFull | f64 | Full-interaction moment capacity (N·m). |
mBare | f64 | Bare steel moment capacity (N·m). |
phiMbv | f64 | Design composite moment capacity (N·m). |
eta | f64 | Degree of shear connection. |
pnaInSlab | bool | true if plastic neutral axis is in the slab. |
phiNQ | f64 | Stud shear capacity (N). |
nStudsReq | f64 | Required number of studs. |
util_stud / util_moment / util_max | f64 | Utilisations. |
Pad Footing
pad_footing_design
AS 3600 / AS 2870 pad footing design: bearing, moment, one-way shear, and punching.
Input: WasmPadFootingInput JSON
json
{
"columnBx": 0.4,
"columnBy": 0.4,
"footingBx": 2.5,
"footingBy": 2.5,
"footingH": 0.6,
"cover": 0.05,
"fPrimeC": 32e6,
"fSy": 500e6,
"qUlt": 400e3,
"nStar": 2500e3,
"mxStar": 800e3,
"myStar": 600e3,
"selfWeight": 0.0
}| Field | Type | Description |
|---|---|---|
columnBx / columnBy | f64 | Column dimensions (m). |
footingBx / footingBy / footingH | f64 | Footing plan dimensions and thickness (m). |
cover | f64 | Concrete cover to reinforcement (m). |
fPrimeC | f64 | Concrete compressive strength (Pa). |
fSy | f64 | Reinforcement yield strength (Pa). |
qUlt | f64 | Ultimate soil bearing pressure (Pa). |
nStar | f64 | Design axial load (N, positive compression). |
mxStar / myStar | f64 | Design moments (N·m). |
selfWeight | f64 | Optional self-weight of footing (N). Default 0. |
Output: WasmPadFootingResult JSON
json
{
"cornerPressures": [320e3, 280e3, 260e3, 220e3],
"qMax": 320e3,
"qAllowable": 400e3,
"utilBearing": 0.80,
"dEff": 0.525,
"mXDesign": 450e3,
"mYDesign": 380e3,
"aStXReq": 0.0025,
"aStYReq": 0.0021,
"aStMin": 0.0018,
"aStXProvided": 0.0028,
"aStYProvided": 0.0024,
"utilMomentX": 0.89,
"utilMomentY": 0.88,
"vX": 520e3,
"vY": 480e3,
"phiVUc": 650e3,
"utilShear": 0.80,
"punchingPerimeter": 4.2,
"vPunch": 1800e3,
"phiVPunch": 2200e3,
"utilPunching": 0.82,
"utilMax": 0.89,
"governing": "moment_x"
}| Field | Type | Description |
|---|---|---|
cornerPressures | [f64; 4] | Soil pressure at four corners (Pa). |
qMax | f64 | Maximum corner pressure (Pa). |
qAllowable | f64 | Echo of qUlt (Pa). |
utilBearing | f64 | qMax / qAllowable. |
dEff | f64 | Effective depth to tensile reinforcement (m). |
mXDesign / mYDesign | f64 | Design bending moments per unit width (N·m/m). |
aStXReq / aStYReq | f64 | Required steel area per unit width (m²/m). |
aStMin | f64 | Minimum reinforcement area per unit width (m²/m). |
aStXProvided / aStYProvided | f64 | Provided steel area (currently set equal to required + min). |
utilMomentX / utilMomentY | f64 | Moment utilisations. |
vX / vY | f64 | Design one-way shear forces (N). |
phiVUc | f64 | Concrete shear capacity (N). |
utilShear | f64 | Max one-way shear utilisation. |
punchingPerimeter | f64 | Critical punching perimeter at dEff/2 from column face (m). |
vPunch | f64 | Design punching shear force (N). |
phiVPunch | f64 | Punching shear capacity (N). |
utilPunching | f64 | Punching utilisation. |
utilMax | f64 | Highest utilisation. |
governing | String | Governing check. |
Notes:
- If invalid inputs cause NaN utilisation, returns
{"error": "..."}where the message is thegoverningstring from the core.
Retaining Wall
retaining_wall_design
Cantilever retaining wall check: sliding, overturning, bearing, stem bending, and heel bending.
Input: WasmRetainingWallInput JSON
json
{
"wallHeight": 3.0,
"stemThicknessBase": 0.35,
"stemThicknessTop": 0.2,
"baseWidth": 2.5,
"baseThickness": 0.4,
"toeLength": 0.6,
"gammaSoil": 18e3,
"ka": 0.33,
"gammaConc": 24e3,
"fPrimeC": 32e6,
"fSy": 500e6,
"cover": 0.05,
"phiBaseDeg": 30.0,
"qAllowable": 200e3
}| Field | Type | Description |
|---|---|---|
wallHeight | f64 | Stem height above base (m). |
stemThicknessBase / stemThicknessTop | f64 | Stem thickness at base / top (m). |
baseWidth / baseThickness | f64 | Base slab dimensions (m). |
toeLength | f64 | Toe length in front of stem (m). |
gammaSoil | f64 | Unit weight of retained soil (N/m³). |
ka | f64 | Active earth-pressure coefficient. |
gammaConc | f64 | Unit weight of concrete (N/m³). Default 24e3. |
fPrimeC | f64 | Concrete strength (Pa). |
fSy | f64 | Steel yield strength (Pa). |
cover | f64 | Concrete cover (m). |
phiBaseDeg | f64 | Base friction angle (°). Default 30. |
qAllowable | f64 | Allowable soil bearing pressure (Pa). |
Output: WasmRetainingWallResult JSON
json
{
"pa": 89.1e3,
"paHeight": 1.7,
"slidingResistance": 110e3,
"utilSliding": 0.81,
"restoringMoment": 420e3,
"overturningMoment": 151e3,
"utilOverturning": 0.36,
"resultantX": 1.34,
"eccentricity": 0.21,
"qMax": 185e3,
"qMin": 45e3,
"utilBearing": 0.92,
"stemMoment": 95e3,
"stemAst": 0.0012,
"utilStem": 0.78,
"heelMoment": 62e3,
"heelAst": 0.0009,
"utilHeel": 0.65,
"utilMax": 0.92,
"governing": "bearing"
}| Field | Type | Description |
|---|---|---|
pa | f64 | Total active thrust per metre length (N/m). |
paHeight | f64 | Height of resultant active thrust above base (m). |
slidingResistance | f64 | Resisting force from base friction (N/m). |
utilSliding | f64 | pa / slidingResistance. |
restoringMoment / overturningMoment | f64 | Moments about toe (N·m/m). |
utilOverturning | f64 | overturningMoment / restoringMoment. |
resultantX | f64 | Position of vertical resultant from toe (m). |
eccentricity | f64 | Eccentricity from base centre (m). |
qMax / qMin | f64 | Max/min soil bearing pressure (Pa). |
utilBearing | f64 | qMax / qAllowable. |
stemMoment / heelMoment | f64 | Design moments (N·m/m). |
stemAst / heelAst | f64 | Required steel area per unit width (m²/m). |
utilStem / utilHeel | f64 | Moment utilisations. |
utilMax | f64 | Maximum utilisation. |
governing | String | Governing check ("sliding", "overturning", "bearing", "stem", "heel"). |
Seismic
distribute_seismic_forces
Distributes a total seismic base shear to storey nodes per AS 1170.4 equivalent-static method.
Input: WasmSeismicDistributionInput JSON
json
{
"model": { ... },
"baseShear": 500e3,
"period": 0.8,
"direction": [1.0, 0.0, 0.0],
"storeys": [
{ "elevation": 0.0, "nodeIds": [1, 2] },
{ "elevation": 3.5, "nodeIds": [3, 4] }
],
"loadCaseId": 99,
"verticalAxis": null
}| Field | Type | Description |
|---|---|---|
model | WasmModel | Model for mass extraction. |
baseShear | f64 | Total seismic base shear (N). |
period | f64 | Building period (s). |
direction | [f64; 3] | Horizontal direction vector. |
storeys | [WasmStoreyDefinition] | Storey elevations and node IDs. |
loadCaseId | i32 | Load case to attach generated nodal loads. |
verticalAxis | String | null | Optional axis name ("Z", "Y", etc.). |
Output: WasmSeismicDistributionResult JSON
json
{
"nodalLoads": [WasmNodalLoad],
"storeyForces": [WasmStoreyForce],
"totalBaseShear": 500e3,
"sumForces": 500e3,
"k": 1.5
}| Field | Type | Description |
|---|---|---|
nodalLoads | [WasmNodalLoad] | Nodal forces to inject into the model. |
storeyForces | [WasmStoreyForce] | Per-storey lateral force, weight, and coefficient. |
totalBaseShear | f64 | Echo of input (N). |
sumForces | f64 | Sum of storey forces (should equal totalBaseShear). |
k | f64 | Vertical distribution exponent (1.0 for T <= 0.5 s; 2.0 for T >= 2.5 s; linear in between). |
response_spectrum_analysis
Modal response-spectrum analysis using SRSS or CQC combination.
Input: WasmResponseSpectrumInput JSON
json
{
"model": { ... },
"spectrum_points": [[0.0, 0.5], [0.5, 1.0], [1.0, 0.8]],
"direction": "X",
"n_modes": 10,
"damping_ratio": 0.05,
"combination_method": "SRSS"
}| Field | Type | Description |
|---|---|---|
model | WasmModel | Standard FEM model. |
spectrum_points | [[f64, f64]] | Spectrum pairs [period_s, accel_m_s2]. |
direction | String | "X", "Y", or "Z". |
n_modes | usize | Number of modes. Default 10. |
damping_ratio | f64 | Damping ratio. Default 0.05. |
combination_method | String | "SRSS" or "CQC". Default "SRSS". |
Output: WasmResponseSpectrumResult JSON
json
{
"direction": "X",
"combination_method": "SRSS",
"damping_ratio": 0.05,
"total_mass": 15000.0,
"total_effective_mass": 14500.0,
"combined_base_shear": 420e3,
"mode_responses": [
{ "modeIndex": 1, "periodS": 0.85, "frequencyHz": 1.18, "spectralAccel": 0.45, "participationFactor": 1.2, "effectiveMass": 8000.0, "baseShear": 250e3 }
],
"combined_displacements": [WasmNodeDisplacement]
}| Field | Type | Description |
|---|---|---|
direction / combination_method / damping_ratio | Echoes of inputs. | |
total_mass | f64 | Total lumped mass (kg). |
total_effective_mass | f64 | Sum of effective modal masses (kg). |
combined_base_shear | f64 | Combined base shear (N). |
mode_responses | [WasmModeResponse] | Per-mode contribution. |
combined_displacements | [WasmNodeDisplacement] | SRSS/CQC combined peak displacements. |
WasmModeResponse
| Field | Type | Description |
|---|---|---|
mode_index | usize | Mode number. |
period_s / frequency_hz | f64 | Period and frequency. |
spectralAccel | f64 | Spectral acceleration (m/s²). |
participationFactor | f64 | Modal participation factor. |
effectiveMass | f64 | Effective modal mass (kg). |
baseShear | f64 | Modal base shear (N). |
Time History
modal_time_history_analysis
Modal superposition time-history analysis using a ground-motion record.
Input: WasmTimeHistoryInput JSON
json
{
"model": { ... },
"record": [[0.0, 0.0], [0.01, 0.05], [0.02, -0.03]],
"direction": [1.0, 0.0, 0.0],
"damping_ratio": 0.05,
"n_modes": 6
}| Field | Type | Description |
|---|---|---|
model | WasmModel | Standard FEM model. |
record | [[f64, f64]] | Ground-motion pairs [time_s, acceleration_m_s2]. |
direction | [f64; 3] | Ground-motion direction vector. Default [1, 0, 0]. |
damping_ratio | f64 | Modal damping ratio. Default 0.05. |
n_modes | usize | Number of modes. Default 6. |
Output: WasmTimeHistoryResult JSON
json
{
"peak_displacements": [WasmNodeDisplacement],
"peakBaseShearX": 45000.0,
"peakBaseShearY": 1200.0,
"peakBaseShearZ": 0.0,
"n_modes": 6,
"n_steps": 200,
"dt": 0.01
}| Field | Type | Description |
|---|---|---|
peak_displacements | [WasmNodeDisplacement] | Peak absolute displacement per node. |
peakBaseShearX / peakBaseShearY / peakBaseShearZ | f64 | Peak global base shear (N). |
n_modes | usize | Modes actually used. |
n_steps | usize | Time steps analysed. |
dt | f64 | Average time step (s). |
Notes:
- Base shear computed by summing support reactions at restrained nodes.
- If the record has fewer than 2 points or mismatched lengths, returns
{"error": "Invalid ground motion record"}.
Influence Lines
influence_line
Returns influence-line ordinates for a single-span idealised beam.
Input: WasmInfluenceLineInput JSON
json
{
"span": 10.0,
"support_type": "SimplySupported",
"action": "moment",
"station": 0.5,
"n_points": 101
}| Field | Type | Description |
|---|---|---|
span | f64 | Beam span (m). |
support_type | String | "SimplySupported", "Cantilever", "FixedFixed", "FixedPinned". |
action | String | "moment", "shear", "reaction". |
station | f64 | Normalised position [0, 1] where action is measured. |
n_points | usize | Number of sample points. Default 101. |
Output: WasmInfluenceLineResult JSON
json
{
"action": "moment",
"station": 0.5,
"span": 10.0,
"support": "SimplySupported",
"positions": [0.0, 0.1, ..., 10.0],
"ordinates": [0.0, 0.09, ..., 0.0]
}| Field | Type | Description |
|---|---|---|
action | String | Echo of requested action. |
station | f64 | Normalised station. |
span | f64 | Echo of span. |
support | String | Echo of support type. |
positions | [f64] | Absolute x positions (m). |
ordinates | [f64] | Influence ordinates (dimensionless). |
Notes:
- For
"reaction",station < 0.5returns left-hand reaction line; otherwise right-hand. - Ordinates are signed; positive when a unit load increases the measured action.
moving_load_effect
Maximum and minimum effect of a vehicle crossing a span using the relevant influence line.
Input: WasmMovingLoadInput JSON
json
{
"span": 10.0,
"support_type": "SimplySupported",
"action": "moment",
"station": 0.5,
"n_points": 101,
"vehicle": {
"axle_weights": [10000.0, 10000.0],
"axle_spacings": [0.0, 4.0]
}
}| Field | Type | Description |
|---|---|---|
| (span, support_type, action, station, n_points) | Same as influence_line. | |
vehicle.axle_weights | [f64] | Axle forces (N). |
vehicle.axle_spacings | [f64] | Axle positions relative to first axle (m). |
Output: WasmMovingLoadResult JSON
json
{
"max_value": 125000.0,
"min_value": -25000.0,
"critical_position_max": 5.0,
"critical_position_min": 0.0
}| Field | Type | Description |
|---|---|---|
max_value / min_value | f64 | Maximum / minimum effect (N or N·m). |
critical_position_max / critical_position_min | f64 | First-axle position when extreme occurs (m). |
Notes:
- Vehicle is stepped across the span in increments determined by
n_points.
influence_line_continuous
Builds an influence line for a specific action in a continuous beam / frame by direct simulation (unit load stepping).
Input: WasmContinuousInfluenceLineInput JSON
json
{
"model": { ... },
"member_ids": [1, 2, 3],
"action": "moment",
"station_member": 2,
"station_local_x": 0.5,
"support_node": 0,
"n_points": 101
}| Field | Type | Description |
|---|---|---|
model | WasmModel | Standard FEM model. |
member_ids | [i32] | Ordered member IDs forming the continuous load path. |
action | String | "moment", "shear", "reaction". |
station_member | i32 | Member ID where ordinates are evaluated. |
station_local_x | f64 | Normalised position [0, 1] along station_member. |
support_node | i32 | Node ID for reaction actions. Default 0 (ignored). |
n_points | usize | Resolution along the total path. Default 101. |
Output: WasmContinuousInfluenceLineResult JSON
json
{
"action": "moment",
"station_member": 2,
"station_local_x": 0.5,
"total_length": 12.0,
"positions": [0.0, 0.12, ..., 12.0],
"ordinates": [0.0, 0.05, ...],
"support_reaction_node": null
}| Field | Type | Description |
|---|---|---|
action | String | Echo of action. |
station_member | i32 | Evaluation member. |
station_local_x | f64 | Evaluation position. |
total_length | f64 | Total path length (m). |
positions | [f64] | Load positions along path (m from start). |
ordinates | [f64] | Influence ordinates. |
support_reaction_node | i32 | null | Populated only for reaction actions. |
Notes:
- Runs a full static solve at every load position; keep
n_pointsmodest for large models. - Unit load is applied vertically in global
-Z.
Load Generation
generate_load_combinations
Generates factored load combinations from a set of load cases per AS/NZS 1170.
Input: WasmComboGenInput JSON
json
{
"load_cases": [WasmLoadCase],
"psi_l": 0.4,
"psi_c": 0.4,
"psi_s": 0.7
}| Field | Type | Description |
|---|---|---|
load_cases | [WasmLoadCase] | Load cases to combine. |
psi_l | f64 | Live load combination factor. Default 0.4. |
psi_c | f64 | Companion action factor. Default 0.4. |
psi_s | f64 | Snow load combination factor. Default 0.7. |
Output: WasmComboGenOutput JSON
json
{
"combinations": [WasmLoadCombination]
}as1170_wind_pressure
AS/NZS 1170.2 site wind pressure calculator.
Input: WasmWindInput JSON
json
{
"region": "B",
"terrain": "TC2",
"height": 10.0,
"return_period_factor": 1.0
}| Field | Type | Description |
|---|---|---|
region | String | "A", "B", "C", "D", "WN", "WO", "WP", "WS". |
terrain | String | "TC1", "TC2", "TC2.5", "TC3", "TC4" (or numeric equivalents). |
height | f64 | Structure height (m). |
return_period_factor | f64 | Return period multiplier. Default 1.0. |
Output: WasmWindResult JSON
json
{
"vR": 45.0,
"mZcat": 0.83,
"mC": 1.0,
"vDes": 37.4,
"q": 0.84e3,
"p": 0.84e3
}| Field | Type | Description |
|---|---|---|
vR | f64 | Regional wind speed (m/s). |
mZcat | f64 | Terrain/height multiplier. |
mC | f64 | Climate change multiplier (AS/NZS 1170.2 Table 3.3). |
vDes | f64 | Design wind speed (m/s). |
q | f64 | Dynamic pressure (Pa). |
p | f64 | Design wind pressure (Pa). |
as1170_snow_load
AS/NZS 1170.3 roof snow load calculator.
Input: WasmSnowInput JSON
json
{
"region": "Alpine",
"roof_pitch_deg": 15.0
}| Field | Type | Description |
|---|---|---|
region | String | Snow region name. |
roof_pitch_deg | f64 | Roof pitch (°). Default 0. |
Output: WasmSnowResult JSON
json
{
"s_0": 1.5e3,
"muI": 0.8,
"s": 1.2e3
}| Field | Type | Description |
|---|---|---|
s_0 | f64 | Ground snow load (Pa). |
muI | f64 | Roof shape coefficient. |
s | f64 | Design snow load (Pa). |
as1170_seismic_base_shear
AS 1170.4 seismic base shear calculator.
Input: WasmSeismicInput JSON
json
{
"zone": "II",
"soil": "C",
"period": 0.8,
"r_u": 1.0,
"s_p": 0.77,
"weight": 5000e3
}| Field | Type | Description |
|---|---|---|
zone | String | Seismic zone. |
soil | String | Soil class "A"-"E". |
period | f64 | Building period (s). |
r_u | f64 | Ductility-related factor. Default 1.0. |
s_p | f64 | Structural performance factor. Default 0.77. |
weight | f64 | Seismic weight (N). |
Output: WasmSeismicResult JSON
json
{
"c": 0.12,
"v": 600e3
}| Field | Type | Description |
|---|---|---|
c | f64 | Seismic coefficient V / W. |
v | f64 | Base shear (N). |
as4100_notional_force
AS 4100:2020 Cl 3.2.4 notional horizontal force at one floor level: 0.002 times the total design vertical load applied at that level, for multi-storey buildings only. It acts with the design dead and live loads only, for strength and serviceability, not for the stability limit state.
Input: WasmNotionalInput JSON
json
{
"total_gravity_load": 5000e3,
"multi_storey": true
}| Field | Type | Description |
|---|---|---|
total_gravity_load | f64 | Total design vertical load at the floor level (N). |
multi_storey | bool | Default true. false returns 0: the clause does not apply. |
adequately_braced | bool | Legacy, ignored (the 2020 edition has one factor). |
Output: WasmNotionalResult JSON
json
{ "force": 10e3 }| Field | Type | Description |
|---|---|---|
force | f64 | Notional horizontal force (N). |
Connections
shear_plate_check
Flexible end plate ("kind": "fep", ASI Design Guide 4) or web side plate / fin plate ("kind": "wsp", the default; ASI Design Guide 3) shear connection, each component to AS 4100:2020: weld, bolt group with ply bearing and tear-out, plate shear, plate block shear, beam web shear at the plate, beam shear, and for a web side plate the eccentric weld and bolt groups and plate bending; coped beams add cope bending and block shear. Cross-checked component by component against steelas over 416 ASI standard details (rust_solver/fem-core/tests/asi_shear_connection_differential.rs). SI units: lengths m, stresses Pa, forces N.
Input: WasmShearPlateInput JSON (main fields)
| Field | Type | Description |
|---|---|---|
kind | String | "wsp" (default) or "fep". |
v_star | f64 | Design shear (N). |
beam or beam_d / beam_bf / beam_tf / beam_tw / beam_fy / beam_fu | object / f64 | The supported beam, nested or flat. |
bolt_diameter, bolt_grade, threads_included | Bolts (default 8.8, threads included). | |
rows or bolt_count, cols, pitch, gauge | Bolt grid. | |
plate_b, plate_t, plate_fy, plate_fu | f64 | Plate. |
weld_leg, weld_fuw | f64 | Fillet weld. |
a_ev | f64 | Plate edge distance to the end bolts. |
s_g1, a_eh_beam, a | f64 | WSP: weld line to first bolt column, beam end distance, beam top to top bolt. |
Output: components (each with capacity, utilisation and clause), govUtil, govComponent, status, notes, phiVDes (least component capacity, N), governing, d_i and e (m).
ridge_tie_cleat_check
Ridge tie cleat: a plate hung under the rafter soffit with the longitudinal tie bolted through its web in a run going down the plate. Checked for the tie's axial force n_star (in the plate's plane, at the bolts' depth, so in-plane bending N e at the weld) and shear v_star, to AS 4100:2020: bolt shear (Cl 9.2.2.1), bearing and tear-out on the plate and the tie web (Cl 9.2.2.4), the plate at the weld in bending, shear and axial (Cl 5.2, 5.11.3, 9.1.9) and the fillets (Cl 9.6.3.10). SI in (m, Pa, N): bolt_diameter, bolt_grade, n_bolts, plate_b (the run along the soffit), plate_t, plate_fy, plate_fu, e (weld line to the bolt centroid), tie_tw, tie_fu, tie_end, weld_leg, weld_fuw. Out: util_bolt_shear, util_plate_bearing, util_tie_bearing, util_plate_bending, util_plate_shear, util_plate_axial, util_weld, util_max, governing.
bolt_capacity
AS 4100 Section 9 bolt and ply bearing capacity.
Input: WasmBoltInput JSON
json
{
"bolt_diameter": 0.02,
"bolt_grade": "8.8/S",
"shear_planes_threads_intercepted": 1,
"shear_planes_threads_excluded": 0,
"kr": 1.0,
"ply_thickness": 0.008,
"ply_fu": 450e6
}| Field | Type | Description |
|---|---|---|
bolt_diameter | f64 | Bolt diameter (m). |
bolt_grade | String | Grade string (e.g. "8.8/S"). |
shear_planes_threads_intercepted | i32 | Shear planes with threads in shear. |
shear_planes_threads_excluded | i32 | Shear planes with threads excluded. |
kr | f64 | Reduction factor. Default 1.0. |
ply_thickness | f64 | Ply thickness (m). |
ply_fu | f64 | Ply tensile strength (Pa). |
Output: WasmBoltResult JSON
json
{
"phiVf": 180e3,
"phiNtf": 250e3,
"phiVb": 120e3
}| Field | Type | Description |
|---|---|---|
phiVf | f64 | Design shear capacity per bolt (N). |
phiNtf | f64 | Design tension capacity per bolt (N). |
phiVb | f64 | Ply bearing capacity per bolt (N). |
weld_capacity
AS 4100 fillet weld shear capacity.
Input: WasmWeldInput JSON
json
{
"leg_size": 0.008,
"length": 0.15,
"fuw": 480.0,
"kr": 1.0
}| Field | Type | Description |
|---|---|---|
leg_size | f64 | Fillet weld leg size (m). |
length | f64 | Weld length (m). |
fuw | f64 | Weld metal ultimate strength (MPa). Default 480. |
kr | f64 | Reduction factor. Default 1.0. |
Output: WasmWeldResult JSON
json
{ "phiVw": 95e3 }| Field | Type | Description |
|---|---|---|
phiVw | f64 | Design weld shear capacity (N). |
base_plate_check
Base plate bearing and bending check.
Input: WasmBasePlateInput JSON
json
{
"n_star": 800e3,
"column_d": 0.25,
"column_bf": 0.15,
"plate_b": 0.4,
"plate_d": 0.5,
"plate_t": 0.02,
"concrete_fc": 32e6,
"plate_fy": 300e6,
"bolt_count": 4,
"bolt_diameter": 0.02,
"bolt_grade": "8.8/S"
}| Field | Type | Description |
|---|---|---|
n_star | f64 | Axial load (N). |
column_d / column_bf | f64 | Column depth and flange width (m). |
plate_b / plate_d / plate_t | f64 | Plate dimensions (m). |
concrete_fc | f64 | Concrete strength (Pa). |
plate_fy | f64 | Plate yield strength (Pa). |
bolt_count | i32 | Number of anchor bolts. Default 0. |
bolt_diameter | f64 | Bolt diameter (m). Default 0. |
bolt_grade | String | Bolt grade. Default "". |
Output: WasmBasePlateResult JSON
json
{
"n_star": 800e3,
"phiNcConc": 1200e3,
"bearing_pressure": 4e6,
"confinement": 1.2,
"phiPlateBending": 150e3,
"t_req": 0.018,
"util_bearing": 0.67,
"util_plate": 0.80,
"util_bolts": 0.0,
"util_max": 0.80,
"cantilever_d": 0.125,
"cantilever_b": 0.075,
"assumptions": { "phi_concrete": 0.6, "phi_steel": 0.9, "method": "bearing" }
}| Field | Type | Description |
|---|---|---|
n_star | f64 | Echo of axial load (N). |
phiNcConc | f64 | Concrete bearing capacity (N). |
bearing_pressure | f64 | Actual bearing pressure (Pa). |
confinement | f64 | Confinement factor. |
phiPlateBending | f64 | Plate bending capacity (N·m/m). |
t_req | f64 | Required plate thickness (m). |
util_bearing / util_plate / util_bolts / util_max | f64 | Utilisations. |
cantilever_d / cantilever_b | f64 | Cantilever overhangs from column face (m). |
assumptions | WasmBasePlateAssumptions | Factors and method used. |
Notes:
- Bolt diameter is converted
m → mminternally for the core lookup tables.
fin_plate_check
Fin-plate connection shear capacity check (bolts + plate + weld).
Input: WasmFinPlateInput JSON
json
{
"v_star": 150e3,
"bolt_diameter": 0.02,
"bolt_grade": "8.8/S",
"bolt_count": 4,
"plate_depth": 0.3,
"plate_thickness": 0.01,
"plate_fy": 300e6,
"plate_fu": 450e6,
"weld_leg_size": 0.006,
"weld_length": 0.3,
"weld_fuw": 480.0,
"end_distance": 0.04
}| Field | Type | Description |
|---|---|---|
v_star | f64 | Design shear (N). |
bolt_diameter | f64 | Bolt diameter (m). |
bolt_grade | String | Bolt grade. |
bolt_count | i32 | Number of bolts. |
plate_depth / plate_thickness | f64 | Plate dimensions (m). |
plate_fy / plate_fu | f64 | Plate yield / ultimate strengths (Pa). |
weld_leg_size / weld_length | f64 | Weld dimensions (m). |
weld_fuw | f64 | Weld metal strength (MPa). Default 480. |
end_distance | f64 | Bolt end distance (m). Default 0. |
Output: WasmFinPlateResult JSON
json
{
"v_star": 150e3,
"phiBolts": 720e3,
"phiPlateShear": 400e3,
"phiPlateBearing": 600e3,
"phiPlateTearout": 500e3,
"phiWeld": 380e3,
"phiVDes": 380e3,
"util_bolts": 0.21,
"util_plate_shear": 0.38,
"util_plate_bearing": 0.25,
"util_plate_tearout": 0.30,
"util_weld": 0.39,
"util_max": 0.39
}| Field | Type | Description |
|---|---|---|
v_star | f64 | Echo of design shear (N). |
phiBolts | f64 | Bolt group shear capacity (N). |
phiPlateShear | f64 | Plate shear capacity (N). |
phiPlateBearing | f64 | Plate bearing capacity (N). |
phiPlateTearout | f64 | Plate tear-out capacity (N). |
phiWeld | f64 | Weld capacity (N). |
phiVDes | f64 | Minimum of all capacities = design capacity (N). |
util_* / util_max | f64 | Utilisations. |
Notes:
- Lengths converted m→mm, stresses Pa→MPa internally.
- Capacities returned as forces (N).
end_plate_check
End-plate connection moment capacity check (bolts in tension + plate bending).
Input: WasmEndPlateInput JSON
json
{
"m_star": 80e3,
"beam_d": 0.5,
"beam_tf": 0.014,
"bolt_diameter": 0.024,
"bolt_grade": "8.8/S",
"bolt_count_tension": 4,
"plate_thickness": 0.02,
"plate_fy": 300e6
}| Field | Type | Description |
|---|---|---|
m_star | f64 | Design moment (N·m). |
beam_d / beam_tf | f64 | Beam depth and flange thickness (m). |
bolt_diameter | f64 | Bolt diameter (m). |
bolt_grade | String | Bolt grade. |
bolt_count_tension | i32 | Number of bolts in tension. |
plate_thickness | f64 | Plate thickness (m). |
plate_fy | f64 | Plate yield strength (Pa). |
Output: WasmEndPlateResult JSON
json
{
"m_star": 80e3,
"d_eff": 0.486,
"tStar": 165e3,
"phiBoltsTension": 720e3,
"phiPlateBending": 95e3,
"phiMDes": 85e3,
"util_bolts": 0.11,
"util_plate": 0.84,
"util_max": 0.84
}| Field | Type | Description |
|---|---|---|
m_star | f64 | Echo of design moment (N·m). |
d_eff | f64 | Effective lever arm (m). |
tStar | f64 | Tension force in bolt group (N). |
phiBoltsTension | f64 | Bolt tension capacity (N). |
phiPlateBending | f64 | Plate bending capacity (N·m). |
phiMDes | f64 | Design moment capacity (N·m). |
util_bolts / util_plate / util_max | f64 | Utilisations. |
Notes:
m_starconverted N·m → N·mm internally; returned values converted back to N·m.d_effuses(beam_d - beam_tf)with a 1 mm floor in mm units, so inputs must be in m.
weld_group_check
Eccentric weld group capacity by instantaneous centre of rotation method.
Input: WasmWeldGroupInput JSON
json
{
"segments": [
{ "x1": 0.0, "y1": 0.0, "x2": 0.0, "y2": 0.3, "legSize": 0.006 },
{ "x1": 0.0, "y1": 0.3, "x2": 0.2, "y2": 0.3, "legSize": 0.006 }
],
"fuw": 480.0,
"kr": 1.0,
"vx": 50e3,
"vy": 0.0,
"mz": 15e3
}| Field | Type | Description |
|---|---|---|
segments | [WasmWeldSegmentInput] | Weld segments in local coordinates (m). |
fuw | f64 | Weld metal strength (MPa). |
kr | f64 | Reduction factor. |
vx / vy | f64 | Applied shear forces (N). |
mz | f64 | Applied torsional moment (N·m). |
WasmWeldSegmentInput
| Field | Type | Description |
|---|---|---|
x1 / y1 / x2 / y2 | f64 | Segment end coordinates (m). |
legSize | f64 | Fillet weld leg size (m). |
Output: WasmWeldGroupResult JSON
json
{
"phiVtotal": 180e3,
"util_max": 0.83,
"governingSegment": 1,
"vPerMmGov": 350.0,
"phiVperMmGov": 420.0
}| Field | Type | Description |
|---|---|---|
phiVtotal | f64 | Total weld group capacity (N). |
util_max | f64 | Maximum segment utilisation. |
governingSegment | usize | 0-based index of critical segment. |
vPerMmGov | f64 | Resultant force per mm on governing segment (N/mm). |
phiVperMmGov | f64 | Capacity per mm on governing segment (N/mm). |
eccentric_bolt_group_check
Eccentric bolt group capacity by instantaneous centre of rotation method.
Input: WasmBoltGroupInput JSON
json
{
"bolts": [
{ "x": 0.0, "y": 0.0 },
{ "x": 0.1, "y": 0.0 }
],
"boltDiameter": 0.02,
"boltGrade": "8.8/S",
"nN": 1,
"nX": 1,
"kr": 1.0,
"vx": 50e3,
"vy": 0.0,
"mz": 15e3
}| Field | Type | Description |
|---|---|---|
bolts | [WasmBoltPositionInput] | Bolt positions in local coordinates (m). |
boltDiameter | f64 | Bolt diameter (m). |
boltGrade | String | Bolt grade. |
nN | i32 | Shear planes threads intercepted. |
nX | i32 | Shear planes threads excluded. |
kr | f64 | Reduction factor. |
vx / vy | f64 | Applied shear forces (N). |
mz | f64 | Applied torsional moment (N·m). |
WasmBoltPositionInput
| Field | Type | Description |
|---|---|---|
x / y | f64 | Bolt position (m). |
Output: WasmBoltGroupResult JSON
json
{
"phiVtotal": 320e3,
"util_max": 0.78,
"governingBolt": 1,
"vResultantGov": 90e3,
"phiVbolt": 115e3
}| Field | Type | Description |
|---|---|---|
phiVtotal | f64 | Total bolt group capacity (N). |
util_max | f64 | Maximum bolt utilisation. |
governingBolt | usize | 0-based index of critical bolt. |
vResultantGov | f64 | Resultant shear on governing bolt (N). |
phiVbolt | f64 | Single-bolt shear capacity (N). |
Section Properties
section_properties
Polygon section property calculator from arbitrary closed loops.
Input: WasmSectionBuilderInput JSON
json
{
"loops": [
[
{ "x": 0.0, "y": 0.0 },
{ "x": 0.1, "y": 0.0 },
{ "x": 0.1, "y": 0.2 },
{ "x": 0.0, "y": 0.2 }
]
]
}| Field | Type | Description |
|---|---|---|
loops | [[WasmPoint2]] | List of closed polygons (counter-clockwise = positive area). |
WasmPoint2
| Field | Type | Description |
|---|---|---|
x / y | f64 | Vertex coordinates (m). |
Output: WasmSectionBuilderResult JSON
json
{
"area": 0.02,
"cx": 0.05,
"cy": 0.1,
"Ixx": 6.67e-5,
"Iyy": 1.67e-5,
"Ixy": 0.0,
"I1": 6.67e-5,
"I2": 1.67e-5,
"thetaP": 0.0,
"Ip": 8.33e-5,
"Japprox": 3.33e-5,
"Jopen": 0.0,
"Zxapprox": 6.67e-4,
"Zyapprox": 3.33e-4,
"Sx": 0.0,
"Sy": 0.0,
"Asx": 0.0167,
"Asy": 0.0083,
"Iw": 0.0,
"rx": 0.0577,
"ry": 0.0289
}| Field | Type | Description |
|---|---|---|
area | f64 | Cross-sectional area (m²). |
cx / cy | f64 | Centroid (m). |
Ixx / Iyy | f64 | Second moments about centroidal axes (m⁴). |
Ixy | f64 | Product of inertia (m⁴). |
I1 / I2 | f64 | Principal moments of inertia (m⁴). |
thetaP | f64 | Principal angle (rad). |
Ip | f64 | Polar moment of inertia (m⁴). |
Japprox / Jopen | f64 | Approximate torsion constants (m⁴). |
Zxapprox / Zyapprox | f64 | Approximate elastic moduli (m³). |
Sx / Sy | f64 | Plastic moduli (m³). |
Asx / Asy | f64 | Shear areas (m²). |
Iw | f64 | Warping constant (m⁶). |
rx / ry | f64 | Radii of gyration (m). |
Import / Export
import_sg_model
Parses a legacy SpaceGass binary model file (.sg or .sgw) and returns a WasmModel JSON.
Signature: import_sg_model(bytes: &[u8]) -> String
Input: Raw binary byte array (not JSON).
Output: WasmModel JSON or {"error": "..."}.
Notes:
- Best-effort conversion: not all legacy features are supported.
- May lose plate data, advanced releases, or non-linear properties.
list_sg_entries
Lists the named entries (models / data sets) inside a SpaceGass binary file without fully parsing them.
Signature: list_sg_entries(bytes: &[u8]) -> String
Input: Raw binary byte array (not JSON).
Output: JSON array of entry descriptors or {"error": "..."}.
Merge (Phase 4)
merge_snapshots
Structural 3-way merge for collaborative editing. Merges two divergent model snapshots against a common base.
Signature: merge_snapshots(base_json: &str, ours_json: &str, theirs_json: &str) -> String
Input: Three JSON strings representing WasmModel-like snapshots.
Output: Merge result JSON
json
{
"merged": { ... },
"conflicts": [
{ "kind": "field", "entity": "nodes", "id": "n1", "field": "x", "base": 0, "ours": 5, "theirs": 10 }
],
"stats": {
"merged_clean": 42,
"conflicts": 1
}
}| Field | Type | Description |
|---|---|---|
merged | object | The merged model snapshot. |
conflicts | [object] | List of unresolvable conflicts with base/ours/theirs values. |
stats | object | Count of clean merges vs conflicts. |
Notes:
- When a conflict occurs, the merged output keeps the
basevalue. - Arrays of entities (nodes, members, etc.) are matched by
idfield.
Document generated from source: rust_solver/fem-wasm/src/lib.rs + report_exports.rsTotal documented exports: 55