feat: user-defined physical materials stored in the design (#532) (#606)

A design can define its own physical materials (material.create, material.edit, material.delete): name, density and an optional look. They work everywhere built-in materials do: assignment, mass properties, colours and configuration cells. Stored in user_materials, an additive field under format 16. Un-ignores the #554 regression test. Fixes #532.

Co-authored-by: jonaswre <[email protected]>
This commit is contained in:
Jonas Wrede authored and GitHub committed 2026-10-13 04:47:23 -04:00
1 parent a2f31f683d
commit 14635e5d3a
13 files changed
+492 -37

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ with `preview: true`. Unsupported or mismatched caches are ignored. Browser open
still rebuilds synchronously.
The repository's `docs/design-container.md` describes limits and encoding details.
Current designs use format 16, including the font of sketch text, sheet metal corner relief shapes, sketch face anchors on cylinder caps, sketch axis
Current designs use format 16, including physical materials defined in the design, the font of sketch text, sheet metal corner relief shapes, sketch face anchors on cylinder caps, sketch axis
links, persistent
names from exact face history, exact planar shell-face anchors, persistent analytic offset boundary roles and
association profile references, durable sketch face anchors, periodic fit splines and versioned
+17 -4
View File
@@ -1,8 +1,8 @@
# Features
SolidCraft's commands by area, generated by `cargo xtask features` from the command registry (`solidcraft-cli commands`). **314 commands.** Every command runs the same way from the toolbar, a script, `solidcraft-cli exec <id> '<json>'`, the control channel and MCP; parameters are in the [command reference](book/src/reference/commands.md) (`cargo xtask book`). Status and plans: [ROADMAP](../ROADMAP.md).
SolidCraft's commands by area, generated by `cargo xtask features` from the command registry (`solidcraft-cli commands`). **322 commands.** Every command runs the same way from the toolbar, a script, `solidcraft-cli exec <id> '<json>'`, the control channel and MCP; parameters are in the [command reference](book/src/reference/commands.md) (`cargo xtask book`). Status and plans: [ROADMAP](../ROADMAP.md).
## Sketch (97)
## Sketch (98)
| Command | Id | Toolbar |
|---|---|---|
@@ -41,6 +41,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm
| Delete Sketch Entities | `sketch.delete` | – |
| Drag Sketch Point | `sketch.move_point` | – |
| Drag Sketch Geometry | `sketch.drag` | – |
| End Sketch Drag | `sketch.drag_end` | – |
| Move Dimension Text | `sketch.dimension_text` | – |
| Sketch Palette Options | `sketch.options` | – |
| Chain | `sketch.chain` | – |
@@ -58,7 +59,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm
| Control Point Spline (Degree 5) | `sketch.spline.control_point_5` | SKETCH › CREATE |
| Conic Curve | `sketch.conic` | SKETCH › CREATE |
| Blend Curve | `sketch.blend_curve` | SKETCH › MODIFY |
| Centerline | `sketch.centerline` | – |
| Centerline | `sketch.centerline` | SKETCH › CREATE |
| Text | `sketch.text` | SKETCH › CREATE |
| Edit Text | `sketch.edit_text` | – |
| Curvature | `sketch.constraint.curvature` | SKETCH › CONSTRAINTS |
@@ -364,6 +365,15 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm
| List Contact Sets | `contact.list` | – |
| Check Contact | `contact.check` | – |
## `diagnostics.*` (4)
| Command | Id | Toolbar |
|---|---|---|
| Crash Reports | `diagnostics.crash_reports` | – |
| Crash Report | `diagnostics.crash_report` | – |
| Delete Crash Reports | `diagnostics.crash_reports.clear` | – |
| Crash Test | `diagnostics.crash_test` | – |
## `document.*` (2)
| Command | Id | Toolbar |
@@ -398,12 +408,15 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm
|---|---|---|
| Delete Face | `face.delete` | SOLID › MODIFY |
## `material.*` (2)
## `material.*` (5)
| Command | Id | Toolbar |
|---|---|---|
| Physical Material | `material.assign` | SOLID › MODIFY |
| List Materials | `material.list` | – |
| New Physical Material | `material.create` | – |
| Edit Physical Material | `material.edit` | – |
| Delete Physical Material | `material.delete` | – |
## `mesh.*` (1)