Open Source · v1.5 · CC BY-SA 4.0

A type-safe language
for designing the physical world
via LLM

LLMs confuse millimeters with degrees and generate physically impossible objects. TCSL is a type-safe DSL that turns text into manufacturable 3D models: the parser validates in 50 ms what an LLM fundamentally cannot guarantee.

62
Grammar rules
5
Dimensional types
32
Error codes
<50ms
Full validation
LLM confuses mm and inches — TCSL won’t compile·Length × Length = Area — checked before render·4 zones = 4 LLM generation phases·Zero deps — pure Python 3.11+·Furniture to aerospace — rules are pluggable·LLM confuses mm and inches — TCSL won’t compile·Length × Length = Area — checked before render·4 zones = 4 LLM generation phases·Zero deps — pure Python 3.11+·Furniture to aerospace — rules are pluggable
The Problem

Why LLMs fail at the
physical world

Six fundamental limitations, backed by peer-reviewed research. Each one is addressed by TCSL at the grammar level.

01

Numbers without physical meaning

For an LLM, 100 is just a token string — not 100 mm or 100 inches. A 2024 study by Foundation EGI showed ChatGPT generates a “floating tabletop” when asked to design a table — geometry looks plausible but is physically impossible.

arxiv.org/abs/2307.14377
02

Unit conversion errors

LLMs confuse millimeters, centimeters, and inches when generating CAD code. Foundation EGI (2025): “LLMs may mishandle unit conversions, oversimplify trade-offs, or miscalculate spatial relationships” — making them unreliable for tight-tolerance tasks.

foundationegi.com
03

No world model

Yann LeCun (Meta AI, 2025): “LLMs lack grounding in the physical world — they cannot build a world model truly grounded in physical reality.” The physical world is “high-dimensional and continuous”; LLMs operate on discrete tokens.

LeCun: World Models vs Word Models
04

3D hallucinations

The first systematic study of hallucinations in 3D-LLMs (2025) found models generate objects with self-intersections, holes, and impossible joints. Errors are visually undetectable until the manufacturing stage.

arxiv.org/abs/2502.15888
05

No manufacturability checks

LLMs produce geometrically “beautiful” shapes but never verify whether they can be built. The first systematic LLM×CAD survey (ACM CSUR, 2025) confirms: no existing system integrates manufacturing constraints into the generation loop.

arxiv.org/abs/2505.08137 — LLMs for CAD Survey
06

Spatial imagination failure

A 2026 survey of LLM reasoning failures found “models cannot mentally rotate or project 3D volumes”. This confirms: language-only training fundamentally lacks the representations needed for spatial engineering tasks.

arxiv.org/abs/2602.06176 — LLM Reasoning Failures
The Solution

How TCSL addresses each problem

The LLM remains the generator. TCSL is the contract between the generator and physical reality. The parser enforces it in 50 ms — no FreeCAD required.

→ Problem 01

Units are part of the type

100 is Scalar. 100 mm is Length. The L⁰–L³ type system is closed and checked statically. 732 mm + 45 deg → R001 — error before render.

→ Problem 02

17 units, longest-match lexer

mm, cm, m, in, ft + area + volume + angle. Units are reserved words. input mm = 5 → E008. Conversion logic lives in the parser, not in the LLM.

→ Problem 03

Dimensional algebra

Length × Length = Area. Area × Length = Volume. Volume × Length = E015. The physics is in the type system, not in the LLM’s “understanding.”

→ Problem 04

30 of 32 checks — static

The parser catches errors without running FreeCAD: types, zone ordering, operation arity, division by zero, negative dimensions, integer counts, export uniqueness.

→ Problem 05

export as — bridge to manufacturing

export panel as Bok_LDSP16mm_1 — the parser validates the name format. The cost estimator extracts material, thickness, part number. One line = two worlds.

→ Problem 06

32 codes — not “error”, but explanation

Not “type error.” Instead: “dimensional result exceeds L³ range.” Every code links to a spec page with a fix example. The LLM agent gets all errors in one pass and fixes them in a single iteration.

Related Work

The field agrees: language design matters

Independent research groups have reached the same conclusion: constraining LLM output through specialized DSLs dramatically improves CAD generation quality.

AIDL (2025)

A solver-aided hierarchical DSL for LLM-driven CAD. Published at Eurographics / Computer Graphics Forum. Key finding: “language design is a powerful complement to model training” for AI-human CAD tools.

arxiv.org/abs/2502.09819
CAD-Coder (NeurIPS 2025)

Text-to-CAD via CadQuery scripts with chain-of-thought and geometric reward. Achieved 100% valid syntax rate — but only for CadQuery, not for manufacturing-aware constraints.

NeurIPS 2025 Poster
TCSL v1.5 (2026)

Goes further: dimensional type safety (L⁰–L³ + Angle), 4-zone architecture, 32 error codes including manufacturing constraints, export names for cost estimation. Not just syntax — physics.

tcsl-lang.org/spec
Demo

~280 lines Python → 50 lines TCSL

A 732×550×900 mm cabinet with 4 drawers. Same 9 parts, same result — but every value is typed, every formula auto-recomputes.

TCSL v1.5
50 lines
# ZONE 1: INPUT — customer parameters
input total_width = 732 mm
input total_depth = 550 mm
input side_height = 900 mm
input board       = 16 mm
input num_drawers = 4

# ZONE 2: LET — derived calculations
let inner_width = total_width - 2 * board       # → 700 mm
let usable_h    = side_height - 2 * board       # → 868 mm
let drawer_step = usable_h / num_drawers         # → 217 mm

# ZONE 3: GEOMETRY — solid construction
left_side  = box(board, total_depth, side_height)
right_side = box(board, total_depth, side_height) |> translate(total_width-board, 0mm, 0mm)
bottom     = box(inner_width, total_depth, board) |> translate(board, 0mm, 0mm)

# ZONE 4: EXPORT — names for cost estimator
export left_side  as Bok_LDSP16mm_1
export right_side as Bok_LDSP16mm_2
export bottom     as Dno_LDSP16mm_1
5.6×
less code
100%
values carry units
auto
recompute on change
export
cost estimator names
Platform

TextToCAD — AI platform powered by TCSL

Describe a product in natural language → LLM generates TCSL → parser validates → FreeCAD builds → system outputs drawings, BOM, cost estimate. 30 seconds instead of 2–4 hours.

In plain English

Imagine you run a furniture shop. A customer says: “I want a cabinet, 2 meters tall, 80 centimeters wide, 16 mm chipboard, four shelves.” Today you hire a designer who spends 2–4 hours drawing it in CAD, then manually prepares CNC programs, a bill of materials, and a cost estimate. Any of those steps can introduce an error that only shows up on the shop floor — that’s scrap and lost money.

TextToCAD does the same in 30 seconds. You type what you need; the system generates a full 3D model, drawings, CNC code, materials list, and estimate. Not a “pretty picture” — an object that can actually be manufactured on specific equipment from specific materials.

Five key innovations

1

Physically literate language

In TCSL you can’t write just “100” — you must say 100 mm or 45 deg. No existing CAD language in the world enforces this. Confusing millimeters with degrees is physically impossible — the program won’t compile, like a grammatical error in natural language.

2

Manufacturability at generation time

A 1.2 m shelf from thin chipboard? Geometrically fine. In practice it sags. TextToCAD checks 15–35 manufacturing rules automatically and self-corrects the code. Like autocorrect that checks physics, not just spelling.

3

Three layers of error protection

First: syntax correctness (during generation). Second: geometric validity (no self-intersections, holes). Third: manufacturing feasibility (can it be cut, assembled, support load). No system in the world does all three together.

4

AI trained on manufacturability

Competitors define “good” as “looks like the right shape.” TextToCAD defines “good” as “can be built.” Manufacturability assessment is used for the first time as part of the reward function during AI training.

5

Unified engine: builds and validates

Usually 3D modeling and manufacturability checking are separate programs, separate stages, separate specialists. In TextToCAD everything is unified in the TKG v2 engine, which in half a second builds the model, understands which face is a shelf vs. a side panel, validates all rules, and returns the result.

39K
furniture companies (Russia alone)
2–4 h
manual design time
30 s
TextToCAD
×240
speedup
Scaling

Furniture is the proving ground.
The architecture is universal.

The core — TCSL and the TKG v2 engine — stays the same across industries. Only the rule sets change, plugged in modularly.

Case Furniture

Current — MVP

Cabinets, shelving, kitchens. Rules: “shelf must not deflect,” “holes on 32 mm grid,” chipboard/MDF/HDF thickness constraints. Cost estimator via export as.

Metal Fabrication

Next step

Welded frames, shelving, tube steel structures, sheet metal. Rules: K-factor for bending, flat patterns for laser, TRUMPF/AMADA programs. “500 kg rack, 5 shelves, 40×40 tube” → complete project.

Retail Fixtures

MVP exists

Display cases, reception desks, store shelving. On-site assembly maps, RAL paint specs, accessory BOMs.

Mechanical Engineering

2027

Turning, milling, drilling. Threads, fits (H7 tolerance = specific machining), ISO standards. The system generates not just shapes but machining awareness.

Aerospace & Defense

2028–2029

Titanium, composites, NURBS surfaces. Certification constraints, full digital traceability of every parameter. The strictest requirements.

Construction & BIM

Horizon

IFC export for Revit and equivalents. Building codes, structural engineering standards — but the same principle: describe → get a complete project.

Why this is feasible: the core is the same for all industries. For furniture: “shelf must not sag.” For metal: “bend radius ≥ 2× sheet thickness.” For mechanical: “H7 tolerance requires grinding.” Rules plug in modularly. Integration with any CAD package (KOMPAS-3D, SolidWorks, Fusion 360) uses the standard STEP format — no vendor lock-in.

TCSL Architecture

Four zones — one-way pipeline

INPUT
LET
GEOMETRY
EXPORT
01

INPUT

Customer

Typed literals only. Overridable via GUI/CLI/API.

02

LET

Engineer

Formulas. Auto-recompute. L⁰–L³ algebra checked statically.

03

GEOMETRY

Machine

23 functions. Pipeline |>. Constructors, transforms, booleans.

04

EXPORT

Cost Estimator

FreeCAD tree names. Format: Element_Material_Number.

“A language that can describe everything can guarantee nothing. A language that describes exactly what’s needed guarantees exactly what it promises.”

— TCSL Manifest, §VII

Read the full manifest — 10 principles, 5 commitments

A universal bridge between
human language and manufacturing

Not “a program for furniture.” A language for describing physical objects. Furniture is the proving ground. The goal: any industry where material becomes product.

62
rules
23
functions
5
types
17
units
5
enums
32
errors