Import & Export
File formats, interoperability with LBNL THERM, and built-in examples.
Native Format (.therm.json)
ThermX uses a JSON-based native format with the .therm.json extension. It stores the complete project state: regions with vertices and materials, boundary conditions with edge references, layers, groups, results display settings, and sheet layouts.
- File → Save — save the current project
- File → Open — load a previously saved project
The native format is human-readable JSON. You can inspect or programmatically generate .therm.json files with any text editor or script.
THMX (LBNL THERM Format)
ThermX provides full read/write support for the THMX file format used by LBNL THERM. This allows you to open existing THERM models and save files compatible with THERM.
Import
Go to File → Import THMX to open a .thmx file. ThermX parses:
- Materials — name, conductivity, emissivity (front/back), color (0xRRGGBB → #RRGGBB), category (solid/gas/insulation/glazing)
- Boundary Conditions — type (convective/fixed temp/adiabatic), film coefficient, temperature, radiation parameters
- Polygons — vertices, material assignment, polygon IDs
- BC Assignments — BCPolygon elements with PolygonID-based region lookup
- Mesh Control — mesh level settings
- Header — title, units, creator info
Export
Go to File → Export THMX to save. ThermX writes all spec attributes:
- Full header (Title, CreatedBy, Units, MeshControl)
- Materials with all 8 Property sub-elements for solids; gas materials with CavityModel
- BCs with full radiation/flag parameters
- Polygons with NSides, Type, units, vertices
- BCPolygon with PolygonID, EnclosureID, UFactorTag, Emissivity
- XML escaping for special characters in names
THMX files exported by ThermX can be opened in LBNL THERM 7.x and 8.x. Files from THERM can be imported into ThermX, including CMA (Component Modeling Approach) files for spacers and dividers.
DXF
Import
File → Import DXF reads AutoCAD DXF files and converts geometry entities (lines, polylines, closed polygons) into ThermX regions. Powered by the dxf-parser library.
Export
File → Export DXF produces an ASCII DXF file with organized layers:
- GEOMETRY — region outlines
- BOUNDARY_CONDITIONS — BC edge assignments
- ISOTHERMS — isotherm contour lines (if results available)
- LABELS — material names and annotations
DWG Import & Export
File → Import DWG reads AutoCAD DWG files directly using libopencad-rust compiled to WebAssembly. Entities (lines, polylines, circles, arcs, splines, ellipses) are converted to ThermX regions.
Supported Entity Types
- Line — Straight line segments
- Circle — Approximated as polygon (32+ segments)
- Arc — Approximated as line segments
- LWPOLYLINE/POLYLINE — Both 2D and 3D polylines
- Solid — Filled polygons (triangles/quads)
- Point — Vertex markers
- Ellipse — Approximated as polygons
- Spline — Approximated as polylines
- Text — Geometry only (no styles)
- RAY/XLINE — Infinite rays
Export
File → Export DWG generates AutoCAD DWG files with basic structure. Browser and desktop apps both use WebAssembly for consistent output. The exported files contain geometry and layer information compatible with AutoCAD 2000+.
DWG import and export work in both desktop and browser versions via WebAssembly. The 119KB WASM module runs entirely in the application — no external tools or dependencies required. Parser performance is 2-5x faster than pure JavaScript alternatives.
PNG Export
File → Export PNG captures the current canvas view as a PNG screenshot, including geometry, materials, mesh, temperature map, isotherms, and legends — whatever is currently visible.
PDF Export
PDF export is available from the Sheets tab. See Sheet Views & PDF for details. PDFs include vector text and lines with high-DPI viewport renders.
Import as Group
File → Import Group lets you load another .therm.json file and insert its regions as a new group within the current project. Useful for assembling complex models from reusable components (e.g., importing a spacer detail into a window frame model).
Built-in Examples
ThermX ships with example files accessible from File → Open Example:
| Example | Format | Description |
|---|---|---|
| Wall Section | .therm.json | Multi-layer wall with insulation |
| Window Frame | .therm.json | Window frame cross-section |
| Steel Stud Wall | .therm.json | Steel stud with thermal bridge |
| Balcony Thermal Bridge | .therm.json | Balcony connection detail |
| Divider CMA | .thmx | CMA divider for glazing systems |
| Spacer CMA | .thmx | CMA spacer bar detail |
| Sample Head CMA | .thmx | Window head section (CMA) |
| Sample Jamb CMA | .thmx | Window jamb section (CMA) |
| Sample Sill CMA | .thmx | Window sill section (CMA) |
File Format Summary
| Format | Import | Export | Notes |
|---|---|---|---|
.therm.json | ✓ | ✓ | Native format, full fidelity |
.thmx | ✓ | ✓ | LBNL THERM compatible |
.dxf | ✓ | ✓ | AutoCAD interchange |
.dwg | ✓ | ✓ | Browser & desktop via libopencad-rust WASM (119KB) |
.png | — | ✓ | Canvas screenshot |
.pdf | — | ✓ | Via Sheets tab |