Changing Material

ClearCalcs offers users the ability to change from one material to another. Public documentation available here.

Supported Widget Types

Widget TypeSupported?Comments
inputYes
tableYesSame table shape
lookupNo
FAQ: Can you change between ASD & LRFD standards? Answer: Yes, however, lookups are not supported so the member selector will not be transferred.
Values are plainly copy-pasted from referenceId to matching referenceId with no consideration for widget units. If one widget asks for spacing in feet and the new material asks for spacing in inches, the new spacing will be off by a factor of 12.

Load Combinations

Philosophy

The way load combinations are implemented follows these principles:
  • The set of load combinations used is the same for an entire project
  • Load combinations can be set by users ONLY in Project Defaults, not overridden in individual sheets
  • We provide common sets of load combinations with user selection, plus custom options
  • All factoring of loads per load combinations happens in the solver
  • Load factors are split between project and template levels:
    • How to apply factors is defined on the project level
    • What values to apply is defined on the template level

Implementation Structure

Working from project level downwards:

Project Defaults

1

Hard-coding Load Types

loadTypesBase2: Currently hard-coded in Project DefaultscombConc2: Load types that should always be combined (e.g., distributed and concentrated live loads in AU/NZ)
2

Setting Load Combinations and Factors

LCs_str_type: Sets both the load combinations and how to apply factors
  • LCs_str2: Load combinations passed to solver in every sheet
  • LCFact_str2: Mappings for applying load combination factors
3

Default Factor Values

LCFact_type: Set of load combination factors (e.g., ψ factors in Eurocode)
  • Creates LCFact_* databases available to templates
4

Default Selections

Default category of imposed load - can be overridden in individual sheets

Template Level

Templates pass through or modify values from Project Defaults:
  • Passed unchanged: loadTypesBase2, combConc2, LCs_str2, LCFact_str2
  • Potentially modified: LCFact_DB - factor values can be overridden

Load Combination Factors Structure

Factor Values: LCFact_DB

{
  "S": [0, 0.7, 0.5, 0.3],  // Snow load factors
  "all_x": [0, 1.0, 0.9]     // Applied to all load types
}
The first item (index 0) is always ignored and set to 0. Think of index = 0 as meaning ‘don’t apply the factor’.

Application Instructions: LCFact_str

Array of length equal to number of load combinations:
{
  "S": [1, 0, 1, 1, 3, 0]  // Indices referring to LCFact_DB values
}

Data Linking Between Templates

Basic Load Linking

Load linking allows importing data from another calculation, commonly used for transferring beam reactions to column calculations.

Creating an Export

  1. Create a equation widget with table format ([[]])
  2. Check the “Export” box
  3. Set a unique referenceId
{
  "type": "computed",
  "result": "[[label, value1, value2]]",
  "export": true,
  "referenceId": "beamReactions"
}

Creating an Import

Create a table widget with matching columns and linkRow configuration:
{
  "type": "table",
  "linkRow": {
    "mappings": [
      {
        "sourceColumn": 0,
        "targetColumn": 0,
        "prependSheetName": true
      },
      {
        "sourceColumn": 1,
        "targetColumn": 1
      }
    ],
    "description": "Link to Beam Calculator",
    "referenceId": "beamReactions",
    "linkRequired": true,
    "sourceDataColumns": [
      {
        "label": "Label",
        "sorted": true
      }
    ]
  }
}

Advanced Linking

Print/Export Rules

Current Export Modes

  • Format: Single column with references for equation widgets
  • Widgets printed: All widgets
  • Order: JSON file order

Widget References & Standards API

Structured References Format

New referencesJSON field for direct linking to standards:
[
  {
    "id": "/api/standards/AISC/AS4100_2020_1/section/5.6.3",
    "name": "AS 4100:2020, Cl 5.6.3",
    "description": "Non-compact Sections"
  },
  {
    "id": "https://awc.org/publications/2018-nds-supplement/",
    "name": "NDS 2018 Supplement, Table 5B",
    "description": "Reference Design Values"
  }
]

URL Structure for Standards API

Pattern: /Authority/Standard/type/Type-reference/sub-type/Sub-type-reference Examples:
  • section/5-6-3 - Clause 5.6.3
  • table/5-6-3A - Table 5.6.3(A)
  • equation/9-2-2-4 - Equation reference

Markdown Support

Supported elements in widget descriptions:
ElementMarkdown Syntax
Bold**bold text**
Italic*italicized text*
Code`code`
Link[title](https://example.com)
Code BlockTriple backticks

Units System

Unit Types

  • units2: Default units (forces in kips for US)
  • unitsMks: Metric units (kN, mm, MPa, kPa)
  • unitsFps: Imperial units (forces in lb)

Non-Unit-Aware Features

The following features are NOT unit-aware and require extreme caution:
  • All diagram code - Must handle different unit conditions
  • Solver inputs/outputs - Units must be set manually
  • Upgrade mappings - No automatic unit conversion
  • Dynamic lookups - Units stripped from input tables
  • Change material - No unit consideration
  • Specific MathJS functions - Some functions incompatible with units

Template Headers

Essential header attributes:
{
  "name": "Template Name",
  "icon": "data:image/svg+xml;base64,...",
  "references": "AS4100:2020, AS1170.1",
  "templateShortName": "TB",
  "code": "timberBeam",
  "buildingStandard": "AU",
  "changelog": "Added new features",
  "updateSeverity": "feature",
  "strictnessLevel": 2,
  "enableTypedLinks": true
}

Presets

Presets provide quick access to common configurations:

User Presets

Available to all users with default values for typical designs (e.g., floor joists, ridge beams)

Test Only Presets

Internal testing presets visible with Shift+Click on “Add new calculation”

Preset Structure

{
  "code": "floorJoist",
  "name": "Floor Joist",
  "icon": "base64_image_data",
  "values": {
    "span": {
      "default": 3000,
      "mks": 3000,
      "fps": 10
    }
  }
}