Rename the project to FieldCraft

Crates fieldcraft-*, binaries fieldcraft and fieldcraft-cli, the .fieldcraft file (format tag
fieldcraft/1, manifest fieldcraft.json), FIELDCRAFT_* environment variables, the MCP server
name, egui widget ids (fc_*), the app icon document FieldCraft.icon and its generated family,
docs and licences. No compatibility shim: no files of the earlier name exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-13 23:51:40 -04:00
1 parent 9bc4e1b182
commit d5bd74570f
268 files changed
+1666 -1666

No files matched your search

@@ -1,26 +1,26 @@
# The `.modelcraft` file (format `modelcraft/1`)
# The `.fieldcraft` file (format `fieldcraft/1`)
A `.modelcraft` file holds one model: its definition, its mesh, the geometry it is built on and
the commands that built it. It is written and read by `modelcraft-io` (`write`, `read`; bytes in,
A `.fieldcraft` file holds one model: its definition, its mesh, the geometry it is built on and
the commands that built it. It is written and read by `fieldcraft-io` (`write`, `read`; bytes in,
bytes out, so the browser build uses the same code) and by the commands `file.save`,
`file.save_as` and `file.open`.
## Package
The file is a ZIP package with exactly four parts, in this order, all stored uncompressed (so any
unzip tool reads them: `unzip -p bracket.modelcraft model.json`):
unzip tool reads them: `unzip -p bracket.fieldcraft model.json`):
| Part | Content |
|---|---|
| `modelcraft.json` | Manifest: `format` (`"modelcraft/1"`), `generator` (`"ModelCraft 0.1.0"`), `geometry`, and `parts`: the byte size and SHA-256 of each other part. |
| `fieldcraft.json` | Manifest: `format` (`"fieldcraft/1"`), `generator` (`"FieldCraft 0.1.0"`), `geometry`, and `parts`: the byte size and SHA-256 of each other part. |
| `model.json` | The model definition: unit system, sets, materials, sections, reference points, couplings, boundary conditions, loads and steps. Pretty-printed JSON with a fixed key order (maps sorted by name), so a change shows as a line diff. Its form is the model's own JSON form, which commands take as parameters. |
| `mesh.bin` | Nodes, elements and geometry tags, binary (below). |
| `journal.json` | The commands that built the model, `[{"command": id, "params": {...}}, ...]`, one per line. It is a script `modelcraft-cli run` replays. |
| `journal.json` | The commands that built the model, `[{"command": id, "params": {...}}, ...]`, one per line. It is a script `fieldcraft-cli run` replays. |
The same model gives the same bytes on every platform: entry times are fixed (1980-01-01),
permissions are fixed, and every map is written in sorted order. To diff two versions with git,
add `*.modelcraft diff=modelcraft` to `.gitattributes` and
`git config diff.modelcraft.textconv "unzip -p"`; the definition and the journal show line by
add `*.fieldcraft diff=fieldcraft` to `.gitattributes` and
`git config diff.fieldcraft.textconv "unzip -p"`; the definition and the journal show line by
line, the mesh part as binary.
## Geometry
@@ -68,8 +68,8 @@ Every file is treated as hostile:
allocation is larger than the input.
- Only the four parts, each once. The ZIP CRC and the manifest's size and SHA-256 are checked for
every part.
- A `format` other than `modelcraft/1` is refused: a later `modelcraft/N` as a version error, any
other value as not a ModelCraft file. Unknown fields are errors.
- A `format` other than `fieldcraft/1` is refused: a later `fieldcraft/N` as a version error, any
other value as not a FieldCraft file. Unknown fields are errors.
- `mesh.bin`: counts are capped (50 million nodes and elements, one million entities) and checked
against the bytes present before anything is read; labels must ascend; unknown kinds and
trailing bytes are refused.
@@ -87,8 +87,8 @@ refused.
## Autosave and recovery
The desktop app autosaves every 30 seconds while there are unsaved changes, into the recovery
folder (`MODELCRAFT_RECOVERY_DIR`, else `ModelCraft/recovery` in the per-user data folder):
`<id>.modelcraft`, `<id>.json` (the model's own path, time, counts) and `<id>.lock`, held while
folder (`FIELDCRAFT_RECOVERY_DIR`, else `FieldCraft/recovery` in the per-user data folder):
`<id>.fieldcraft`, `<id>.json` (the model's own path, time, counts) and `<id>.lock`, held while
the app runs. Saving (or undoing back to the saved state) drops the autosave. After a crash, the
next launch reports the entries; `file.recovery.list` lists them, `file.recover` opens one as
unsaved work under its original path, and `file.recovery.discard` deletes them.
+5 -5
View File
@@ -1,8 +1,8 @@
# Face-tagged meshes (3MF with B-rep face tags)
Besides opening a `.solidcraft` design, geometry can enter ModelCraft as a triangulated boundary
Besides opening a `.solidcraft` design, geometry can enter FieldCraft as a triangulated boundary
surface written by another program, with each triangle tagged by the B-rep face it lies on.
ModelCraft reads it into a `SurfaceMesh` (`modelcraft_geometry::tagged_mesh`, command
FieldCraft reads it into a `SurfaceMesh` (`fieldcraft_geometry::tagged_mesh`, command
`geometry.import.mesh`) without involving the kernel.
## The format is SolidCraft's
@@ -20,10 +20,10 @@ in the SolidCraft repository. In short:
- Coordinates are written in shortest round-trip `f64` form, so they read back exactly.
- Within an object, either every triangle is tagged or none is.
ModelCraft follows that specification and does not extend it. Because the format is 3MF,
FieldCraft follows that specification and does not extend it. Because the format is 3MF,
untagged 3MF from any other program goes through the same reader, with one face per object.
## What ModelCraft's reader does
## What FieldCraft's reader does
- **Surfaces.** Every build item becomes one `TaggedSurface`: a `SurfaceMesh` with its name and
face count. Lengths are converted to millimetres from `unit`. The surface is named after its
@@ -42,7 +42,7 @@ untagged 3MF from any other program goes through the same reader, with one face
- Each part is at most 1 GB uncompressed, in at most 10 000 zip entries.
- At most 20 million vertices and 20 million triangles, counted over every placement.
- At most 10 000 build items, and XML nesting at most 256 deep.
- Coordinates must be finite and within ±10⁹ mm (`modelcraft_model::MAX_COORD`), both as read
- Coordinates must be finite and within ±10⁹ mm (`fieldcraft_model::MAX_COORD`), both as read
and once placed.
- Every vertex index must exist.
- **Errors.** Any violation is an error that names the problem. Nothing panics.