validate_structure
Validates AI-generated geometry by performing structural analysis using Karamba3D, returning pass/fail status and improvement suggestions.
Instructions
Validates AI-generated geometry against Karamba3D structural analysis. Call this AFTER execute_rhino_script to verify the generated structure is buildable.
The bridge tries three analysis pathways in strict order of confidence and always tells you which one actually ran: analysis_method "api" — direct Karamba 3.1 API solve, confidence "high" analysis_method "template" — audited capsule GHX template, confidence "medium" analysis_method "rule_based" — heuristic span/slenderness rules, confidence "low" The verdict string names the method (e.g. "[RULE-BASED ESTIMATE, LOW CONFIDENCE] ..."). Treat rule_based/low results as estimates, NOT finite element analysis, and say so when reporting to the user.
If the structure FAILS, modify the design (add supports, increase member size, change material) and call execute_rhino_script + validate_structure again. When worst_member_guids is present, edit only those offending members instead of regenerating everything. Iterate up to 3 times before reporting the best attempt.
Args: guids: List of Rhino object GUID strings from execute_rhino_script output. structure_type: Analysis template to use. Options: "beam" — simple beam bending/deflection "truss" — axial force/buckling analysis "shell" — shell stress/displacement "frame" — moment/shear frame analysis "canopy" — cantilevered canopy "gridshell" — large deformation gridshell "membrane" — form-finding membrane "highrise" — high-rise structural systems load_kn: Applied load in kN (default 10.0). material: Material type: "Steel", "S355", "Concrete", "Wood", "Aluminium" (default "Steel"). Returns: JSON passed through untouched from the bridge. Top-level fields: status ("pass"|"fail"|"error"), passed (bool), verdict (text), suggestions, confidence ("high"|"medium"|"low"), warnings, and worst_member_guids (up to 5 Rhino GUIDs of the most over-utilized members — edit those first). The results object carries the numbers: max_deflection_mm, deflection_limit_mm, utilization_ratio, max_stress_mpa, yield_stress_mpa, span_m, analysis_method ("api"|"template"|"rule_based"), reactions_kn (total vertical reaction, api path only), and per_element_utilization — a list of {source_guids, utilization} entries (utilization 1.0 = at capacity) keyed back to the Rhino objects that produced each element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guids | Yes | ||
| load_kn | No | ||
| material | No | Steel | |
| structure_type | No | beam |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |