Writing plugins#

OpenOHL has three plugin tiers (ADR-0003): WebAssembly components (stable interface, sandboxed, any language), Python (scripts, reports, import/export) and native Rust inside this repository.

Every plugin has an ohl-plugin.toml manifest:

[plugin]
name = "hello-wasm"
version = "0.1.0"
description = "Example plugin"
sdk = "0.3"                 # plugin interface version targeted
tier = "wasm"               # "wasm" or "python"
entry = "target/wasm32-wasip2/release/hello_wasm.wasm"
extension-points = []

[permissions]               # everything denied by default
network = false
filesystem = []

Table columns#

A plugin may add columns to the app's tables, declared in its manifest (any tier; nothing to implement):

[[column]]
table = "circuits"         # structures, sections, circuits (the Conductor
                           # paths table), systems, jumpers, alignments or routes
name = "insulation_level"  # unique in the plugin: letters, digits, _ -
title = "insulation level" # header (default: name)
help = "…"                 # shown on the header
values = ["low", "high"]   # a dropdown; none: typed
default = "high"           # shown, dimmed, where not set

The values are kept on the objects, in their fields under plugin.name (e.g. code.insulation_level; a circuit's on all its sections), saved with the project and in OHL XML (<field key value>). The plugin, or the check that belongs to it, reads them there. Without the plugin, a project keeps the values and the tables still show them in a column marked "(unused)", typed like text. A check plugin can declare a circuit's value its check needs this way (e.g. an insulation level read by the distance between conductors).

Help pages#

Built 2026-11-12, in active development (not approved yet). A plugin may ship its own user-guide pages in its folder, one per thing it provides and an overview, declared in its manifest (any tier; optional, all keys optional; interface version unchanged, 0.3):

[help]
overview = "docs/index.md"          # the plugin as a whole
design-code = "docs/cases.md"       # its weather and load cases

[help.check]                        # per check id (the `checks` it lists)
my-check = "docs/my-check.md"

[help.preset]                       # per rule preset name
"roads" = "docs/roads.html"

[help.column]                       # per [[column]] name
[help.sheet-template]               # per sheet template name
[help.class-scheme]                 # per class scheme name

A sheet template or class scheme the manifest names by file is named by its file name without the extension (as the applications list it).

  • Paths are inside the plugin's folder (as for entry; .. or an absolute path is refused when the manifest is read) and end in .md, .markdown, .html or .htm; an unknown key in [help] is refused. ohl plugin check lists help pages: N found and reports each page that is not there as an error. Install copies the whole folder, so the pages (and their pictures) travel with the plugin.
  • How they open: an HTML page opens in the browser as it is. A Markdown page is rendered (pulldown-cmark: tables, footnotes, heading anchors as the manual's book makes them) into a plain HTML page in ohl-plugin-help/ in the system's temporary folder, together with the other Markdown pages of its folder: a link to another .md page goes to its rendered page, a relative picture or file is read from the plugin's folder (a file:// link), anchors work. Nothing is fetched from the internet. A page is the plugin's own content, opened like any local web page: install only plugins you trust (as for their code).
  • Where they appear (OHL-Design): the window of a plugin's check (Distance between conductors, … under unequal wind: user guide (plugin) ↗ under 1 What it checks and 3 Rules); beside a chosen rule preset (every check window's Preset ▾ preview, the vegetation and safety-volume preset choosers); Line › Criteria › Design code (the design-code page and the overview, for the plugin chosen); the Plugin manager (Help ↗: the overview; pages…: every page declared). OHL-Structure's Plugin manager has Help ↗. No page declared: no button. ohl_plugins::help (HelpPages, HelpTopic, pages_of, viewable); ohl-app plugin_help.
  • Example: plugins/examples/hello-wasm ships docs/index.md (with a drawing) as its overview; the test plugin plugins/tests/code-presets a page for its preset trees. A page is written like the user guide's check pages (check pages, section 6): what it answers, how it works step by step, every parameter (unit, default, effect), what is conservative and what is not, the source of each rule.

Licence. The plugin interface (the WIT files in crates/ohl-plugins/wit/) and everything under plugins/ (the shared crate ohl-code-common, the design-code, example and test plugins) are under the Mozilla Public License 2.0: a plugin built on them may keep any licence, a closed one included. OpenOHL itself is under the AGPL-3.0-or-later (ADR-0011).

Start a plugin, check it, keep it working#

Built 2026-11-07, in active development (not approved yet); ADR-0012.

A plugin is built outside this repository from the interface files the program carries. Four commands:

ohl plugin points                              # the extension points and their worlds
ohl plugin new my-colours --kind wire-colours  # a new plugin's folder
cd my-colours
rustup target add wasm32-wasip2                # once
cargo build --release --target wasm32-wasip2
ohl plugin check .                             # as the applications will use it
ohl plugin wit wit                             # the interface files of this program, again

ohl plugin new NAME --kind KIND writes a folder (--out, default the name; new or empty) with the manifest, Cargo.toml (wit-bindgen, built on its own), the interface's WIT files in wit/, a README and a skeleton src/lib.rs that builds and passes the check: each function answers "nothing yet" until filled in. The kinds are minimal (the plugin world, no extension point) and each extension point:

Kind World What the applications ask it
design-code code-plugin weather and load cases from the user's parameter file
check check-plugin checks of the line (Checks menu), with their value tables
io io-plugin file formats to export the line to or import it from
terrain terrain-plugin terrain surfaces read from a file
project project-plugin whole projects read from another program's files
sheet-templates sheet-template-plugin sheet templates (or files named in the manifest)
wire-colours wire-colour-plugin a colour per wire group
system-styles system-style-plugin a colour, line codes and phase angles per system
member-capacity member-capacity-plugin member capacities by a design method
member-check member-check-plugin the member check of a structure by a design method: every member and load case in one call (Member checks)
field-presets field-preset-plugin cuts and places for the fields, and their reports

A plugin offering more than one point builds a world of its own that includes others, e.g. plugins/tests/wire-colours: include ohl:plugin/wire-colour-plugin@0.1.0; export ohl:plugin/system-styles@0.1.0;, and lists both points.

ohl plugin check DIR… reads the manifest (interface version, permissions, extension points it knows), finds the entry (or says to build it), loads the plugin in the world of each point it lists and calls each once with invented input, within the limits it is given: a design code generates from its own parameter template, a check lists its checks, wire colours and system styles answer one invented group or system, member capacities list their methods, sheet templates, plan sets and class schemes are read. It compares the exports with the points listed (an export no point names is never asked; a point without its export is an error) and the name and version describe gives with the manifest's. One line each, ok, warn or ERROR; the exit status is 1 when something is in error.

The interface version. A manifest's sdk = "0.3" is the interface version the plugin is built for; the host loads only its own (0.3) before 1.0. The WIT package keeps its name ohl:plugin@0.1.0, the name every import and export of a built plugin carries: it changes only with a breaking change, and is then made to match. Additions (a new interface, world, optional export, extension point or optional manifest key) keep 0.3, and a plugin built before loads unchanged. What counts as breaking, and how long older versions are loaded from 1.0: ADR-0012.

Kept working. crates/ohl-plugins/wit-frozen/0.3/ is a copy of interface 0.3, never edited; a test fails when the live interface drops or changes any of its types, functions or worlds' exports. crates/ohl-plugins/tests/compat-0.3/ holds one plugin of each world as built (tools/plugin_fixtures.sh, rebuilt only on purpose); a test loads each and checks it. The full check (tools/check.sh) also runs ohl plugin check on every plugin of the repository, and makes a plugin of every kind from its template, builds and checks it.

Where plugins are found, and the shared settings#

Both desktop applications — the line application ohl-design (OHL-Design) and OHL-Structure ohl-structure — list the plugins installed for the user (the line application's data folder, plugins/: eframe::storage_dir("OLS CAD"); the storage id keeps its name from before the rename to OpenOHL, so settings, recent files and plugins stay where they were) and those of the folders added. The folders and the plugins turned off are one settings file, settings.toml in that plugin folder (ohl_plugins::PluginSettings: folders, disabled; written through a temporary file renamed into place), read and written by both: a plugin added or turned off in one is so in the other.

What applies in OHL-Structure: design-code (Loads › Load cases from a design code…: its load cases become recipes taking the line's values); check is listed (member and joint code checks will be a structure world later); io plugins take the line's export model, not a structure (listed as not applicable); terrain, project and Python plugins are the line application's. See OHL-Structure.

WebAssembly plugins#

The interface is defined in WIT: crates/ohl-plugins/wit/plugin.wit and code.wit (ohl plugin wit DIR writes them). Start a new plugin with ohl plugin new (above). A Rust example lives in plugins/examples/hello-wasm:

rustup target add wasm32-wasip2
cd plugins/examples/hello-wasm && cargo build --release --target wasm32-wasip2
cargo run -p ohl-cli -- plugin info plugins/examples/hello-wasm

ohl plugin info DIR works for a plugin of any world: it loads the plugin in the world of each extension point its manifest lists (design-code: code-plugin, io, terrain, project, check; none of these: the minimal plugin world) and prints its describe (a check plugin, which has none, by its manifest), the world, the extension points, tier, interface version and entry file, then what else it offers: its formats (id, description, extension, importer or exporter), its checks, or the length of a design code's parameter template.

name         geojson
version      0.2.0
description  GeoJSON export (structures, wires) and import (structures)
world        io-plugin
extensions   io
tier         wasm
sdk          0.3
entry        plugins/examples/geojson/target/wasm32-wasip2/release/geojson.wasm
  format example-geojson: Structures and wires as GeoJSON features (line CRS) (.geojson, exporter)
  format geojson-structures: Structures from GeoJSON Point features (.geojson, importer)

Plugins run sandboxed — no file system, network, environment variables or standard I/O — with exit clauses on every call: a time limit (default 5 s; a runaway plugin is interrupted and reported as a timeout; the design codes bundled with OpenOHL 120 s, 2026-11-18) and a memory cap (default 256 MiB; the bundled codes 4 GiB; for all the plugin's memories together, not each; since 2026-10-26 also at most 64 instances, 16 memories and 64 tables of at most 2^20 elements in its store). plugins/tests/runaway is a deliberately endless plugin used to test this.

File-format plugins#

A plugin that adds import or export formats implements the io-plugin world of the same WIT file and lists the extension point io in its manifest:

extension-points = ["io"]
  • formats() lists its formats: id, description, extension and direction (exporter or importer).
  • export-model(format, model, options) receives the solved model as JSON and returns the file's bytes. The model is {"format": "ohl-export-model", "version": 1, "crs": …, "line": <line file>, "cases": [{"name", "summary", "wires": [{"section", "span", "circuit", "phase", "color", "system", "voltage_kv", "horizontal_tension_n", "max_tension_n", "sag_m", "points": [[x, y, z], …]}], "strings": [{"structure", "label", "by", "force_n", "swing_deg", "swing_across_deg", "swing_along_deg", "max_load_n", "max_swing_deg", "max_swing_across_deg", "max_swing_along_deg"}]}]} (coordinates in the line's coordinate system; jumpers have section jumper:<id> and no horizontal tension; tensions per wire, N; sag in m). strings lists each structure's string as solved in the case (once; by: the section that reported it, jumper:<id> for a jumper's helping string) with its limits — see String limits. Since line file version 15 (2026-11-11) a system of that line may carry highest_voltage_kv (kV, the user's highest operating voltage) and insulation_level ("low" / "high"; absent: high). They are not in the records of the wire-colours and system-styles interfaces (wire-group, system-info: unchanged, interface 0.3 — adding a record field would change the interface), and the fields lists there hold only the plugin's own columns as before: a plugin column named insulation_level is "<plugin>.insulation_level" among the system's (or section's) fields in the file, a different key from the line's own insulation_level.
  • import-file(format, data, options) returns a line file (JSON), which the host checks like any line file. When the user gives a line to update, it arrives as option into (its JSON).
  • Errors are returned as strings and shown to the user as the format's error.

plugins/examples/geojson is a complete example (GeoJSON export of structures and wires, format example-geojson so as not to replace the built-in geojson; structures imported from GeoJSON points). Its formats appear next to the built-in ones in ohl formats --plugin plugins/examples/geojson; see Import and export.

Terrain plugins#

A plugin that reads terrain surfaces implements the terrain-plugin world and lists the extension point terrain:

extension-points = ["terrain"]

# Large files: more than the default 5 s and 256 MiB per call (up to
# 600 s and 4 GiB). Since 2026-10-26 the user allows them once per plugin
# version in the plugin manager (until then the defaults apply).
[limits]
seconds = 60
memory-mib = 1024
  • formats() lists the formats it reads (direction importer).
  • import-surfaces(format, data, options) returns surfaces: a name, the points as x0, y0, z0, x1, … (metres, x east, y north, z up) and the triangles as three point indices each. The host checks them like any mesh and keeps them in the project.

plugins/examples/esri-grid reads ESRI ASCII grids (.asc): a point per cell centre, two triangles per square of cells with data. Its format appears in ohl surface formats --plugin plugins/examples/esri-grid and in Terrain › Terrain surfaces once the plugin is installed or its folder added (Plugins › Plugin manager).

A plugin also suits formats that should not be in the open-source code — e.g. one read from a private specification — kept and installed only where it may be used.

Project plugins#

A plugin that reads another program's project files implements the project-plugin world and lists the extension point project (with [limits] for large files, as above):

  • formats() lists the formats it reads.
  • import-project(format, data, options) returns a project: the line as a line file (JSON), its library files (kind — cables, weather, loadcases, structures, insulators, rules, galloping, ambient, costs, poles, femodels, sections, bolts (2026-11-02; the interface carries the kind as a string, so a new kind needs no change of it) — name and TOML text, as OpenOHL writes them) and notes: what was read, what was left out, what was assumed. The host checks the line and creates a new project file with it and its libraries (File › New project from another program, ohl project import-from), and shows the notes.

plugins/examples/project-bundle reads a JSON bundle {"line": …, "libraries": [{"kind", "name", "text"}]} — the shape such a reader returns. Readers of formats that should stay out of the open-source code are installed only where they may be used.

Design-code plugins#

A plugin for a design code implements the code-plugin world (crates/ohl-plugins/wit/code.wit) and lists the extension point design-code:

extension-points = ["design-code"]
  • describe() returns its name, version, a one-line description and a parameters template: a TOML parameter file with its schema in comments and placeholder values.
  • generate(parameters) reads the user's parameter file (TOML text) and returns generated: weather-cases (an .ohlwc file's text), load-cases (an .ohllc file's text, each case naming one of those weather cases), notes (what was computed, assumed or left out) and clearance-presets (may be empty). A wrong file is an error string, shown to the user.
  • A clearance preset (clearance-preset) fills in a clearance window in one click: its name (unique among the plugin's), its measure (vertical or radial: the window), its rules — a clearance rule file's text (.ohlr, format ohl-clearance-rules: the rules with their classes, voltages, distances and, vertical, vertical_band (the zone's half width of each rule); [wind] steps and sides; [check] circuits, calculation method and search_distance) — and its weather-cases, an .ohlwc file's text with the cases its rules name.

The host (ohl_io::codes, WasmHost::load_code) checks the files as OpenOHL reads them before anything is written — each preset's rule file read (an error names it, <plugin>-<name>.ohlr), a rule of its measure, every weather case its rules name among its own, the names unique; ohl code generate and Criteria › Design code write them (the presets as <plugin>-<name>.ohlr and .ohlwc, in the project among its rule and weather case files). Plugin interface version 0.2 (sdk = "0.2") brought the presets: a plugin built for 0.1 must be rebuilt. Version 0.3 (2026-10-18) renamed the interface ols:plugin → ohl:plugin and the manifest ols-plugin.toml → ohl-plugin.toml (the old name no longer read since 2026-10-26): a plugin built for 0.2 must be rebuilt (its sources need the new package name only). A plugin ships no values of the standard: it implements the code's method, every number comes from the parameter file, and the template's numbers are invented placeholders, marked as such.

Wind factors for structures#

A design-code plugin may also implement the optional structure-wind interface: the code-wind-plugin world (include code-plugin; export structure-wind;), extension point design-code as before.

  • structure-wind(parameters) reads the same parameter file and returns none (the code gives no factors) or a cross-section library's text (.ohlsec, TOML) holding only a [wind] table: source (free text, shown with the results), drag (a factor per profile shape: equal_angle, unequal_angle, channel, i_section, rectangular_hollow, circular_hollow, round_bar, polygonal_hollow, general), face_drag (solidity, factor: a lattice face's drag by its solidity ratio) and shielding (solidity, optional spacing, factor: the factor on a face behind another by the front face's solidity ratio and the spacing ratio), and since 2026-11-15 inclination (per shape: angle — β in degrees between the wind and the member's normal, from 0 — and factor: the factor on an inclined member's force) and member_law ("inclination", or "sin2" for comparison) — then with version = 2 in the text (section library format 2) — each optional; a shape without a drag or an inclination curve takes the built-in SIA 261 values. See Cross-section library. The interface itself is unchanged: the new keys travel in the text, and a host before 2026-11-15 refuses a text using them (an unknown key). An error string is shown to the user, as for generate.
  • OpenOHL measures, the plugin gives the numbers: the faces of the lattice, their solidity ratios, which face is in front of which member and the spacing ratio are computed in OpenOHL (Wind on lattice structures); the plugin returns its code's tables, built from the parameter file (no values of a standard typed into the plugin).
  • The host (WasmHost::load_code) looks for the export (ohl:plugin/structure-wind@0.1.0): a plugin built without it loads and runs as before and gives none (WasmCodePlugin::structure_wind returns None). It checks the text as the cross-section library reads it, a [wind] table and nothing else (ohl_io::codes::check_structure_wind), and ohl code generate, Criteria › Design code and OHL-Structure's Load cases from a design code write it as <plugin>-wind.ohlsec into the cross-section library.
  • Backwards compatible: the interface version stays 0.3 (sdk = "0.3"): nothing a plugin of 0.3 implements changed, the export is only looked for. plugins/codes/* implement it as a stub returning none (ohl_code_common::no_structure_wind!()), so they say so; a plugin that has its code's factors replaces the stub with its own function.

Rule presets#

A design-code plugin may also implement the optional rule-presets interface (added 2026-10-20, interface version still 0.3): presets of any clearance rule set, not only the two clearance windows'. Worlds: code-rules-plugin (include code-wind-plugin; export rule-presets;) and code-check-rules-plugin (include code-check-plugin; export rule-presets;); extension point design-code as before.

  • rule-presets(parameters) returns a list of rule-preset records, or an error string. parameters is the user's parameter file (as generate reads it) or empty when the user gave none (the app's Preset dropdown without a parameter file chosen): a plugin whose presets come from its own data gives them anyway, one that needs the file says so in its error.
  • A rule-preset: name (unique among the plugin's rule presets), description (what it holds and the articles of the code, shown before it is loaded), rules — a clearance rule file's text (.ohlr, any targets: ground, points, same_line, other_lines; each distance a distance, { by_voltage = [[up to kV, distance], …] } or { base = …, per_kv = …, above_kv = … }; [wind] and [check] optional) — and weather-cases, an .ohlwc file's text with the cases its rules name (empty when they name none).
  • The host (WasmHost::load_code) instantiates the component once and looks for the export (ohl:plugin/rule-presets@0.1.0) apart from the others (its own binding, world rule-presets-export): a plugin built without it loads and generates as before, and WasmCodePlugin::rule_presets gives an empty list; has_rule_presets() says whether it is there (ohl plugin info lists the optional exports). ohl_io::codes::rule_presets and check_rule_presets check each preset as OpenOHL reads it (a rule file with at least one rule; its weather cases, when given; every case a rule or a case pair names among them; names unique).
  • Used by: the desktop application's rule tables, Preset (a dropdown) (the Clearances window and every check window with rules) (the enabled design-code plugins, read on a worker thread with the Design code window's parameter file; previewed; merged or replacing the rules, one command); ohl code rule-presets --plugin DIR [--params FILE] [--out DIR] (lists, writes <plugin>-rules-<name>.ohlr / .ohlwc); ohl code generate (writes them next to the weather case file).
  • Backwards compatible: nothing of 0.3 changed; plugins built before (any of code-plugin, code-wind-plugin, code-check-plugin) load unchanged (test plugin plugins/tests/code-old). plugins/codes/* are built for code-rules-plugin with a stub giving none (ohl_code_common::no_rule_presets!()); plugins/tests/code-presets gives one preset with invented values for the tests.

Vegetation presets#

A preset of the vegetation and danger-tree check is a rule preset (the same rule-presets export, nothing added to the interface) whose rules text carries a [vegetation] table — with or without [[rule]]s (a preset holding only [vegetation] is listed for the vegetation check only; see Presets per check). Hosts before 2026-10-20 refuse a preset without rules; plugins built before load unchanged and give none. What a plugin returns, per preset:

A preset of the wire tension check holds only [[tension_rule]] tables (and checks = ["tension"]), each naming the weather cases it applies to, given in the preset's weather-cases (2026-10-22: accepted without any [[rule]]; hosts before refuse it). A preset of the string check likewise holds only [[string_rule]] tables (and checks = ["strings"], 2026-10-24): the values a code asks the strings to respect (the rule's swing limits, the cases, the kinds and voltages); the strings' maximum load is their own.

  • name, description (the source of its values, shown in the dropdown's hover and the preview);

  • rules: a rule file's text (format = "ohl-clearance-rules", version = 1, a name) with, all keys optional (those given replace the panel's values, the others stay):

    [wind]                      # the wind steps of the check
    steps = true
    step = "100 Pa"
    sides = "both"              # both, left or right
    
    [vegetation]
    classes = [42, 43]          # LiDAR class numbers checked as vegetation
    clearance = { by_voltage = [[0, "2.5 m"], [20, "3 m"], [220, "7 m"], [380, "9 m"]] }
                                # or "5 m", or { base = …, per_kv = …, above_kv = … }
    fall_allowance = "2 m"      # A: the same forms
    root_ball = 0.05            # k
    fall_through_ground = false # the trunk turns on through the ground (default false)
    max_base_ground_distance = "5 m"
    search_distance = "50 m"
    growth_per_year = "0.3 m"
    years = 3
    buffer = "0.5 m"
    min_tree_height = "2 m"
    max_tree_height = "40 m"
    fall_in = true
    swing_arc = false
    cases = ["Veg hot", "Veg wind"]   # its weather cases (2026-10-21; `*` `?`)
    
  • weather-cases: an .ohlwc file's text with the cases the check runs in (e.g. a hot case and a warm windy one); empty: none. When the preset is applied, its cases are matched to the project's (below), those with no equal are created in the project's weather cases (one undoable change), and every case of the preset — the project's own where one is used — is ticked for the run.

Unknown keys are refused (as everywhere in a rule file). Distances are lengths ("9 m" or a number of metres); a table's rows are [up to kV, distance] with the voltages increasing. Read by ohl_clearance::rules::VegetationPreset (RuleSet::vegetation); checked by ohl_io::codes::check_rule_presets; listed by ohl code rule-presets (vegetation: classes …). The test plugin plugins/tests/code-presets returns one (trees, invented values).

plugins/codes/* are such plugins (EN 50341 with a national annex overlay, IEC 60826, NESC, CSA C22.3, ASCE MOP 74, GO 95); they share plugins/codes/common (reading parameter files, writing the case files, writing clearance presets — Preset, RuleFile —, the code_plugin! macro implementing the world). A plugin for the Swiss LeV exists separately; it is not part of the public code. See Design codes.

Presets per check#

A preset is per check (decided 2026-10-21): applying one brings only what that check needs, so one big preset may hold the rules of many checks in a row (dozens of rules, vertical and radial, any targets, each with its own cases) plus a [vegetation] table.

  • Which places list it: the vegetation panel those with a [vegetation] table; the Vertical clearances window those with a rule with a vertical distance; the Radial window those with a radial one; the Wire tensions window (2026-10-22) those with [[tension_rule]] tables, taking only those and the weather cases they name; the rule editor every preset. A rule file may declare its checks instead, at the top level (optional, additive; files without it are classified by content as above):

    checks = ["vertical", "radial", "vegetation", "tension", "strings"]
    

    (ohl_clearance::rules::PresetCheck, RuleSet::checks, RuleSet::is_for; an unknown name is refused; ohl code rule-presets prints for: ….)

  • What each takes (ohl-app preset_cases::Part): the Vertical window its vertical rules (those with both distances included), the Radial window its radial ones, each with [wind] and [check], and only the weather cases those rules name (cases, case_pairs, with * ?; a rule naming none uses the project's cases and needs none of the preset's); the vegetation panel its [vegetation] and [wind], no rule, and its own cases — [vegetation] cases when given (each must name one of the preset's cases), else the preset's cases no rule names, else (no rules) all; the rule editor every rule and the cases they name (not [vegetation]). No case only another check uses is created. The cases taken are then matched (below).

  • The previews group the rules by target (ground, LiDAR classes, the line's own wires, other lines) and give per rule the cases it uses, in the project's names.

Matching a preset's weather cases#

Wherever the desktop application applies a preset with weather cases — the rule tables' Preset dropdown (the Clearances window), the Vertical / Radial clearance windows (the project's preset files and the plugin presets), the vegetation panel — its cases are matched to the project's by physics first, then by name (decided 2026-10-21; ohl-app's preset_cases):

  • Equivalent (ohl_weather::WeatherCase::same_physics): the same wire temperature; the same ice — none on both (a thickness or a load of 0, any density), or both a thickness with the same thickness and density, or both a load with the same load and density (a density not given is glaze ice, 913 kg/m³); the same wind pressure, and with wind above 0 the same side (wind_from) and air density factor (not given equals only not given); the same ambient temperature (likewise). Numbers within 1e-6 relative to the larger value (absolute below 1, SI units, °C). Name, description and tags never matter. A thickness and a load are never equivalent (the weight of a thickness depends on the wire's diameter). Conditions (initial / final / creep) and per-span cases are not part of a weather case (they are the line's), so they are not compared.
  • A preset case equivalent to a project case uses it: the preset's rules are rewritten to name the project's case (cases, and each side of case_pairs; a * ? pattern matching a renamed case becomes the names it matched; other entries stay as written, comments kept), and it is not created. With several equivalent, the first in the project's order; the preview says which others are the same.
  • Only a case with no equivalent is created; one whose name the project gives to a non-equivalent case is created as "<name> (preset)" (then (preset 2), …), the rules naming it so.
  • Without a weather case file of its own (the model's still-air 15 °C case only), the project has nothing to match: the preset's file is used for the model, as before.
  • The previews list per preset case "uses your case X" / "creates Y".
  • The command line applies no preset to a project: ohl code rule-presets --out and ohl code generate write the preset files only.

Sheet template presets#

Added 2026-10-20 (built, in active development, not approved yet). Any plugin may offer sheet templates (Sheet templates): the page, title block with its logos, band rows, legend, key map, the styles of the line's kinds and roles — e.g. an authority's plan-submission layout and colour code. Two ways, either or both (extension point sheet-templates in the manifest):

  • Files, no code: the manifest lists .ohlsheet files inside the plugin's folder; their images are read next to them.

    [plugin]
    name = "my-sheets"
    version = "0.1.0"
    sdk = "0.3"
    tier = "wasm"
    entry = "my_sheets.wasm"      # need not exist for files only
    extension-points = ["sheet-templates"]
    
    [[sheet-template]]
    file = "templates/a1.ohlsheet"
    
    [[plan-set]]                   # 2026-10-24, optional
    file = "templates/submission.ohlset"
    

    A plan set (.ohlset, Drawings) lists drawings to make in one go — the sheets, the route, situation and phase plans — each with a template (by name: the plugin's own first), paper and scales; Plans & sheets › Plan set… offers the sets of the plugins in use.

  • Code: the optional export sheet-templates of plugin.wit (world sheet-template-plugin: describe and sheet-templates, or add export sheet-templates; to any world), additive to ohl:plugin@0.1.0 — the interface version stays 0.3, plugins built before load unchanged and give none:

    interface sheet-templates {
        record sheet-image { name: string, media-type: string, bytes: list<u8> }
        record sheet-template {
            name: string,          // unique in the plugin, e.g. "a1-standard"
            description: string,   // shown before it is chosen
            template: string,      // the .ohlsheet text (TOML)
            images: list<sheet-image>,  // the images it names
        }
        sheet-templates: func() -> result<list<sheet-template>, string>;
    }
    

The host (ohl_plugins::WasmHost::sheet_templates, found with discover_sheet_templates) looks for the export by name (ohl:plugin/sheet-templates@0.1.0, world sheet-templates-export), as for rule-presets. Each template is read with the same reader as a file (ohl_drawing::SheetTemplate::parse): one that does not read is shown with its error, the others are still offered. They are named PLUGIN/PRESET (ohl drawing --sheet-template PLUGIN/PRESET --plugin DIR, ohl sheet-templates --plugin DIR) and grouped by plugin in the export window's template list. Every key a preset may set is in examples/sheet-templates/example-a1.ohlsheet; an authority's colour code goes in [line_styles] (kinds: hv, lv, telecom, earth; kind_field and construction_field may name a column the plugin adds to the sections table, e.g. my-sheets.line_kind) and [roles] (existing, project, removal, decommissioned, other, or its own). The test plugin plugins/tests/sheet-presets gives one template from its code (an A1 with an SVG logo) and one from its manifest (invented values).

System styles#

Added 2026-10-27 (built, in active development, not approved yet). Next to the wire colours, a plugin may suggest styles of the line's electrical systems — its colour (used when wires are drawn by system), per phase the line code that tells the phases apart in that drawing and the phase angle — through the optional export system-styles (extension point system-styles; world system-style-plugin, or add export system-styles; to any world), additive to interface 0.3:

interface system-styles {
    record system-info {
        id: string, name: string, owner: string, number: string,
        voltage-kv: f64, frequency-hz: option<f64>, dc: bool,
        phases: list<string>,                  // labels, in order
        fields: list<tuple<string, string>>,   // the plugin's own columns
        sections: u32,
    }
    record phase-style { code: option<string>, angle-deg: option<f64> }
    record system-style { color: option<string>, phases: list<phase-style> }
    system-styles: func(systems: list<system-info>) -> result<list<system-style>, string>;
}

One style per system in the order given; a phase style per phase in its order (fewer: the rest left); none leaves a value as it is. The host (ohl_plugins::WasmHost::system_styles) refuses another length, a colour other than #rrggbb, a code of other than dots and dashes, an angle that is not finite. The same window (Line › Sections › Wire colours from a plugin…) shows them beside the wire colours; the systems' colours and line codes are applied when ticked (default), the phase angles only when ticked (off by default: they feed the electrical calculations) — all in one command with the wire colours. The test plugin plugins/tests/wire-colours gives both exports.

LiDAR class schemes#

Added 2026-10-27 (built, in active development, not approved yet). Any plugin may ship LiDAR class schemes (.ohlc, format ohl-lidar-classes: class numbers, names, roles, colours — e.g. a utility's survey standard), files only, no code:

[[class-scheme]]
file = "classes/survey-standard.ohlc"   # inside the plugin's folder

They are offered as From a plugin in File › Import › LiDAR points and in Class colours, read where they are (ohl_plugins::class_schemes; the app remembers the file chosen). A scheme that does not read is said there and never blocks the import (the standard classes then).

Wire colour presets#

Added 2026-10-27 (built, in active development, not approved yet). Any plugin may suggest wire colours: e.g. a utility's colour table, by owner, voltage, frequency and phase. Extension point wire-colours in the manifest, and the optional export wire-colours of plugin.wit (world wire-colour-plugin: describe and wire-colours, or add export wire-colours; to any world — e.g. an inline world that includes the plugin's own and adds it), additive to ohl:plugin@0.1.0: the interface version stays 0.3, plugins built before load unchanged and suggest none.

interface wire-colours {
    record wire-group {
        circuit: string,            // the circuit's name ("": none)
        phase: string,              // the phase label ("": none)
        system: option<string>,     // the electrical system; none: earthed
        system-name: string,
        owner: string,              // the system's owner (free text)
        number: string,             // its number in the owner's register
        voltage-kv: option<f64>,
        frequency-hz: option<f64>,
        dc: bool,
        fields: list<tuple<string, string>>,  // the plugin's own columns
        sections: u32,              // how many sections the group has
    }
    // One colour per group, in order: "#rrggbb", or none.
    wire-colours: func(groups: list<wire-group>) -> result<list<option<string>>, string>;
}

The host sends one group per circuit, phase and system of the line (crate::wire_colours::groups in the app). fields holds the values of the plugin's own table columns (Table columns) on the system and on the group's sections, by column name (the section's value when both give one): a plugin that needs to know more than the line holds (e.g. whether a circuit is the utility's, a partner's or a third party's) adds a column for it. Nothing is coloured on its own: Line › Sections › Wire colours from a plugin… shows each group with the colour suggested, for the sections without a colour of their own or every section, and Apply writes them as the sections' own colours (one command, undone as one). The host (ohl_plugins::WasmHost::wire_colours) looks for the export by name (ohl:plugin/wire-colours@0.1.0, world wire-colours-export); a list of another length, or a colour that is not #rrggbb, is refused with the plugin's name. The test plugin plugins/tests/wire-colours suggests colours from an invented table.

Check plugins#

Suggested weather (2026-10-27): a check plugin may also give the optional export check-weather (code.wit; looked for by the host on its own, a 0.3 plugin without it unchanged): for a check's id, a weather case to look for — temperature, wind pressure, with ice or not. The check's window, opened with no case chosen, ticks the project's case matching it (the same temperature within 0.5 °C and ice, the wind within 1 Pa; else the windiest of that temperature and ice; else as before, the windiest case).

A plugin that runs a check implements the check interface (crates/ohl-plugins/wit/code.wit: the check-plugin world, or code-check-plugin for a design-code plugin that also runs checks) and lists the extension point check. OpenOHL measures, the plugin holds the values and the rules: the measuring stays in OpenOHL (it is geometry, and fast), the code's numbers and its formulas stay out of it.

  • checks() lists the checks it runs: the id of what OpenOHL measures for it (today phase-distance, the distance between conductors in the span, and unequal-wind, the distance under unequal wind: one station per pair, d and β, no sag or string), its title and its Checks submenu (the app builds the Checks menu from the plugins in use: a check's entry is there only while its plugin is; a check OpenOHL does not measure for is listed, greyed), an explanation of the computation (shown in its window), its values file as shipped (TOML) with its extension, the choices made before a run (e.g. the k diagram), and the plugin columns of the circuits its window shows to be set there.
  • value-tables(check, values) shows a values file as tables (shown locked in the window, for transparency); edit-value(check, values, table, row, column, text) returns the file with that cell changed (an admin's edit, kept as the project's copy), or what is wrong.
  • evaluate(check, values, choices, pair, stations): for one pair of conductors (conductor-pair: same system, same span, each one's kV, plugin columns, diameter and mass, the mean height, the largest sags between spacers when spacers join them) and its stations (6 numbers each: distance — between the conductors' axes, as the codes define the phase distance, less the polylines' bounds — β, each local sag, each l_k), the numbers required at each station — the distance first, then the check's own (kept with the worst station) — and the rule applied.

The host (ohl_io::checks, WasmHost::load_check) measures (ohl_clearance::phase_distance), calls the plugin once per pair, one instance per core (WasmHost::another_check, compiled once), and keeps each pair's worst station and the length below — see Distance between conductors: the core's part. A national-code plugin kept outside the repository runs such a check. On an existing line (930 conductors, 5593 pairs) a plugin's check takes about as long as the same computation built into OpenOHL (0.8 s against 0.65–0.9 s; with nearby pairs, about 10 500, 0.9 s against 0.65–0.7 s), plus about 0.3 s to load the plugin once.

A check's reach#

Built 2026-11-20 (the country server's phase 10), in active development, not approved yet; an optional manifest key — an additive step of interface 0.3 (ADR-0012).

On a country server a user checks a working set (a part of a line); each check pulls in what lies within its reach — the plan distance from the checked wires within which other objects, of the same line or of other lines, can change its result (Checks on a working set). A plugin says its checks' reach in its manifest, optionally:

[reach]
default = 0.0                       # m, every check not named below
check = { "phase-distance" = 0.0 }  # m, per check id
  • 0: only what the working set holds — its sections and every section on its structures (enough for a check that looks at the conductors of one span, as the distance between conductors does).
  • A distance (up to 10 000 m): every wire within it, of this line and of others.
  • None declared (no [reach], or the check not named and no default): the most conservative default — the working set's whole line and every line within 2 km. A plugin built before keeps working unchanged; its checks on a working set's replica say "NOT ALL CHECKED: … no reach declared …" until it declares one.

A reach that is not a distance (negative, above 10 000 m, not a number) is refused when the manifest is read. OpenOHL reads it with ohl_plugins::Manifest::check_reach(id); ohl_scope::reach_of turns it into the reach the check pulls in by. A host before 2026-11-20 refuses a manifest with [reach] (every unknown key is refused): leave it out for older hosts.

Member capacities#

2026-10-27; built, in active development, not approved yet. A plugin may give member capacities by a design method through the optional export member-capacity (crates/ohl-plugins/wit/code.wit: the member-capacity-plugin world, or export ohl:plugin/member-capacity@0.1.0 beside another world; extension point member-capacity; additive to 0.3 — a plugin without it loads as before). The core has methods of its own (ASCE 10-97, the default, and SIA 263:2013 since 2026-11-03) and the simple check (theory); a plugin adds other codes. OpenOHL solves and computes the usage, the plugin gives the capacities:

  • methods(): its methods, each a name and a description.
  • member-capacities(method, strength, members): one result per member, in order. Each member-input carries the member's id and kind, its profile's shape and dimensions (m), area and second moments (y, z, minor principal), elastic moduli, E, f_y and f_u (Pa), length, k and lk, its design data as a TOML table (the keys of [member.design], SI numbers, the crossing partner by id — ohl_structures_fe::capacity::design_toml), its axial force and end moments in this load case, and the crossing partner's axial force. Each member-result gives a compression and a tension capacity (N, none: no capacity) with what governs each in words, and notes.
  • The host (WasmHost::member_capacity_methods, WasmHost::member_capacities) refuses a list of another length and a capacity that is not a positive number, naming the plugin. The core (ohl_structures_fe::capacity::capacity_inputs, check::member_usage_with) uses the capacities in place of its own method; a member's capacity_tension / capacity_compression still win; the notes appear per member in what governs.
  • ohl structures fe MODEL --capacity METHOD --capacity-plugin DIR uses it (the notes say "member capacities: method … of the plugin in …"); choosing a plugin method in OHL-Structure and OHL-Design: not yet.

The test plugin plugins/tests/member-capacity gives an invented method (area-yield: area × yield both ways, not a design code) to prove the interface (host test, CLI test).

Member checks#

Built 2026-11-11, in active development (not approved yet). Decision: "the code check should actually be moved out of the core in plugins that can access the infos they need. Same as for the rules in the clearances"; "Go ahead with the interface first once done we'll move the codes into plugins". The core's own methods (ASCE 10-97, the simple check) stay the default; this is the interface the codes move behind — SIA 263:2013 moved on 2026-11-18 (below), ASCE 10-97 follows.

A plugin checks the members of a structure through the optional export member-check (crates/ohl-plugins/wit/code.wit: the member-check-plugin world, or export ohl:plugin/member-check@0.1.0 beside another world; extension point member-check; additive to 0.3 — a plugin without it loads as before and gives none). Typed records only, SI units; the plugin sees nothing but these records.

  • methods() -> list<method-info>: the methods it gives (name, description).
  • check-members(method, check-input) -> result<list<member-result>, string>.

One call for the whole structure (check-input): the structure's name, whether the joint details are taken, the load cases (load-case: name, strength factor, self-weight factor) and every checked member (member) — a tower has thousands of members and dozens of cases, so never a call per member and case. A member carries:

  • its id, kind (truss, frame, cable, tension) and class (leg, bracing, redundant, crossing);
  • the section as the section library holds it: shape, dimensions by name, area, I_y, I_z, I_v, W_y, W_z; parts for a built-up member (not filled yet: always empty);
  • the material: E, f_y, f_u;
  • the system length, k, lk, the three length ratios, the crossing partner;
  • its own design data: end eccentricity and restraint flags, width/thickness, thickness, plies, connected leg, bolts (member-bolts), edge and end distances, spacing;
  • ends: each end's eccentricity and restraint as the core's own check would take them, with where they come from (given, design data, worked out, assumed);
  • connections (end-connection, with end-bolts carrying the bolt library's strengths): only when the structure is level 4 with joint_details on (check-input.joint-details); else empty;
  • forces: per load case the axial force, the twelve end forces (both ends, local axes), the crossing partner's axial force, slack.

What comes back per member (member-result, by id, any order): its capacities by name (value, what governs), its usages (one per load case: the usage with the case's strength factor applied, and the check that gives it), the governing check with its clause in words, notes, and not-safe: what is not on the safe side or not checked, in words.

The safe-side rule. The host refuses, naming the plugin, a result for a member or case that was not sent or given twice, a usage that is not a number or negative, a capacity that is not positive. A member the plugin returns nothing for, or a load case without a usage, is reported by OpenOHL as NOT CHECKED, NOT ON THE SAFE SIDE with no usage — never as passing — and counted in the results' notes. not-safe is shown with the member's result.

Choosing it. In a structure file (version 12) or a model file (version 5): [analysis] capacity = "plugin:<plugin>/<method>" — the plugin's name from its manifest and the method's name; in OHL-Structure, Design › Member cross-sections › capacities lists the installed plugins' methods. The plugin is looked for in Plugins/ beside the structure file, then in the user's plugin folder. Not installed, not built, or without that method: the run fails with a message naming the plugin and the method; no other method is used in its place. This holds for every runner (2026-11-11): OHL-Structure's run, ohl structures fe (a method given with --capacity replaces the file's) and the line's structure check (OHL-Design, ohl loads: the check of a structure whose plugin is not installed is refused, shown as failing with the message). The core alone (ohl-structures-fe, which runs no plugins) reports every member of such a file as NOT CHECKED, NOT ON THE SAFE SIDE; the line's check counts members without a result as not on the safe side and names them.

Host side. WasmHost::member_check_methods, WasmHost::check_members (ohl-plugins); the records are built and the results turned into the members' usage in the core crate ohl-member-check (the only place that knows both the model and the interface; ohl-structures-fe runs no plugins, ohl-plugins knows no model; the link re-exports it as ohl_structure_link::plugin_check). One call per structure with all its load cases, in every runner (ohl_member_check::check; calls() counts them for the tests): OHL-Structure's run keeps the solutions of its cases (solved in parallel) and calls once; ohl structures fe solves every case first; the line's structure check makes a first pass that only solves the structures a plugin checks, calls each placed structure's plugin once, and takes what it gave in the run itself. A built-up member's parts are filled (two angles or two channels, half the area each). What the core says about a member whatever method checks it — kept active, a crossing held only by the other diagonal (not on the safe side), eccentric ends — is appended to the plugin's result (ohl_structures_fe::check::with_remarks); what the plugin flags as not safe carries the core's mark [not on the safe side: …], so it is counted wherever such members are.

Joints and minimum distances (2026-11-11; built, in active development, not approved yet). Adding a function to the released member-check interface would break the plugins built against it, so the joints have their own two optional exports beside it (same package, code.wit; found by their export names, a plugin without them loads as before; the method names are member-check's):

  • joint-check — check-joints(method, joint-input) -> result<list<part-result>, string>: every planned part of every joint in one call, with every load case. A part is a member's bolt group in a plate or a splice's cover (kind = "bolts": bolt-group — count, diameter, hole, bolt strength, gauge lines, bolts per line, pitch, span, the distances from the bolts to the plate's edge along the force in tension and in compression and across it, the width a net section crosses with how it was taken — and plate-steel: thickness, f_y, f_u) or a weld between two plates (kind = "weld": fillet or full penetration, throat, length, angle, the lower f_y, the two thicknesses), with forces — one per load case: the member's axial force times the share the plate takes, or the resultant the weld carries — and OpenOHL's notes on its data. This is what the link's plate checks hand the core's own methods (plate_checks.rs: BoltGroup, PlateSteel, WeldInput). Back per part (by its number): the usage per case with the check and its clause, what governs, notes, what is not on the safe side.
  • bolt-distances — minimum-distances(method, distance-input) -> result<option<distances>, string>: from a bolt's diameter, the connected part's thickness and ultimate strength, the force per bolt, a sheared or rolled edge and whether the member is a redundant, the minimum end distance, spacing and edge distance with their clauses (and optionally the hole's diameter). The edge OpenOHL sends (ohl_structures_fe::bolt_rules::sheared_edge): the connection's rolled_edge where given; else, since 2026-11-26, a member's own leg of a rolled angle profile rolled, any other part (a plate) sheared.
  • bolt-distances-full (third round, 2026-11-18; additive, found by its export name, called before bolt-distances) — minimum-distances-full(method, distance-input) -> result<option<distances>, string>: bolt-distances' input with the end's bolts (bolts: count, shear planes, the given shear capacities through the threads and the shank, f_ub, whether the threads are in the shear plane, the grade), the analysis' force per bolt (analysis-force; none: no analysis) and the structure's parameter file (parameters); back the same minimums with the force per bolt they took (bolt-force) and where it comes from (force-basis). Without an analysis the plugin works out the bolt's own design shear capacity by its code — before, OpenOHL sent ASCE 10-97 4.3.2's for every code (the bundled asce10 since 2026-11-24 the smaller of it and the bolt's bearing cap in the part, 4.4). A plugin built without it is asked by bolt-distances as before (the analysis' force, else ASCE 10-97 4.3.2's bolt shear, said).

Never another code in their place. With a structure whose method is a plugin's: the plates', covers', welds' and bolt groups' rows come from its joint-check (ohl_structure_link::plate_usage_cases, one call per run); a plugin without that export, or one that fails, or a part or load case it returns nothing for: the row reads "NOT CHECKED by , NOT ON THE SAFE SIDE (a failure there would not be found): …" without a usage, the run's notes say it and the plates check lists the cases as not run — no silent ASCE 10-97. The bolt tools (Joint details, the bolt layout, the Detail view's tools) take their minimum distances from bolt-distances (ohl_member_check::joints::bolt_rules; asked once per different bolt and part in a session); without it there are none of the code's: the bolt tools keep the structure's default minimums (third round, 2026-11-18: [default_bolt_minimums], end and edge 1.5, spacing 3 bolt diameters to start with) and say "default minimum, assumed, not a code's … no minimum distances from : …; NOT ON THE SAFE SIDE where the code's own minimums would be larger". Member details' live Resistance shows the plugin's capacities, asked live without a load case (2026-11-18; before: "resistance: from after a run"), or "resistance: from …" with why there are none — never another code's values. ohl_structures_fe::bolt_rules::rules_in gives none for a model that names a plugin (the core has none of its rules). A model built from a file's text alone does not know its folder: the plugin is looked for in Plugins/ beside the structures opened or run in the session, then in the user's plugin folder (ohl_member_check::joints::installed).

The example. The example plugin gives both exports with invented round rules (bolts × diameter × thickness × f_u or width × thickness × f_y; throat × length × f_y; distances of 2, 4 and 2 diameters) — illustrations, not a design code, no standard's numbers. plugins/tests/member-check-only is a test plugin with the member check alone. Tests through the host (apps/structure/ohl-structure-link/src/plate_checks_tests.rs): the joint results in one call for two cases, the NOT CHECKED rows of the plugin without the export, the plugin's minimum distances in the bolt rules and a bolt pair breaking them, the resistance message.

The example of the member check. plugins/examples/member-check-example, method example-yield-euler: gross yield and Euler buckling from the lengths given — an illustration, not a design code; every result says so and is flagged not on the safe side. Tests (apps/structure/ohl-structure-tests/tests/plugin_member_check.rs): a truss checked end to end through the real host against hand values, the NOT CHECKED member, the not-installed message, one call for three cases, the connections of a level 4 structure reaching the plugin with the core's remark kept, the line's structure check (one call per placed structure); crates/ohl-cli/tests/structures_fe_capacity.rs (ohl structures fe); the capacities choice listing the method (ohl-structure-app, self_sufficient_tests.rs). They skip when the example is not built, and fail instead with OHL_REQUIRE_PLUGIN_TESTS set.

The full records, parameters, foot movements, bundled codes#

2026-11-18; built, in active development, not approved yet. Decided 2026-11-17: "yes go ahead with your recommendations" — the design codes move out of the core into plugins, SIA 263:2013 first. What the core's own check of a member reads is more than member-check's records carry (the section's allowable values, the profile's properties, the loads along the member, a bowed or kept-active tension-only member, the redundant-force check's braced member, the joints' ids and the legs the ends bolt onto). Records of a released interface cannot grow, so a further optional export carries them:

  • member-check-full (code.wit, found by its export name, its own records): check-members-full(method, full-input) -> result<full-output, string> and parameters-template(method) -> option<string>. full-input is check-input with, per member, its frame flag, the capacities given on it (capacity_tension, capacity_compression), its section (id, shape, dimensions, the library's given values, the profile's properties as OpenOHL works them out — area, centroid, I_y, I_z, I_yz, I_u, I_v, the principal angle, I_t, the shear centre, C_w, the elastic and plastic moduli —, area, I's, J, W's, E, G, f_y, f_u, the section's allowable tension, compression and moments), its two ends (the joint, the eccentricity and restraint with why, the joint detail with the leg it bolts onto and why its shear planes are so) and per case the forces with bowed, kept-active, the length, the loads along the member and braced (or braced-why); and the run's single-angle-moments, tension-compression, redundant-share and parameters. No load case: the capacities only (Member details, the solve's cap below). Back (full-output): the method in words for the run's note and per member its capacities (tension, compression, slenderness), per case a usage that may be empty (no capacity: the check says why) or infinite or not a number (failing, as the core's own methods report it; the host refuses only a negative one), what governs, notes (joints: …, limit: … for Member details), not-safe. A plugin with it is called by it instead of check-members.
  • member-check-bracing (2026-11-19, code.wit, additive: found by its export name; it takes member-check-full's records, the two bound together in the world member-check-bracing-export): check-members-bracing(method, full-input, list<member-bracing>) -> result<full-output, string>. Per member what braces it, no code's rule: its run (the members in line through their joints, each with where it lies along the run and which end comes first) and the run's bracing points (where, the joint, a support fixed in all three translations, and each member holding it — its id, its direction square to the run in the braced member's local y and z, whether it passes through: a crossing). The plugin applies its code's rules (which point holds which axis, a crossing's other diagonal by its force in the case, a bracing member strong enough); a member's own k, lk or length-ratios still win. OpenOHL calls it before check-members-full (ohl_member_check::full::check_full); a plugin without it is called as before. Both bundled plugins have it (ASCE 10-97, SIA 263).
  • member-check-default-bolts (2026-11-26, code.wit, additive: found by its export name; it takes member-check-full's and member-check-bracing's records, the three bound together in the world member-check-default-bolts-export; roadmap O19 stage 5, the decision of 2026-11-25): check-members-default-bolts(method, full-input, list<member-bracing>, list<default-bolt>) -> result<full-output, string>. As check-members-bracing, with the default bolt of each member whose data gives no bolts at either end (an angle profile, checked): default-bolt — the member's id, the library bolt's id ("" none), its diameter (none: no default), hole (none: the code's standard hole), source (leg: the largest bolt of the structure's bolt library the leg's usual gauge takes — one gauge line at mid-leg, the hole clear of the root fillet, the code's edge distance kept to the toe by the plugin's own bolt-distances without an analysis; structure: the structure's most used bolt, only where the first cannot be worked out; none: the leg takes no bolt of the library, or nothing gives one) and why in words for the member's result. A plugin that takes a hole in each leg of such a member until the bolts are known takes this bolt's hole after the member's own bolts at its other end and says where it came from (the why); with no diameter it keeps its own default and says OpenOHL's reason. OpenOHL calls it before check-members-bracing (ohl_member_check::full::check_full, the defaults from ohl_member_check::default_bolts); a plugin without it is called as before and keeps its own default (the bundled plugins before 2026-11-26: a 20 mm bolt). Both bundled plugins have it (ASCE 10-97, SIA 263).
  • member-limits (2026-11-27, code.wit, additive: found by its export name; it takes member-check-full's and member-check-bracing's records, the four member exports bound together in the world member-limits-export; roadmap O49, Request (2026-11-26): "there would be a basic choice and then plugins can adapt the values based on norms"): member-limits(method, full-input, list<member-bracing>) -> result<list<member-limit>, string>. The limits the code puts on its members' sizes that a usage does not hold (a compression member's slenderness, a leg's flat width to thickness, a member's least thickness), each worked out by the plugin's own rules: member-limit — the member's id, name (what is bounded, in words), value (the member's, as the code works it out), maximum and minimum (each optional, at least one given), compression (it holds only for a member compressed in a load case) and clause. No load case is sent; where a length depends on one (a crossing's other diagonal in tension) the plugin takes the longer. An empty list: no limit on these members (nothing checked). The host refuses a limit for a member not sent, without a name, with a value or bound that is not a number or with neither bound (ohl_plugins::member_limits, MEMBER_LIMITS_EXPORT, WasmHost::member_limits; ohl_member_check::limits::{limits, Limit, Limits}). Only OHL-Structure's member sizer uses it (theory); a plugin without it gives no limits and the sizer says so, NOT ON THE SAFE SIDE. Both bundled plugins have it (ASCE 10-97 3.3, 3.4, 3.7.1; SIA 263 4.5.1.7).
  • joint-check-groups (2026-11-19, code.wit, additive: found by its export name, its own records, world joint-check-groups-export; stage 4.5 of the joint details): check-joint-groups(method, group-input) -> result<list<group-result>, string>. Per group (holding: a gusset plate's bolts onto the leg holding it; bearing: every bolt onto one member at a joint) its plies (ply: the plate or the member — kind plate, member (an angle's leg, its toe rolled) or, since 2026-11-26, member-sheared (a member's toe its connection gives rolled_edge = false: a sheared edge; a plugin that does not know the word takes it as it takes any word other than member) —, its thickness, steel, redundant, whether its edges are known), its physical bolts (group-bolt: diameter, hole, the bolt's strength and shear capacities, grade, the planes its force is taken on — 1 where several parts' forces meet in it —, what it carries, where it lies) and per case and bolt its bolt-load: the size of its force (the vector sum OpenOHL worked out: the members' end forces of that case, each member's force shared by its own bolts, a plate's resultant and moment shared elastically) and per ply the distances from the bolt along the direction it pushes the ply to the edge (ends; none: no edge that way), square to it (sides) and to the next hole along it (ahead). No code's rule is in the forces; the plugin applies its code's bolt shear, bearing and distances to each bolt and gives back per group its usage per case (the most loaded bolt's), the governing check, notes and not-safe. The structure's parameter file is sent in group-input.parameters. A plugin without it: every group NOT CHECKED, NOT ON THE SAFE SIDE (ohl_member_check::joints::check_joint_groups). Both bundled plugins have it (theory).
  • joint-check-groups-tension (2026-11-19, code.wit, additive: found by its export name, world joint-check-groups-tension-export with joint-check-groups whose records it takes): check-joint-groups-tension(method, group-input, list<group-tension>) -> result<list<group-result>, string>. Per group with a bolt pulled in a case, group-tension: per bolt (bolt-tension) its library's tension capacity (its ultimate tensile load), the flanges it bends as it pulls (tee: the part, its thickness and yield strength, edge a from the bolt to the free edge, web b to the web's face, width w its length along the bolts the bolt takes) and the plies whose bending is not known (unknown, in words); per case and bolt its pull, N — the forces square to the plies and the moments out of their plane shared elastically about the bolts' centroid (no contact taken, each share as pulling: on the safe side). The plugin works out the prying (no code gives a method: the T-stub model of Struik and de Back, theory page), checks each bolt in tension and in shear and tension together by its code, and each flange's bending, and gives back per group what check-joint-groups gives. Called instead of check-joint-groups when a plugin has it (ohl_member_check::joints::check_joint_groups_tension); without it the bolts in tension are said not checked, NOT ON THE SAFE SIDE. Both bundled plugins have it (theory). A bolt's tension-capacity is its library's tension_capacity: its ultimate tensile load, F_u × A_s (decided 2026-11-19), not a design value.
  • joint-check-groups-prying (2026-11-19, the decision of that day; code.wit, additive: found by its export name, world joint-check-groups-prying-export with the two above whose records it takes): check-joint-groups-prying(method, group-input, list<group-prying>) -> result<list<group-result>, string>. As check-joint-groups-tension, each bolt (bolt-prying) with the gusset plates it bends besides the flanges: plates: list<tee> — a plate is a flange without a web (the pull reaches it through the bolts of the members on it, which hold it against no turning): edge a from the bolt to where the plate stops bearing on the leg under it (its outline or the leg's toe or heel), web b to the farthest bolt of a member pulling it, width w. The plugin takes the model's moment at the web as none (Eq. 17.8 of Kulak, Fisher & Struik with no moment at the web): Q = T b′/a′ and the plate's bending T b′ ≤ δ w t² f_y / 4 (its code's factor). Called first (ohl_member_check::joints::check_joint_groups_prying); a plugin without it gets check-joint-groups-tension with each plate among the plies whose bending is not known — said not worked out, NOT ON THE SAFE SIDE, as before. Both bundled plugins have it (theory).
  • joint-check-bends (decided 2026-11-19: a check of a bent plate's bend in the plugins; code.wit, additive: found by its export name, its records using joint-check-groups' load-case and group-result; the host binds it in the world joint-check-groups-prying-export, looked up on its own): check-bends(method, bend-input) -> result<list<group-result>, string>. Per bend (bend: id, joint, the two flats, the plate's thickness, f_y, f_u, the bend's length — the section's width —, its inside radius, the angle it turns through, whether either flat has a weld) and per case (bend-load) what OpenOHL works out on the section along the bend line, no code's rule in it: axial across the bend (tension positive), shear along it, moment about the bend line (each member's force across the bend times its line's distance out of the flat's middle plane, by size, plus the force across the bend turned by the bend's angle times the lever to the farthest bolt holding the other flat on the leg — on the safe side) and moment-in-plane about the section's middle (theory). The plugin applies its code (ASCE 10-97 3.13-1 with the gross elastic section and von Mises' criterion for the shear; SIA 263 4.3.5.4 (6) with the elastic stresses and 5.7.1.2 Table 14's radius) and gives a usage per case. Called by ohl_structure_link (bends::bend_rows, through ohl_member_check::joints::check_bends, one call with every bend and case); a plugin without it: the bend's row reads "NOT CHECKED by , NOT ON THE SAFE SIDE (a failure there would not be found): the bend's own bending — … has no check of a bent plate's bend", as before. Both bundled plugins have it.
  • joint-check-bends-eccentric (2026-11-29, roadmap O44 L34, decision 21 of that day: the bend's check takes the eccentricity of the angles bolted by one leg as its code takes it; code.wit, additive: found by its export name, its records using joint-check-bends' bend-input and joint-check-groups' group-result; the host binds it in the world joint-check-groups-prying-export, looked up on its own): check-bends-eccentric(method, bend-input, list<bend-eccentric>) -> result<list<group-result>, string>, the same call as check-bends with, per bend (bend-eccentric: id, moments), per load case the part of bend-load.moment that is the lap's eccentricity — the forces across the bend of the single angles bolted by one leg whose own check takes an eccentric connection, each times its line's distance out of the flat's middle plane, by size (N m; a bend left out, or a case beyond its list: none). The rest of moment is equilibrium and stays as check-bends takes it. The bundled plugins take that part on the plate only up to the yield of its section at the bend (a usage of 1, or that of the equilibrium parts alone where larger; NOT ON THE SAFE SIDE with its three parts on such a row) and cite where their code takes the eccentric connection in the member (ASCE 10-97 3.7.4.2, 3.10.2; SIA 263 5.4.1.2, 6.2.4.4, 6.3.5.2). Called by ohl_structure_link (bends::bend_rows, through ohl_member_check::joints::check_bends_eccentric, one call); a plugin without it (no change for it): called by check-bends with the whole moment as before — more severe —, the row saying so (theory). Both bundled plugins have it.
  • joint-check-welds (2026-11-25, roadmap O44 J7b, the decision of 2026-11-19: a weld gets its sides and their check; code.wit, additive: found by its export name, its records using joint-check-groups' load-case and group-result; the host binds it in the world joint-check-groups-prying-export, looked up on its own): check-welds(method, weld-input) -> result<list<group-result>, string>. Per weld (weld: id, joint, the two plates, kind, throat, length — given, the whole length welded, both fillets together when two; not given, the seam's —, length-given, sides — 1, one fillet on one side of the plate; 2, one on each side; none, not known —, angle, fy, thicknesses, OpenOHL's notes) and per case (weld-load) the force it carries and the moments of that force about it (in-plane along its length, out-of-plane about the seam's own line), as joint-check-moments sends them for a weld. The plugin checks the fillets by its code: SIA 263 (6.3.2.2, (87) and (88)) one fillet with its throat bent across by the moment about the seam (its root opened — an engineering model, elastic, on the safe side; 6.3.6.5 asks to avoid it, said), two fillets taking that moment as a couple across the thinner plate's thickness (a lever arm at least that: on the safe side), sides not known the worse of the two; ASCE 10-97 none (no weld rule, said). Called first by ohl_structure_link (plate_checks::weld_results, through ohl_member_check::joints::check_welds, one call with every weld and case); the welds it checks are then not sent to joint-check-moments. A plugin without it (no change for it): its welds go through joint-check-moments (or joint-check-full, joint-check) as before, and where the sides change the check — a moment about the seam, or a moment along a weld whose length is given and that is not said to be one fillet — OpenOHL adds to its row "NOT ON THE SAFE SIDE: the weld's sides not sent: the plugin … has no joint-check-welds — …" (theory). Both bundled plugins have it.
  • joint-check-groups-packing (2026-11-27, roadmap O49 stage 1c, the decision of that day: a second plate's own bolts through a packing checked as a bolt group of their own, a code's reduction for packings in the plugin; code.wit, additive: found by its export name, its records using joint-check-groups' group-input and group-result and joint-check-groups-prying's group-prying; the host binds it in the world joint-check-groups-prying-export, looked up on its own): check-joint-groups-packing(method, group-input, list<group-prying>, list<group-packing>) -> result<list<group-result>, string>, the same call as check-joint-groups-prying with, per group (group-packing: id, packings), each bolt's total thickness of packings in its grip, m (0: none; none: not known — the plugin says what it could not apply; an empty list: not known for any bolt; a group left out: not known). SIA 263 applies 6.2.2.5's β_p = 9 d/(8 d + 3 t_p) ≤ 1 above d/3; ASCE 10-97 has no rule (noted; a packing above d/3 said NOT ON THE SAFE SIDE). Called by ohl_structure_link (joint_groups::group_rows, through ohl_member_check::joints::check_joint_groups_packing, one call); a plugin without it: called by check-joint-groups-prying as before, and each group with a packing says "a … mm packing in its bolts' grip not sent (the plugin has no joint-check-groups-packing export) …" NOT ON THE SAFE SIDE (theory). Both bundled plugins have it.
  • Parameters (the design-code plugins' mechanism: the user's parameter file, TOML, the plugin's template): the structure's parameter file for a plugin is Plugins/<plugin>.toml beside the structure file (ohl_member_check::parameters), sent as text; none: the method's own values, said in its note. No file format changes. Since the second round (2026-11-18) the same file reaches the joint check — a further optional export joint-check-full, joint-check's records repeated with joint-input.parameters (check-joints-full; ohl_plugins::joint_check_full, called before joint-check by ohl_member_check::joints::check_joints) — and Member details (ohl_member_check::with_parameters: OHL-Structure passes the structure's folder, member_capacity_in, plate_plans_in, bolt_rules_in; the old forms without a folder take the method's own values, said). Since the safe-side items of the lattice towers (2026-11-18) a further export joint-check-moments repeats joint-check-full's records with, per part and case, what acts on it beside its force (part-moments: shear, in-plane, out-of-plane, normal — a weld's moments about it; a frame member's end shear and moments at its bolt group) and a bolt group's plate's free-length in compression; called first (check-joints-moments), a plugin without it gets joint-check-full and OpenOHL says on each part concerned that those were not sent (NOT ON THE SAFE SIDE). Since the third round (2026-11-18) it reaches the bolt tools' minimum distances too, through bolt-distances-full (the plugin's own bolt capacity: SIA 263's γ_M2), and OHL-Structure works Member details and the bolt tools out again when only that file changes (their caches keyed on its content).
  • Foot movements (ohl_member_check::Solved::moved): a case solved with the structure's measured foot movements is sent twice in the same call — as solved without them and on its moved feet (<case> (on its moved feet)) — and each member keeps the larger usage of the two (ohl_structures_fe::feet::larger_usage), as the core's own methods; for every plugin, built before or after (no interface change needed). OHL-Structure's run and the line's structure check keep both solves.
  • The solve's cap on a tension-only member's compression (its buckling load, capped by its design compression where lower): with a plugin's method, the plugin's own compression capacity, asked once without a load case when the plugin is found (ohl_member_check::prepare, Model::method_compression; ohl_structures_fe::check::design_compression) — before, ASCE 10-97's was taken in its place. Every runner finds the plugin before solving (OHL-Structure, ohl structures fe, and the line's Analyses::load, so its coupled solves and reference state take it too).
  • Bundled codes. [analysis] capacity = "sia263-2013" — the old name of the core's method — is an alias of the bundled plugin sia263's method sia263-2013 (ohl_structures_fe::model::BUNDLED_ALIASES; written back by its old name: no file is rewritten, no version raised). A bundled plugin is looked for in OpenOHL's own plugins/codes/<name> only (ohl_member_check::bundled_root: beside the program or above it — a package's folder, the source tree — else above the current folder), before and instead of any of the user's: no other plugin of that name can take its place. OHL-Design and OHL-Structure check it as they start (ohl_member_check::check_bundled): one that does not load is an error at start, and every structure naming it is refused with that message — never another code in its place. The packages ship it (tools/package-macos.sh, the release workflow): the manifest and its WebAssembly file at the path the manifest names, under plugins/codes/ beside the programs. The full check builds, lints and tests it (plugins/codes/*, its native tests). simple stays in the core; ASCE 10-97 (the default) follows in a second round; the pole codes stay in the core until a pole export exists. Second round (2026-11-18): ASCE 10-97, the default, is the bundled plugin asce10 (plugins/codes/asce10): "asce10-97" and no capacity at all are aliases of its method asce10-97; the core runs no design code any more — a model of a code solved without its plugin reports every member PLUGIN_NOT_RUN and caps its tension-only members by their Euler load only.
  • Time and memory of a bundled plugin. A plugin in OpenOHL's own plugins/codes (WasmHost::with_bundled_root, set by ohl_member_check::host) is given Limits::BUNDLED_CALL_TIMEOUT = 120 s and Limits::BUNDLED_MAX_MEMORY = 4 GiB a call; user plugins keep 5 s and 256 MiB (raised only as their manifest asks and the user allows). Measured (2026-11-18, a 10-core laptop, other builds running): the largest tower of the real-line comparison (3 030 members, its joint details at every end) took 11.7 s in one call with 91 load cases (100 asked, 9 refused by the solve), and a 2 926-member tower 0.18 s with 4 — after the host stopped working out each profile's properties again for every member (it took 9.9 s before, near twice the old 5 s); a call grows about linearly with members × cases, so 120 s leaves a margin of some ten times over 90 cases on the largest tower (some 900 cases, or 450 with foot movements, which send each case twice). The memory: that call did not fit 256 MiB (every member's forces and words of every case cross in one call).
  • Joints of a bundled code go through joint-check: the usage and the governing check are the core's as before; the joint panel shows the governing check only (the interface carries no per-check list) — the core showed every check of the part with its usage.
  • Interface version. All of this is additive (a new interface, a new world, optional exports): plugins built against 0.3 load and answer as before; the version stays 0.3 (ADR-0012: additive changes keep it; before 1.0 a raised minor would refuse every plugin built for 0.3).
  • Proof of the moves: crates/ohl-member-check/tests/sia263.rs (the shipped examples' 2 256 member results, bits and words, against those the core gave — by SIA 263 and by ASCE 10-97), SIA 263 theory, ASCE 10-97 theory.

Detailing practice#

2026-11-25, roadmap O44 L24; built, in active development, not approved yet. Approved 2026-11-24: making the joint layout's detailing rules pluggable as data, the engine that builds, checks and validates the layout staying in the program, with six design questions answered by their recommendations (built so, awaiting confirmation). A code plugin may give the detailing practice OHL-Structure's automatic joint layout follows — a shop's or a utility's preferences, as data. The layout engine, its clash checks, joint checks and the guard that no joint ends worse stay OpenOHL's: a practice only chooses among what the engine already does, and a plugin never certifies its own result.

The export. layout-practice (code.wit; optional, beside member-check, found by its export name: a plugin without it loads as before and gives none; world layout-practice-export, and for plugins built against the whole code interface structure-code-practice-plugin, which includes structure-code-plugin; additive to 0.3):

  • layout-practice(method, parameters) -> result<option<string>, string>: method is the structure's member-check method of this plugin ([analysis] capacity = "plugin:<plugin>/<method>", or the bundled default), parameters the text of the structure's parameter file for the plugin (Plugins/<plugin>.toml, "" none). Back: TOML text holding the same table as a structure file's [layout_practice], none (the default practice), or an error in words.
  • The host (WasmHost::layout_practice) refuses an empty text and one over 64 KiB, naming the plugin; ohl_member_check::joints::layout_practice asks once per plugin, method and parameter file in a session.

The table (TOML; every key optional — a key left out takes the default's value, which is the layout as it was before L24, so that an empty table lays out exactly as today):

format = "ohl-layout-practice"
version = 2                    # 1 without the plate thickness rules, 3 with
                               # limits.pull_in_line_deg (all three read)
name = "invented shop"         # shown with where it comes from
# The fabrication order: the five forms, each once, in the shop's order,
# each allowed (a word) or not ({ form = "…", allowed = false }); "direct"
# and "plate" always allowed. The layout's weighing keeps its rule (more
# ends, or as many on fewer plates); the order decides only ties — today
# a plate bent by a few degrees against one welded in the member's own
# plane. "bends" (several bends) is not built yet.
# (The default since 2026-11-29, O44 L34: welded not allowed —
# ["direct", "plate", "bend", "bends", { form = "welded", allowed = false }].)
fabrication = ["direct", "plate", "bend", "bends", "welded"]

[faces]
pattern = "diagonal-inner"     # or "later-class-first" (L10)
both_sides_of_flange = true    # members on either side of a leg's flange (L10)
both_faces_of_plate = true     # ends on both faces of one plate (L11)

[limits]
gap = "10 mm"                  # starting values of the Lay out joints window
pull_back = "300 mm"
shift = "30 mm"
flatness_deg = 2               # the most a leg may lie off and bolt flat
small_bend_deg = 20            # the most a plate is bent by (L3)
# pull_in_line_deg = 2         # (version 3; O44 L34) the most a light end's own
                               # line may run out of its flange's face and the
                               # end still be bolted flat, pulled in — default
                               # the flatness (2), 0 to 5; above it a plate
                               # bent by as much. Give it only where it is
                               # not 2: the practice is then at version 3.
own_plane_offset = "40 mm"     # a welded plate's axis offset (L20)

[plates]
bend_radius = 2                # inside radius, in plate thicknesses
between_least = 0.5            # least gap for a plate between angles (L15)
short = true                   # plates may stop short of the work point
# The plate thickness rules (O44 L29, 2026-11-26; version 2): a plate is the
# thinnest listed at least as thick as the thickest leg on it and the least,
# never thinner than that leg; none listed that thick: its ends by hand.
least_thickness = "0 mm"       # 0: none (0 to 50 mm); the default since 2026-11-29: "6 mm"
thicknesses = []               # the shop's stock, e.g. ["6 mm", "8 mm", "10 mm"]

[bolts]
count = 2                      # the picked bolt: bolts per end
lines = 1                      # gauge lines (1 only, for now)

# Per member class first (leg, bracing, redundant, crossing — the
# connection presets' classes): the picked bolt's pattern only, for now.
[classes.redundant.bolts]
count = 2

Where a run takes it from. The structure file's own [layout_practice] (structure file version 27) over the code plugin's answer, value by value (a sub-table key by key: the file's [layout_practice.limits] shift replaces only the plugin's shift; a list as one value), over the default. Lay out joints shows the practice in force, where it comes from and, for each value, whether it is the file's, the plugin's or the default. A run records the plugin's answer in the layout record ([generator.practice], source = "plugin:<plugin>/<method>"); an edit's follow and the estimated eccentricities lay the file's table over it as the run did, without asking the plugin.

OpenOHL checks every value (ohl_structure_link::practice): an unknown key, a value of the wrong kind or out of its range, a form missing or given twice, "direct" or "plate" not allowed, another value per class than the picked bolt's — each refused with what, why, what to give instead and whose table; a refused practice is not used (the default is), said in Lay out joints and in the run's notes. The core's checks are no values of a practice (the clash check, the code's distances, holes overlapping, the bend check, the NOT ON THE SAFE SIDE words). The ranges keep the layout on the safe side: the flatness 1° to 2° (never looser than the joint details' 2°); the shift up to 30 mm and the welded plate's axis offset up to 40 mm (what the estimated eccentricities take as their upper bounds, until J5); the bend radius at least one thickness (the plugins' bend checks check it against their code); the plate between angles at least half the thickest leg; 2 to 8 bolts in one line (one bolt is J8's, the codes' question). A practice only restricts what the engine tries (a switch off stays off); its numbers replace the program's.

The bundled asce10 and sia263 give none (a practice is a shop's, not a code's). The example plugin plugins/examples/member-check-example gives an invented one (no welding, plates always round the work point, a 20 mm shift, three bolts), read through the real host in apps/structure/ohl-structure-link/src/practice_tests.rs.

Field presets#

2026-10-31; built, in active development, not approved yet. Core extension points approved for a future building plugin (it finds the buildings near the line in the point cloud and the survey, decides where the magnetic and electric fields are needed, and exports 2D cuts and a summary). A plugin gives field presets — vertical cuts across the line and given points — through the optional export field-presets (crates/ohl-plugins/wit/plugin.wit: the field-preset-plugin world, or export ohl:plugin/field-presets@0.1.0 beside another world; extension point field-presets; additive to 0.3 — a plugin without it loads as before). The plugin stays a pure function: no host callbacks. The host gathers the points before the call, runs the field after it, and calls the plugin once more with the results.

What it asks for, in the manifest (unknown keys refused; lengths as numbers in m or with a unit):

[field-input]
roles = ["building"]          # LiDAR class roles, by the cloud's class scheme
ground-roles = ["ground"]     # thinned by the host: the lowest point per cell
ground-cell = "2 m"           # default 2 m
survey-codes = ["BLD*"]       # survey points' codes (`*`, `?`, any case)
reach = "100 m"               # within this of the spans in plan (default 100 m)
max-points = 2000000          # more is refused, said (default; at most 50 000 000)

The host (ohl_io::field_input::gather) reads the points of the roles and the ground roles within the reach of the spans (one pass of the point cloud, PointSource::visit with a corridor), the ground thinned to the lowest point per cell, and the survey points whose code matches; a role the cloud's class scheme (else ASPRS) does not have is an error naming it and the scheme; more points than max-points an error saying so. Without a cloud the roles give none (said). ohl_io::field_input::gather_classes is the same with the classes given instead of the roles (the host's tick lists, 2026-11-03).

The calls:

  • parameters-template(): the plugin's parameters as a TOML template (given back when the user gives none).
  • field-presets(input): input holds the parameters, the model (the export model JSON the exporters receive, ohl-export-model: the line and the case the field is run in), the points (input-point: x, y, z, the LiDAR class — 0 for a survey point — and a survey point's code and breakline) and the ground (x, y, z one after the other). It gives presets: each a name, a description, its cuts (cut: label, the alignment and the station along it — the plane perpendicular to the alignment there, at an angle point along the bisector, as OHL-Design's cross-section panels (2026-10-31: "cuts are made on the alignment"; the alignments are in the model's line.alignments, their points in line.alignment_points) — width to either side, height above the highest wire, step), its points (place: name, x, y and an elevation or a height above the ground), the isoline levels in µT and kV/m, building outlines (a ring in plan, ground and top; for its report) and notes.
  • report-cut(parameters, plan, preset, cut) (2026-11-02): one cut's report files (out-file: name, media type, bytes) and a summary (any text, the plugin's own) handed back to report; cut is the cut's document (ohl-field-cut JSON: its place, each field's grid and isolines, the line's name, the plan's points and sections along it, data model), plan the field plan template (ohl-field-plan JSON, its logos as data URIs; "" without one). Called once per cut, each call with its own time, so that a long line's results are never held at once (decided 2026-11-02: on a real line with 187 cuts the whole set was 110 MB, more than a plugin gets by default).
  • report(parameters, plan, preset, results, cuts): the report files besides the cuts', from the run's results without the cuts' grids (results: an ohl-field-results-set JSON, each cut with its span in place of its grids) and the cuts' summaries in their order; called once per run, after every report-cut. Changed in place on 2026-11-02 (the export came after the last release).

The host checks everything before it is used (ohl_plugins::field_presets::check_presets, check_files): unique, non-empty preset names; at most 1 000 cuts, each on an alignment of the line at a station within it (a line without one: said), width and step above 0 m, the height above the wires 0 m or more, labels unique; at most 4 000 000 cut points per preset, estimated before the run with 100 m from the ground to the highest wire (the real height is known only in the run); at most 100 000 points, names unique, coordinates finite, an elevation or a height of 0 m or more; levels above 0; outlines of three corners or more, finite, the top not below the ground; report files at most 1 000, named without a folder (no /, \, :, not starting with .), each once, a media type given. A failure is an error naming the plugin.

From the command line (ohl electrical magnetic, electric and fields — both fields in one run, one report —, analyses): --preset-plugin DIR [--params FILE] [--preset NAME] [--out DIR] [--cloud SPEC] gathers the input (the cloud of --cloud, else the project's; the survey points of --terrain), calls field-presets, adds the chosen preset's cuts (with their labels) and points to those given and its levels to --level, runs the field(s) as without it, then calls report-cut per cut and report once (the set split by ohl_electrical::field_results::split_set) and writes the files into --out (default: the current folder). With --plan FILE.ohlfp (a field plan template, data model) the host adds to each cut's document the points of the plan's classes within its band of the cut (ohl_io::field_cuts::cut_points, one pass over the cloud), a TIN along it (a project surface, else the field's ground) or a background drawing's 3D lines where they cross it (ohl_background::Drawing::plane_crossings), and hands the plan (FieldPlan::plugin_json) to both calls. ohl plugin info lists the export (optional exports: field-presets). In OHL-Design: Checks › Electrical › Buildings (fields)… (2026-11-02, user guide) calls field-presets only (2026-11-03): its points from the project's cloud of the classes ticked there (gather_classes, instead of the manifest's roles) and the survey file's points of the codes ticked; it hands the preset's cuts and places to the Magnetic field and Electric field windows, which run them. report and report-cut are called by the CLI only.

The test plugin plugins/tests/field-presets gives fixed, invented cuts and points for the synthetic double circuit (examples/electrical/double-circuit.ohl.json) and a report echoing their counts into one file (host tests, CLI test); its parameters ask for faults the host must refuse.

The example plugin plugins/examples/building-cuts (2026-10-31; built, in active development, not approved yet; user guide) is the building plugin: it clusters the building points (LiDAR role building, survey codes from its parameters) on a plan grid, draws footprints, heights and floors, and gives per building the governing cut, the nearest point's cut and the places of sensitive use — the cuts on the nearest alignment at the building's stations along it (its own copy of the core's plane rule, model::Alignment::plane_at; a line without an alignment: no cut, said); its report writes from one run's set buildings.csv (both fields' columns), points.csv, per cut a CSV grid and an SVG drawing per field, buildings.geojson and notes.txt. Its logic is plain Rust tested natively (cargo test in its folder: clustering, footprints, cuts, places, shuffle independence, a report of invented results); only src/wasm.rs touches the interface, compiled for wasm32 alone (the component's export names cannot be linked natively). Two things travel through the preset's notes because report receives only the parameters, the preset and the results: each building's summary (building B001: points 425; area 96.0 m²; centroid X Y; ground … m; eaves … m; roof … m; floors 3; span T1–T2; alignment main; stations A B m; axis … m; conductor … m) and each cut's wire crossings on its plane (cut LABEL: wire North L1 -5.00 414.92; …; wire EW 0.00 432.66 earth); the report reads them back. Its manifest asks for every survey point within 100 m (survey-codes = ["*"], the parameters choose the building and ground codes) and, for up to 2 000 000 points, more than the default limits ([limits] 60 s, 1 024 MiB; the reason in the manifest). The CLI test crates/ohl-cli/tests/building_cuts.rs runs both fields in one run (ohl electrical fields) on an invented point cloud and survey.

String limits: what a plugin sees#

A string may carry limits — the tension it is rated for and the swings it may take (String limits). Absent means not given: nothing checks it. Given, OpenOHL's String checks compare it with the solved string (since 2026-10-24), and a plugin (or a report, or a script) may check it too, where its rules need it. What it gets:

  • Export model (io plugins, export-model): the line holds every string with its own max_load (N), max_swing_deg, max_swing_across_deg, max_swing_along_deg (degrees) — structure types placed and the limits of the assembly a string names filled in where it gives none (absent keys: not given). Each case's strings gives, per string, the solved axial force force_n (whole bundle, tension positive), its swing swing_deg (from straight down), swing_across_deg and swing_along_deg (the angles of its projections on the structure's planes across and along the line, positive to the right and ahead), and its limits beside them as max_load_n, max_swing_deg, max_swing_across_deg, max_swing_along_deg (null: not given). A plugin compares, e.g. abs(swing_across_deg) > max_swing_across_deg. The format stays version 1: keys were only added.
  • Check plugins (check): the WIT records pass no strings (a check measures conductor pairs), so the interface is unchanged (still ohl:plugin@0.1.0); a check that needs the limits reads them from the line as above.
  • Rust (built-in checks, reports, the server): ohl_line::InsulatorString::limits() → StringLimits, Line::string_limits(structure, label), and next to each solved string solve::StringState::{force, limits, swing} and jumper::JumperStringShape::{force, limits, swing}; ohl_line::swing(orientation_deg, top, bottom) for any other position. Library side: InsulatorAssembly::limits(), TypeString::limits() (ohl_structures::InsulatorLimits).
  • Python: the line's JSON (the console's ohl module) carries the same max_* keys on its strings.

Python plugins#

Python plugins are scripts (tier = "python", entry the script). Outside the application they use the ohl module built from crates/ohl-py (package openohl); inside it, the Python console runs them (Plugins › Python console › Plugin scripts) with the ohl module of the application, which also reads and edits the open project (Python console). See plugins/examples/hello-python.

The desktop application embeds Python through its python feature (on by default): building it needs a shared Python 3.10+ (PYO3_PYTHON chooses which; a static one, such as Anaconda's, cannot be embedded). Without the feature (--no-default-features), the console says so.

View this page's source on GitHub