Accessing Stress Range or Fatigue values in Grasshopper #1126
|
I am trying to get fatigue values for welds in grasshopper. I seem to be only able to get weld stress utilization from running the analysis. Is there any way to get values of the weld stress that i could use to estimate fatigue or even better fatigue values themselves. Any help on this is much appreciated. @DavidSapakIdeaStatica |
Replies: 2 comments 4 replies
|
please answer this!! I am struggling with the same issue at the moment |
|
Hi @langleyrex68-dot @sam-pollard @twgarmzoscar-glitch , thanks for raising this — great question. We investigated the API and the Grasshopper plugin and here is the full picture. Where the values areBoth tables you see in IDEA StatiCa Connection desktop app — Welds and Weld sections (fatigue) — are available through the API, but only via the raw results endpoint on the Calculation Controller: POST /projects/{projectId}/connections/rawresults-text The values map as follows: Welds table (
Weld sections table (
The stress diagrams (Normal stress / Shear stress charts in the app) are in Current Grasshopper supportWe are sorry, but we do not currently have a dedicated Grasshopper component that wraps this endpoint. The existing Workaround — Python Script component in GrasshopperAs a workaround you can use the GHPython Script component directly in Grasshopper. Here is a ready-to-use script: Inputs on the Python component:
import sys
import os
import json
if not project_path:
print("Please connect a project_path input")
else:
project_path = project_path.strip()
base_url = base_url.strip()
import ideastatica_connection_api
import ideastatica_connection_api.connection_api_service_attacher as attacher
with attacher.ConnectionApiServiceAttacher(base_url).create_api_client() as api_client:
# 1. Open project
api_client.project.open_project_from_filepath(project_path)
project_id = api_client.project.active_project_id
# 2. Switch connection to fatigue analysis type
connection = api_client.connection.get_connection(project_id, int(connection_id))
connection.analysis_type = "fatigues"
api_client.connection.update_connection(project_id, connection_id, connection)
# 3. Calculate
api_client.calculation.calculate(project_id, [int(connection_id)])
# 4. Get raw results
raw = api_client.calculation.get_raw_json_results(project_id, [int(connection_id)])
result = json.loads(raw[0])
# ── WELDS TABLE (fatigueWelds) ─────────────────────────────────────
welds_out = []
for key, w in result.get("fatigueWelds", {}).items():
welds_out.append({
"name": w.get("name"),
"joinedItem": w.get("joinedItemName"),
"length_mm": round(w.get("length", 0) * 1000, 1),
"sigmawf_MPa": round(w.get("sigmawf", 0) / 1e6, 1),
"tauxwf_MPa": round(w.get("tauxwf", 0) / 1e6, 1),
})
# ── WELD SECTIONS TABLE (fatigueChecks) ───────────────────────────
sections_out = []
for key, fc in result.get("fatigueChecks", {}).items():
sections_out.append({
"joinedItem": fc.get("joinedItemName"),
"length_mm": round(fc.get("length", 0) * 1000, 1),
"sigmaNormal_MPa": round(fc.get("normalStress", 0) / 1e6, 1),
"tau_MPa": round(fc.get("shearStress", 0) / 1e6, 1),
"tauMax_MPa": round(fc.get("shearStress2", 0) / 1e6, 1),
"sigma_MPa": round(fc.get("normalStress2", 0) / 1e6, 1),
})
# ── Outputs ────────────────────────────────────────────────────────
welds_table = json.dumps(welds_out, indent=2)
sections_table = json.dumps(sections_out, indent=2)
[Panel: base_url] ──┐
[Panel: project_path] ──┤→ [Python Script] → [Panel: welds_table]
[Panel: connection_id] ──┘ → [Panel: sections_table]No other components needed — the script handles opening the project, updating the analysis type, calculating, and parsing the results in one step. Could you confirm a few things so we can better support your use case:
We are tracking the missing dedicated Grasshopper component internally and your feedback helps us prioritize it. I am attaching RasResponse.json example, gh script with python component and ideaCon that can be used |


Hi @langleyrex68-dot @sam-pollard @twgarmzoscar-glitch , thanks for raising this — great question.
We investigated the API and the Grasshopper plugin and here is the full picture.
Where the values are
Both tables you see in IDEA StatiCa Connection desktop app — Welds and Weld sections (fatigue) — are available through the API, but only via the raw results endpoint on the Calculation Controller:
POST /projects/{projectId}/connections/rawresults-text
The values map as follows:
Welds table (
Check of welds for extreme load effect) →fatigueWeldsdictionary in the JSON response:sigmawftauxwftauxwf(opposite side entry)