@constructorfleet/sketchforge-engine 1.32.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -1
- package/dist/apiErrors.d.ts +84 -0
- package/dist/apiErrors.d.ts.map +1 -0
- package/dist/apiErrors.js +292 -0
- package/dist/apiErrors.js.map +1 -0
- package/dist/apiParameters.d.ts +426 -0
- package/dist/apiParameters.d.ts.map +1 -0
- package/dist/apiParameters.js +144 -0
- package/dist/apiParameters.js.map +1 -0
- package/dist/apiShapeSummary.d.ts +128 -0
- package/dist/apiShapeSummary.d.ts.map +1 -0
- package/dist/apiShapeSummary.js +96 -0
- package/dist/apiShapeSummary.js.map +1 -0
- package/dist/apiSketchConstraints.d.ts +80 -0
- package/dist/apiSketchConstraints.d.ts.map +1 -0
- package/dist/apiSketchConstraints.js +59 -0
- package/dist/apiSketchConstraints.js.map +1 -0
- package/dist/domain/sketchforge.d.ts +31 -0
- package/dist/domain/sketchforge.d.ts.map +1 -1
- package/dist/editorHistory.d.ts +25 -4
- package/dist/editorHistory.d.ts.map +1 -1
- package/dist/editorHistory.js +75 -14
- package/dist/editorHistory.js.map +1 -1
- package/dist/engine.d.ts +105 -3
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +1281 -655
- package/dist/engine.js.map +1 -1
- package/dist/expressionBindings.d.ts +113 -0
- package/dist/expressionBindings.d.ts.map +1 -0
- package/dist/expressionBindings.js +353 -0
- package/dist/expressionBindings.js.map +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/parameterBindingPlan.d.ts +64 -0
- package/dist/parameterBindingPlan.d.ts.map +1 -0
- package/dist/parameterBindingPlan.js +138 -0
- package/dist/parameterBindingPlan.js.map +1 -0
- package/dist/parameterExpressions.d.ts +128 -0
- package/dist/parameterExpressions.d.ts.map +1 -0
- package/dist/parameterExpressions.js +666 -0
- package/dist/parameterExpressions.js.map +1 -0
- package/dist/parametricRecompute.d.ts.map +1 -1
- package/dist/parametricRecompute.js +25 -2
- package/dist/parametricRecompute.js.map +1 -1
- package/dist/projectParameters.d.ts +126 -0
- package/dist/projectParameters.d.ts.map +1 -0
- package/dist/projectParameters.js +534 -0
- package/dist/projectParameters.js.map +1 -0
- package/dist/revolveRequests.d.ts +1 -0
- package/dist/revolveRequests.d.ts.map +1 -1
- package/dist/revolveRequests.js +1 -0
- package/dist/revolveRequests.js.map +1 -1
- package/dist/sceneExport.d.ts.map +1 -1
- package/dist/sceneExport.js +3 -0
- package/dist/sceneExport.js.map +1 -1
- package/dist/serverProjectDocument.d.ts +7 -2
- package/dist/serverProjectDocument.d.ts.map +1 -1
- package/dist/serverProjectDocument.js +16 -1
- package/dist/serverProjectDocument.js.map +1 -1
- package/dist/serverShapeGroups.d.ts +5 -0
- package/dist/serverShapeGroups.d.ts.map +1 -1
- package/dist/serverShapeGroups.js +45 -0
- package/dist/serverShapeGroups.js.map +1 -1
- package/dist/shapeRequestExpressions.d.ts +31 -0
- package/dist/shapeRequestExpressions.d.ts.map +1 -0
- package/dist/shapeRequestExpressions.js +64 -0
- package/dist/shapeRequestExpressions.js.map +1 -0
- package/dist/shapeRequests.d.ts +1 -1
- package/dist/shapeRequests.d.ts.map +1 -1
- package/dist/shapeRequests.js +3 -1
- package/dist/shapeRequests.js.map +1 -1
- package/dist/sketchConstraintBindings.d.ts +131 -0
- package/dist/sketchConstraintBindings.d.ts.map +1 -0
- package/dist/sketchConstraintBindings.js +353 -0
- package/dist/sketchConstraintBindings.js.map +1 -0
- package/dist/sketchConstraints.d.ts +34 -0
- package/dist/sketchConstraints.d.ts.map +1 -0
- package/dist/sketchConstraints.js +919 -0
- package/dist/sketchConstraints.js.map +1 -0
- package/dist/skfProject.d.ts +41 -4
- package/dist/skfProject.d.ts.map +1 -1
- package/dist/skfProject.js +154 -16
- package/dist/skfProject.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ The package root is the supported import surface. Its main engine facade is `Eng
|
|
|
54
54
|
| Import and combine | `importMesh`, `cut`, `group`, `ungroup`, `separate`, `explode` | Import model files, subtract/group solids, split groups/bodies, or explode a retained STEP assembly. |
|
|
55
55
|
| Inspect and measure | `edges`, `faces`, `measurements`, `properties`, `measureBetween`, `interference` | Query exact geometry topology, shape properties, distances/angles, and gaps/overlaps. |
|
|
56
56
|
| Modify exact geometry | `treat`, `draftPrism`, `shell`, `changeShape` | Apply edge treatments, draft an extruded prism, retain bounded sketch face drafts, or hollow a shape. |
|
|
57
|
+
| Parameters and bindings | `addParameter`, `updateParameter`, `renameParameter`, `deleteParameter`, `bindShapeField` | Change the project parameter table and bind shape or feature fields to expressions; bound geometry is recomputed in the same write. |
|
|
57
58
|
|
|
58
59
|
These operations address an **existing project ID** in a `ProjectStore`; this package does not create projects, project records, or initialize a project directory. `addShapes` is the first write operation for a project that already exists. All writes persist to the configured store.
|
|
59
60
|
|
|
@@ -67,9 +68,127 @@ The main entry point also exports these API areas:
|
|
|
67
68
|
|
|
68
69
|
See the [generated TypeScript API reference](https://constructorfleet.github.io/SketchForge-3D/docs/reference/typescript-engine) for every symbol and declaration. The reference links back to this usage guide. Related documentation: [REST API](https://constructorfleet.github.io/SketchForge-3D/docs/REST_API), [project format](https://constructorfleet.github.io/SketchForge-3D/docs/SKF_PROJECT_FORMAT), and [TypeScript client](https://constructorfleet.github.io/SketchForge-3D/docs/packages/typescript-client).
|
|
69
70
|
|
|
71
|
+
## Parameter expressions
|
|
72
|
+
|
|
73
|
+
`evaluateExpression(expression, scope, expectedDimension)` evaluates a unit-aware expression and never throws. It returns `{ ok: true, value, dimension }` with the value in base units (millimetres for length, degrees for angle, mm² for area), or `{ ok: false, error: { code, message, span } }`.
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
import { evaluateExpression, resolveParameterTable } from "@constructorfleet/sketchforge-engine";
|
|
77
|
+
|
|
78
|
+
const table = resolveParameterTable([
|
|
79
|
+
{ name: "wall", expression: "0.1in" },
|
|
80
|
+
{ name: "outer", expression: "inner + 2 * wall", dimension: "length" },
|
|
81
|
+
{ name: "inner", expression: "20", dimension: "length" },
|
|
82
|
+
]);
|
|
83
|
+
console.log(table.scope.get("outer")?.value); // 25.08
|
|
84
|
+
console.log(evaluateExpression("wall * wall", table.scope, "length").ok); // false: an area
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- **Syntax:** `+ - * /`, unary minus, parentheses, parameter names, and numbers with an optional unit: `mm`, `cm`, `m`, `in`, `ft`, `deg`, `rad` (`10mm`, `10 mm`).
|
|
88
|
+
- **Functions:** `min`, `max`, `abs`, `sqrt`, `round`, `floor`, `ceil`, `sin`, `cos`, `tan`. Trig takes an angle. Rounding works on the base-unit value, so `floor(1in)` is 25 mm.
|
|
89
|
+
- **Dimensions:** length, angle and their products. `wall * 2` is a length, `wall * wall` is an area, `wall / wall` is unitless, and length plus angle is an error.
|
|
90
|
+
- **Bare numbers:** a number without a unit has no dimension until context gives one. Under `+`, `-`, `min` and `max` it takes the other operand's dimension (`wall + 3` is wall + 3 mm). Under `*` and `/` it is a unitless factor. `abs`, `round`, `floor`, `ceil`, `sqrt`, and `min` or `max` of only bare arguments keep it bare, so `wall + abs(-3)` is wall + 3 mm and `sqrt(16)` in a length field is 4 mm. As a trig argument it is degrees. If the whole result is still bare, it takes the field dimension: `3` and `2 * 3` in a length field are 3 mm and 6 mm. With no field dimension it is unitless. Unit literals, parameters and trig results are never bare, so `wall + count` (a unitless parameter) and `wall + cos(0)` are errors.
|
|
91
|
+
- **Errors:** `parseError`, `unknownName`, `unknownFunction`, `argumentCount`, `dimensionMismatch`, `divisionByZero`, `nonFinite`, `invalidArgument` (a non-string expression, a scope that is not an object, a scope value that is not a number), `invalidDimension` (an unknown dimension name such as `"Length"`, or a record without integer `length` and `angle`), and `limitExceeded`. The table adds `cycle`, `dependencyFailed`, `invalidName` and `duplicateName`.
|
|
92
|
+
- **Limits:** an expression may be 10,000 characters and nest parentheses and calls 128 deep. A table may hold 10,000 entries.
|
|
93
|
+
- **Cycles:** every parameter in one group of mutually referencing parameters gets the same `cycle` path, which starts and ends at the group's first entry. Its span marks that parameter's reference to the next one on the path.
|
|
94
|
+
- **Names:** `isValidParameterName` accepts ASCII identifiers up to 64 characters that are not unit or function names. A non-ASCII letter is an invalid character, so `wäll` reads as `w` and `ll`. `expressionDependencies` lists referenced names; `renameExpressionReference` renames whole references only, so `wall2`, unit suffixes and function calls stay unchanged. It does not check whether the new name is already in use; the caller must.
|
|
95
|
+
|
|
96
|
+
### The project parameter table
|
|
97
|
+
|
|
98
|
+
A project holds one parameter table for the whole project. Each `ProjectParameter` has a `name`, an `expression`, a declared `dimension` (`"length"`, `"angle"` or `"unitless"`), and a cached `value` in mm, degrees or plain units. The dimension is required so a bare number resolves: `3` is 3 mm in a length parameter and 3 degrees in an angle parameter.
|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
import { addParameter, deleteParameter, renameParameter, updateParameter } from "@constructorfleet/sketchforge-engine";
|
|
102
|
+
|
|
103
|
+
let project = { parameters: [] };
|
|
104
|
+
for (const input of [
|
|
105
|
+
{ name: "wall", expression: "2", dimension: "length" },
|
|
106
|
+
{ name: "outer", expression: "20 + 2 * wall", dimension: "length" },
|
|
107
|
+
]) {
|
|
108
|
+
const result = addParameter(project, input);
|
|
109
|
+
if (!result.ok) throw new Error(result.error.message);
|
|
110
|
+
project = result.project;
|
|
111
|
+
}
|
|
112
|
+
project = updateParameter(project, "wall", { expression: "3 mm" }).project; // outer is now 26
|
|
113
|
+
project = renameParameter(project, "wall", "shell").project; // outer reads "20 + 2 * shell"
|
|
114
|
+
console.log(deleteParameter(project, "shell").error); // { code: "parameterInUse", dependents: ["outer"], ... }
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- **Operations:** `addParameter`, `updateParameter` (expression, dimension or both), `renameParameter` and `deleteParameter` take any object with a `parameters` array (missing reads as empty) and return `{ ok: true, project }` with a new object, or `{ ok: false, error }`. They never throw and never change their input. Each re-evaluates the whole table, so dependents get new values. A change is refused when the parameter it changes does not resolve, or when it breaks a parameter that resolved before.
|
|
118
|
+
- **Errors:** `{ code, message, parameter }`, where `parameter` names the entry that failed, which can be a dependent of the one changed. Codes are `invalidParameter` (an entry or table that is not an object or list), `invalidName`, `duplicateName`, `invalidDimension`, `invalidExpression` (with the evaluator's `expressionError`, including `cycle` and its path), `unknownParameter`, `parameterInUse` (with the `dependents` that reference it directly) and `tooManyParameters`. A table holds up to `PROJECT_PARAMETER_LIMIT` (2,000) entries.
|
|
119
|
+
- **Rename** checks the new name, refuses one already in use, and rewrites every expression that references the old name. **Delete** refuses while another parameter references the parameter; `parameterDependents` lists those parameters.
|
|
120
|
+
- **Values:** `resolveProjectParameters` evaluates a table and ignores any cached `value`. `.skf` export and import both call it, so a stored value is never trusted over its expression. It fails only on malformed structure. An entry that does not resolve stays in the table with an `error` and keeps its stored `value` as its last known value (`NaN` when there is none), so a project whose table a later release can no longer resolve still opens and saves the table back unchanged. Other entries can still be added, changed and deleted around it. `error` is never written to `.skf`.
|
|
121
|
+
- **Storage:** `.skf` packages and `ProjectDocument.parameters` carry the table. See the [project format](https://constructorfleet.github.io/SketchForge-3D/docs/SKF_PROJECT_FORMAT) for the format version rules.
|
|
122
|
+
|
|
123
|
+
### Binding shape and feature fields
|
|
124
|
+
|
|
125
|
+
A shape keeps the resolved number in its normal field (`width`, `x`, `sweepAngle` and so on) and records the expression in `shape.expressions`, keyed by field. Kernels, exports and older readers read only the number.
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
await engine.addParameter(projectId, { name: "wall", expression: "2 mm", dimension: "length" });
|
|
129
|
+
await engine.bindShapeField(projectId, boxId, "width", "wall * 5"); // width is now 10
|
|
130
|
+
await engine.updateParameter(projectId, "wall", { expression: "3" }); // width is now 15, in the same write
|
|
131
|
+
await engine.changeShape(projectId, boxId, { width: 12 }); // a literal removes the width binding
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
- **Catalog:** `EXPRESSION_BINDABLE_FIELDS` lists every bindable field once, with its `dimension` (`length`, `angle` or `unitless`), `integer` for counts, the `kinds` that carry it, any retained feature it `requires`, static `min` and `max` bounds (`exclusive` for drafts, treatment amounts and chamfer angles), and `periodic` for angles stored modulo 360. `bindableFieldsFor(shape)` and `bindableField(shape, field)` answer for one shape. A bare number takes the field's unit, so `3` in `width` is 3 mm and in `rotation` is 3°.
|
|
135
|
+
- **Fields:** placement and size (`x`, `z`, `elevation`, `width`, `depth`, `height`, `rotation`, `rotationX`, `rotationZ`), the numeric kind parameters (`sides`, `bevel`, `teeth`, `loftTopWidth` and the rest), and the retained-feature settings `revolve.startAngle`, `revolve.sweepAngle`, `revolve.sides`, `revolve.quality`, `revolve.pitch`, `revolve.turns`, `revolve.coreRadius`, `draftPrismAngle`, `faceDraft.angle`, `edgeTreatments.0.amount` and `edgeTreatments.0.chamferAngle`. Shape fields (`target: "shape"`) bind on top-level shapes only; feature fields also bind on a sketch output inside a group.
|
|
136
|
+
- **Recompute:** `updateParameter` re-resolves the table, then every binding whose expression references a parameter whose value or dimension changed, children before their groups. Each value is applied through the path a manual edit takes: treatment settings rebuild the sketch recipe through `recompute`, feature settings go through `changeShape` by `sketchSourceId`, and shape fields through `changeShape` by ID. Retained fillets, chamfers, drafts and boolean ancestors replay as they do for a manual edit, and a shell refuses a rebuild as it does for a manual edit. Treatment settings bind only on sketch-backed shapes, because no manual edit replays a treatment on a plain solid.
|
|
137
|
+
- **Ranges:** a value the field would clamp or round is refused rather than stored differently from its expression: `outOfRange` carries the `value`, the static `min` and `max` where the field has them, and the `stored` value it would become. Fields bounded by the shape itself, such as a gear's tooth size, report only `stored`. A shape's bindings are checked together against the shape as the whole change leaves it (`resolveShapeBindings`), so a tooth size that grows with its blank is accepted, and a fixed one the blank shrinks under is refused even though its own parameter did not change. A periodic angle is accepted and resolved to its stored form, so `-30` in `rotation` or `revolve.startAngle` is 330 and `12.34` in `rotation` is 12.3. A value that already matches the stored one is not reapplied.
|
|
138
|
+
- **Errors:** nothing is written unless every step succeeds. A table error is `parameter_invalid` with the table error. A binding that does not resolve is `binding_invalid` with `{ code, shapeId, field, message, expressionError? }`, where `code` is `fieldNotBindable`, `invalidExpression` (wrong dimension, unknown name, cycle), `notAnInteger`, `outOfRange` or `conflictingBinding` (with `constraintIds`; see "One dimension, one binding" below). A change that would alter a locked shape, or rebuild a locked group around a bound child, is refused as a whole with `binding_failed` and `shape_locked`; so is a value the geometry refuses, with the underlying failure.
|
|
139
|
+
- **Undo:** each operation is one write and so one history entry. History entries carry the parameter table (`EditorHistoryEntry.parameters`) with the shapes, so one undo restores the old table and the old geometry together. An empty table keeps the previous shapes-only fingerprint. An entry without `parameters`, written before tables were in history, means the table is unknown: it matches the current scene by shapes alone, and undoing to it keeps the current table.
|
|
140
|
+
- **Bindings in a request:** `addShapes` and `changeShape` accept `expressions: { width: "wall * 5" }`, applied in the same write as the rest of the request. `changeShape` also accepts `null` to clear a binding. On create, a number sent for the same field must equal the expression's value. On a change, an entry equal to the stored expression is an echo and is not re-evaluated; a changed expression with an unchanged number rebinds; a changed number with an unchanged expression unbinds; both changed and disagreeing is `invalid_shape_request` with `shapeId` and `field`. `project()` returns the resolved table as `parameters`.
|
|
141
|
+
- **Literal edits:** `changeShape` removes the binding of every field it sets to a new value, and of any bound field whose value its rebuild changes, such as a revolve's height after a new pitch. A bound placement field is the exception: a rebuild that moves it puts it back (see "Bound placement" below). Bindings on fields a rebuild leaves alone are kept, and a number equal to the current value keeps its binding, so a shape read back and sent whole stays bound. Other operations that set a bound value also remove its binding: `align` and `distribute` drop the moved axis, `pattern` copies drop `x`, `z` and a turned `rotation`, `treat` drops treatment bindings, `draftPrism` drops `draftPrismAngle`, and `group` and `cut` drop the shape-field bindings of their operands, whose placement becomes group-local, `ungroup` drops them from the children it returns to world placement, `mirrorBaked` drops them from baked results, and `separate` and `explode` drop every binding from the new parts. The editor does not apply this rule yet (#617).
|
|
142
|
+
- **Rename and delete:** `renameParameter` rewrites shape bindings too, including treatment `before` snapshots. `deleteParameter` refuses while a shape or a `before` snapshot binds the parameter and reports `shapeDependents: [{ shapeId, fields }]`; `projectParameterDependents(project, name)` lists both kinds of dependent.
|
|
143
|
+
- **Stale bindings:** a binding that no longer resolves, or names a field the shape lacks, is kept with its stored number. `.skf` import reports it in `bindingIssues`, and `shapeBindingIssues(shapes, parameters)` lists them on demand. A parameter change re-resolves only the bindings that depend on it. One that was already stale stays stale and does not block the change; one the change itself breaks refuses it. A shape field bound on a shape inside a group is stale too.
|
|
144
|
+
|
|
145
|
+
### Binding sketch constraints
|
|
146
|
+
|
|
147
|
+
A dimensional sketch constraint keeps its resolved number in `valueMm` or `valueDeg` and records the expression next to it in `expression`. The solver, kernels and older readers read only the number.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
await engine.addParameter(projectId, { name: "slot", expression: "12 mm", dimension: "length" });
|
|
151
|
+
await engine.bindSketchConstraint(projectId, sketchSourceId, "slot-length", "slot"); // re-solves, rebuilds
|
|
152
|
+
await engine.updateParameter(projectId, "slot", { expression: "16" }); // re-solves again, same write
|
|
153
|
+
await engine.bindSketchConstraint(projectId, sketchSourceId, "slot-length", null); // keeps 16 mm, unbound
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
- **Catalog:** `SKETCH_CONSTRAINT_BINDABLE_KINDS` lists the kinds that bind: `distance`, `radius` and `diameter` (length, `valueMm`) and `angle` (angle, `valueDeg`). Other kinds, including `fixed`, have no value to bind. A bare number takes the constraint's unit. A resolved distance must not be negative, a radius or diameter must be positive, and an angle must be between 0° and 180°, the same ranges the `.skf` reader accepts; anything else is `outOfRange`.
|
|
157
|
+
- **Target:** `bindSketchConstraint(projectId, shapeId, constraintId, expression | null)` takes the sketch output's ID or its `sketchSourceId`, including an output nested in a boolean group. A locked output, or one inside a locked group, refuses binding, re-binding and unbinding with `shape_locked` naming the locked shape.
|
|
158
|
+
- **Create:** `addShapes` checks constraint expressions in a supplied profile (a `sketchSweep` today). The expression wins over the supplied value, as shape expressions do on create, and the sketch is solved and built with the resolved values. An expression on a kind that cannot bind, one that does not resolve, or one on a sketch that cannot be rebuilt refuses the request with `constraint_binding_invalid`, and nothing is written.
|
|
159
|
+
- **Recompute:** a parameter change resolves the constraint bindings that use it, sets the new values and solves each affected sketch with `solveSketchConstraints` before any rebuild. Each solved profile is then applied as `changeShape(sketchSourceId, { sketchProfile })` would apply it, so the extrusion, revolve or sweep is rebuilt and retained treatments, drafts and boolean ancestors replay. Shape fields and sketch constraints change in the same write, so one undo step restores the table, the profiles and the geometry. The solve covers the whole sketch, as a solve in the editor does: a literal constraint stored with a value its points do not meet is enforced too, and its points move.
|
|
160
|
+
- **Errors:** nothing is written unless every sketch solves and every rebuild succeeds. A sketch that cannot satisfy its constraints with the new values (for example over-constrained) is `sketch_unsolvable` with `{ shapeId, constraintIds, message }`. Only constraints the change breaks count: a changed constraint, or one that was satisfied before. The editor can save a sketch with constraints it could not satisfy, and those do not block a change. A constraint binding that does not resolve is `constraint_binding_invalid` with `{ code, shapeId, constraintId, message, expressionError? }`, where `code` is `constraintNotFound`, `constraintNotBindable`, `invalidExpression`, `outOfRange`, `sketchNotRebuildable` (the shape has a profile but no `sketchOperation`, is nested without a `sketchSourceId`, or is shelled, so no profile edit can rebuild it) or `conflictingBinding` (with `fields`; see below). During a parameter change, a rebuild the geometry refuses, or a locked output, is `binding_failed` with the output's ID, `constraintIds` and the underlying failure. `bindSketchConstraint` on a locked output returns `shape_locked`.
|
|
161
|
+
- **One dimension, one binding:** a bound `width`, `depth` or `height` on a sketch output is applied as a resize after the profile is solved, so it would overrule the constraints and leave them describing a different solid. A sketch output therefore holds either constraint bindings or bindings on the size fields its profile determines, not both. Those fields are `profileSizeFields(shape)`: `width` and `depth` for an extrusion, and `width`, `depth` and `height` for a revolve or sweep. An extrusion's `height` is its extrusion distance, not part of the profile, so it binds next to constraint bindings. Binding the second side is refused, whichever comes first, by `bindShapeField`, `bindSketchConstraint`, `addShapes` and `changeShape`: a field is `binding_invalid` with `code: "conflictingBinding"` and the bound `constraintIds`, and a constraint is `constraint_binding_invalid` with `code: "conflictingBinding"` and the bound `fields`. Clearing either side is never refused. A literal size that changes one of those fields through `changeShape` is a resize of the solved sketch, so it removes the sketch's constraint bindings: each constraint keeps its resolved number, and the solid scales as before. Sending the current size back is an echo and keeps them. A project that already holds both, such as one written before this check, still loads and recomputes, with the size field applied last; `sketchConstraintBindingIssues` and `.skf` import report each such constraint as `conflictingBinding`.
|
|
162
|
+
- **Bound placement:** a solve can move a sketch's centre, and so the shape's `x` and `z`. A bound placement field (`x`, `z`, `elevation`, `rotation`, `rotationX`, `rotationZ`) is put back after every profile rebuild: `bindSketchConstraint`, a parameter change, a create with constraint expressions, and a `changeShape` profile edit. The binding is never left stale or dropped by that drift, and the solid moves so its placement matches the expression. A placement the same request sets as a literal is not put back.
|
|
163
|
+
- **Profile edits:** `changeShape` applies the field rules to each constraint of a supplied `sketchProfile`, compared with the stored constraint (`requestedSketchProfile`). The stored value, with no expression or the stored one, keeps the binding without re-evaluating it. A changed value with no expression or the stored one replaces the binding. A changed expression with the stored value binds it, and the sketch is solved with the resolved value before the rebuild. A changed value and a changed expression must agree, or the change is `invalid_shape_request` with `shapeId` and `constraintId`. `expression: null` unbinds. A constraint the stored profile lacks takes its expression's value, as on create. A new binding is refused as `bindSketchConstraint` refuses it (`constraint_binding_invalid`, `sketch_unsolvable`), and nothing is written. A literal size that changes a profile size field in the same request as a new binding is `invalid_shape_request` with `shapeId`, `field` and `constraintId`. A locked output is refused with `shape_locked` before the profile is planned or solved. `sketchConstraints`, the read-only summary of a profile's dimensions (`sketchConstraintSummaries`), is accepted when it repeats the stored one and refused with `invalid_shape_request` and `field: "sketchConstraints"` when it differs. With a `sketchProfile`, a `width`, `depth` or `height` equal to the stored one is an echo and is not applied as a resize after the rebuild; an echoed position still applies. `literalSketchProfile` remains for callers that want every new expression dropped.
|
|
164
|
+
- **Rename, delete and dependents:** `renameParameter` rewrites constraint bindings too, including treatment `before` snapshots. `deleteParameter` refuses while a constraint binds the parameter and reports `sketchConstraintDependents: [{ shapeId, constraintIds }]`. `projectParameterDependents(project, name)` returns `{ parameters, shapes, sketchConstraints }`. Dependents and stale-binding issues also count bindings held only in a treatment `before` snapshot, reported once per shape, because reverting the treatment restores that snapshot.
|
|
165
|
+
- **Stale bindings:** a constraint binding that no longer resolves is kept with its stored value. `.skf` import reports it in `constraintBindingIssues`, and `sketchConstraintBindingIssues(shapes, parameters)` lists them on demand. It does not block an unrelated parameter change, and it is applied once a change makes it resolve. A binding on a sketch with no rebuild recipe stays stale and is reported as `sketchNotRebuildable`.
|
|
166
|
+
- **Solver:** `solveSketchConstraints` and the other constraint helpers moved into the engine (`@constructorfleet/sketchforge-engine/sketchConstraints`), so the server re-solves with the same solver the editor uses.
|
|
167
|
+
|
|
168
|
+
### Parameter configurations
|
|
169
|
+
|
|
170
|
+
A configuration is a named row of parameter expression overrides, for variants such as `Small` and `Large`. A parameter a row does not list keeps its base expression. A project has `configurations` (in order) and an `activeConfiguration`, which is a configuration name or `null` for the base table. Each `ProjectParameter` keeps its base `expression`, and its `value` is resolved under the active configuration, so bindings, exports and anything else that reads `value` follow the active configuration.
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
await engine.addParameter(projectId, { name: "wall", expression: "2", dimension: "length" });
|
|
174
|
+
await engine.bindShapeField(projectId, boxId, "width", "wall * 5"); // 10 mm
|
|
175
|
+
await engine.addConfiguration(projectId, "Large", { wall: "4" });
|
|
176
|
+
await engine.activateConfiguration(projectId, "Large"); // width is now 20 mm, in one write
|
|
177
|
+
await engine.setConfigurationOverride(projectId, "Large", "wall", "5"); // 25 mm, as Large is active
|
|
178
|
+
await engine.activateConfiguration(projectId, null); // back to the base table, 10 mm
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- **Engine operations:** `addConfiguration(projectId, name, overrides?)`, `renameConfiguration`, `deleteConfiguration`, `setConfigurationOverride(projectId, configuration, parameter, expression)`, `clearConfigurationOverride` and `activateConfiguration(projectId, name | null)`. Each returns `ParametersWritten`, which now also carries `configurations` and `activeConfiguration`. Each is one write and one history entry. A change that alters active values recomputes bound shapes exactly as `updateParameter` does, with the same refusals: a locked shape (`binding_failed` with `shape_locked`), a value out of range (`binding_invalid` with `outOfRange`), or a table error. A refusal writes nothing. An operation that changes nothing, such as activating the active configuration, writes nothing.
|
|
182
|
+
- **Pure operations:** `addConfiguration(project, { name, overrides? })`, `renameConfiguration`, `deleteConfiguration`, `setConfigurationOverride`, `clearConfigurationOverride` and `activateConfiguration` take any object with `parameters`, `configurations` and `activeConfiguration` (missing reads as none) and return `{ ok: true, project }` or `{ ok: false, error }`. They never throw and never change their input. A project without configurations keeps no configuration fields.
|
|
183
|
+
- **Validation:** every change resolves the base table and every configuration's table, not only the active one. It is refused when an entry it sets does not resolve, or when it breaks an entry that resolved before, in any of those tables. So an override with the wrong dimension or a cycle is refused in a configuration that is not active, and so is a base change that breaks one. A stale override does not block edits to the parameters that read it: in the table of a configuration that is not active, an entry that fails only through a dependency that was already failing is not a refusal. The active configuration follows the base rule, so an edited entry must resolve there. A rename is refused only when it breaks an entry. Activation, and deleting the active configuration, are refused when they break an entry the current table resolves. Errors use the parameter error shape, with `configuration` naming the table that failed, and the codes `invalidConfiguration`, `invalidConfigurationName`, `duplicateConfigurationName`, `unknownConfiguration` and `tooManyConfigurations`. A name is 1 to 100 characters without control characters or surrounding whitespace. A project holds up to `PROJECT_CONFIGURATION_LIMIT` (200) configurations.
|
|
184
|
+
- **Parameter rename and delete:** `renameParameter` renames override keys and rewrites override expressions. `deleteParameter` refuses while an override of an existing parameter references it, with `configurationDependents` listing those configurations (`projectParameterDependents` reports them as `configurations`), and drops the deleted parameter's own overrides.
|
|
185
|
+
- **Reading:** `engine.project(projectId)` returns `configurations` and `activeConfiguration` with the table. `resolveConfiguration(project, name | null)` resolves any configuration's table without activating it. `configurationIssues(project)` lists overrides that do not resolve although the base entry does, and overrides that name no parameter.
|
|
186
|
+
- **Undo:** history entries carry `configurations` and `activeConfiguration` with the shapes and the table, so one undo of an activation restores the previous configuration and its geometry. Empty configurations keep the previous fingerprint. An entry without `configurations` predates them: it matches by what it knows, and undoing to it keeps the current configurations.
|
|
187
|
+
- **Storage:** `.skf` packages and `ProjectDocument.configurations` and `.activeConfiguration` carry them. A project with configurations is saved as format version 4, so older readers refuse it rather than drop them. Loading keeps a stale override as stored and reports it in `configurationIssues`.
|
|
188
|
+
|
|
70
189
|
## Editing a sketch-backed feature
|
|
71
190
|
|
|
72
|
-
Sketch extrusions, revolves, and sweeps expose a stable `sketchSourceId` on the generated shape. Pass that ID to `engine.changeShape(projectId, sketchSourceId, { sketchProfile })` to rebuild the feature. For a persisted sketch revolve, the same source ID also accepts operation-setting updates such as `{ sides: 64 }`. A draft prism retains its `draftPrismAngle`; source edits accept `{ draftPrismAngle: 12 }` and reapply the draft when the extrusion profile changes. Retained sketch extrusions, sweeps, and eligible revolves can store one face draft with `{ faceDraft: { sourceFaceId, angle, pullDirection } }`; use the ID from `engine.faces`, and use `null` to clear it. Profile edits resolve the selected planar face by its stored normal and require exactly one match; they never carry the old face index forward. `.skf` round trips preserve the face draft and source frame. A single-loop sketch extrusion can combine one face draft followed by one all-edge fillet. A single-section, no-hole sketch sweep can combine one face draft followed by one all-edge fillet or one symmetric 45° all-edge chamfer. Sweep treatments replay the source, draft, then treatment on profile edits, including after archive import; tests cover the round trip, replay, unsupported angles, and atomic refusal. Sweep face drafts do not support multiple sections, section holes, selected-edge treatments, or additional treatments. A plain single-region full-turn sketch revolve can combine one face draft followed by either one symmetric 45° all-edge chamfer or one all-edge fillet; profile and setting edits replay the source, draft, then treatment, including after archive import. Other face-draft treatment combinations, prism drafts, and shelling remain unsupported. When the output is nested inside a baked boolean group, the engine updates the sketch output and recomputes its boolean ancestors from their retained operands before writing the project. Each rebuilt ancestor is placed through its group's frame the way ungrouping places the group's children, so a group that was moved, turned, mirrored or resized after creation keeps that placement, mirror and scale across the edit. The edit is atomic: invalid profiles, missing or ambiguous face matches, or a failed dependent rebuild leave the stored project unchanged.
|
|
191
|
+
Sketch extrusions, revolves, and sweeps expose a stable `sketchSourceId` on the generated shape. Pass that ID to `engine.changeShape(projectId, sketchSourceId, { sketchProfile })` to rebuild the feature. For a persisted sketch revolve, the same source ID also accepts operation-setting updates such as `{ sides: 64 }`. A draft prism retains its `draftPrismAngle`; source edits accept `{ draftPrismAngle: 12 }` and reapply the draft when the extrusion profile changes. Retained sketch extrusions, sweeps, and eligible revolves can store one face draft with `{ faceDraft: { sourceFaceId, angle, pullDirection } }`; use the ID from `engine.faces`, and use `null` to clear it. Profile edits resolve the selected planar face by its stored normal and require exactly one match; they never carry the old face index forward. `.skf` round trips preserve the face draft and source frame. A single-loop sketch extrusion can combine one face draft followed by one all-edge fillet. A single-section, no-hole sketch sweep can combine one face draft followed by one all-edge fillet or one symmetric 45° all-edge chamfer. Sweep treatments replay the source, draft, then treatment on profile edits, including after archive import; tests cover the round trip, replay, unsupported angles, and atomic refusal. Sweep face drafts do not support multiple sections, section holes, selected-edge treatments, or additional treatments. A plain single-region full-turn sketch revolve can combine one face draft followed by either one symmetric 45° all-edge chamfer or one all-edge fillet; profile and setting edits replay the source, draft, then treatment, including after archive import. Other face-draft treatment combinations, prism drafts, and shelling remain unsupported. When the output is nested inside a baked boolean group, the engine updates the sketch output and recomputes its boolean ancestors from their retained operands before writing the project. Each rebuilt ancestor is placed through its group's frame the way ungrouping places the group's children, so a group that was moved, turned, mirrored or resized after creation keeps that placement, mirror and scale across the edit. The edit is atomic: invalid profiles, missing or ambiguous face matches, or a failed dependent rebuild leave the stored project unchanged. A locked output, or one inside a locked group, refuses every source edit with `shape_locked` naming the locked shape or the nearest locked group, before any field is checked. `locked: false` in the request lifts only the addressed shape's own lock, so unlock the group by its own ID first. When the locked shape is itself nested, the failure adds `topLevelId`, the top-level group holding it: no call reaches a nested shape by ID, so only `ungroup` brings it back to the top level to unlock. Every other operation that targets a shape by ID (`treat`, `draftPrism`, `shell`, `mirrorBaked`, `align`, `distribute`, `pattern`, `removeShape`, `ungroup`, `separate`, `explode`) reaches only top-level shapes, so a group's child answers `shapes_not_found`.
|
|
73
192
|
|
|
74
193
|
This recomputation currently covers sketch-backed extrusions, revolves, and sweeps nested under boolean groups, plus a retained prism-draft angle applied to a sketch extrusion. Other downstream operations remain baked or unsupported for source-driven recompute, and a general-purpose feature graph is not yet available. `.skf` export preserves the updated sketch profile, draft angle, and recomputed boolean result.
|
|
75
194
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps engine failures to REST v1 errors: status, code, sentence and detail fields.
|
|
3
|
+
*
|
|
4
|
+
* REST and MCP local mode both answer from here, so a refusal reads the same
|
|
5
|
+
* whichever transport carried it. Transports only wrap the result.
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineFailure } from "./engine.js";
|
|
8
|
+
import type { ExpressionError } from "./parameterExpressions.js";
|
|
9
|
+
/**
|
|
10
|
+
* The machine-readable half of an error, alongside the sentence.
|
|
11
|
+
*
|
|
12
|
+
* A status code is too coarse to act on here. `404` covers a missing project, a
|
|
13
|
+
* missing shape and an API that is switched off entirely; `409` covers both "the
|
|
14
|
+
* project is busy, retry" and "that shape is locked, do not retry". Without a
|
|
15
|
+
* code a client has to match on the prose, which makes every wording change a
|
|
16
|
+
* breaking one -- and both client libraries were doing exactly that.
|
|
17
|
+
*/
|
|
18
|
+
export declare const API_ERROR_CODES: readonly ["api_disabled", "unauthorized", "storage_unconfigured", "invalid_project_id", "invalid_shape_id", "invalid_body", "invalid_request", "project_not_found", "project_exists", "project_busy", "revision_mismatch", "shape_not_found", "shape_locked", "parameter_not_found", "parameter_exists", "parameter_in_use", "configuration_not_found", "configuration_exists", "invalid_expression", "unsupported_kind", "unsupported_format", "unapplicable_fields", "too_many_shapes", "limit_exceeded", "geometry_failed", "cad_failed", "internal_error"];
|
|
19
|
+
export type ApiErrorCode = (typeof API_ERROR_CODES)[number];
|
|
20
|
+
/** One refusal, before a transport writes it. `detail` never holds `error` or `code`. */
|
|
21
|
+
export type ApiErrorReply = {
|
|
22
|
+
message: string;
|
|
23
|
+
status: number;
|
|
24
|
+
code: ApiErrorCode;
|
|
25
|
+
detail: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
/** Sentences shared by every route, so a code and its sentence cannot drift apart. */
|
|
28
|
+
export declare const API_ERROR_MESSAGES: {
|
|
29
|
+
readonly invalidProjectId: "Invalid project id.";
|
|
30
|
+
readonly shapeIdRequired: "A shapeId is required.";
|
|
31
|
+
readonly jsonBodyRequired: "Expected a JSON object body.";
|
|
32
|
+
readonly projectNotFound: "That project is not on the server.";
|
|
33
|
+
readonly projectBusy: "That project is being changed; try again.";
|
|
34
|
+
readonly revisionMismatch: "The project changed since the supplied revision.";
|
|
35
|
+
readonly shapeNotFound: "That shape is not in the project.";
|
|
36
|
+
readonly shapesNotFound: (ids: readonly string[]) => string;
|
|
37
|
+
readonly shapeLocked: "That shape is locked.";
|
|
38
|
+
};
|
|
39
|
+
/** Same rule as the store: the id becomes a file name in the project directory. */
|
|
40
|
+
export declare const API_PROJECT_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9_-]*$";
|
|
41
|
+
export declare const API_PROJECT_ID_MAX_LENGTH = 120;
|
|
42
|
+
/** Returns the trimmed project id, or undefined when a query could not carry it. */
|
|
43
|
+
export declare function apiProjectId(value: unknown): string | undefined;
|
|
44
|
+
/** Returns the trimmed `?shapeId=`, or undefined when it is missing or blank. */
|
|
45
|
+
export declare function apiShapeId(value: unknown): string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* How a route words the refusals whose wording is its own.
|
|
48
|
+
*
|
|
49
|
+
* - `oneShape`: a route addressing one shape through `?shapeId=` says "That
|
|
50
|
+
* shape is not in the project." instead of naming the missing ids.
|
|
51
|
+
* - `locked` names which shapes have to be unlocked.
|
|
52
|
+
* - `cadFailed` is the kernel failing with nothing to say.
|
|
53
|
+
* - `tooFewShapes` words the count an operation needs.
|
|
54
|
+
* - `refusal` words a domain refusal a caller can act on.
|
|
55
|
+
*/
|
|
56
|
+
export type ApiFailureWording = {
|
|
57
|
+
oneShape?: boolean;
|
|
58
|
+
locked?: (ids: string[]) => string;
|
|
59
|
+
cadFailed?: string;
|
|
60
|
+
tooFewShapes?: (needed: number, given: number) => string;
|
|
61
|
+
refusal?: Partial<Record<"not_a_group" | "single_body" | "hole_has_no_parts" | "cut_removed_nothing", string>>;
|
|
62
|
+
};
|
|
63
|
+
/** `PATCH /shapes` wording; MCP's set_shape_expression takes the same path. */
|
|
64
|
+
export declare const SHAPE_CHANGE_WORDING: ApiFailureWording;
|
|
65
|
+
/** Serializes an evaluation error: code, message, span and, for a cycle, its path. */
|
|
66
|
+
export declare function wireExpressionError(error: ExpressionError): {
|
|
67
|
+
code: import("./parameterExpressions.js").ExpressionErrorCode;
|
|
68
|
+
message: string;
|
|
69
|
+
span: {
|
|
70
|
+
start: number;
|
|
71
|
+
end: number;
|
|
72
|
+
};
|
|
73
|
+
cycle?: string[] | undefined;
|
|
74
|
+
};
|
|
75
|
+
/** Maps one engine failure. `detail` adds fields to every refusal; a wrapped binding failure names the bound shape. */
|
|
76
|
+
export declare function engineFailureToApiError(failure: EngineFailure, wording?: ApiFailureWording, detail?: Record<string, unknown>): ApiErrorReply;
|
|
77
|
+
/**
|
|
78
|
+
* Maps a `PATCH /shapes` refusal. A lock names the locked shape or group as `shapeId`;
|
|
79
|
+
* when the request binds fields, the engine reports it as `binding_failed`, which adds them.
|
|
80
|
+
*/
|
|
81
|
+
export declare function shapeChangeApiError(failure: EngineFailure, shapeId: string): ApiErrorReply;
|
|
82
|
+
/** Requests reach only top-level shapes by ID, so a nested lock clears only after ungrouping. */
|
|
83
|
+
export declare function nestedLockWording(wording: ApiFailureWording, lockedId: string, topLevelId: string): ApiFailureWording;
|
|
84
|
+
//# sourceMappingURL=apiErrors.d.ts.map
|
|
@@ -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AAM,EAAE,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAMrH"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps engine failures to REST v1 errors: status, code, sentence and detail fields.
|
|
3
|
+
*
|
|
4
|
+
* REST and MCP local mode both answer from here, so a refusal reads the same
|
|
5
|
+
* whichever transport carried it. Transports only wrap the result.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The machine-readable half of an error, alongside the sentence.
|
|
9
|
+
*
|
|
10
|
+
* A status code is too coarse to act on here. `404` covers a missing project, a
|
|
11
|
+
* missing shape and an API that is switched off entirely; `409` covers both "the
|
|
12
|
+
* project is busy, retry" and "that shape is locked, do not retry". Without a
|
|
13
|
+
* code a client has to match on the prose, which makes every wording change a
|
|
14
|
+
* breaking one -- and both client libraries were doing exactly that.
|
|
15
|
+
*/
|
|
16
|
+
export const API_ERROR_CODES = [
|
|
17
|
+
"api_disabled",
|
|
18
|
+
"unauthorized",
|
|
19
|
+
"storage_unconfigured",
|
|
20
|
+
"invalid_project_id",
|
|
21
|
+
"invalid_shape_id",
|
|
22
|
+
"invalid_body",
|
|
23
|
+
"invalid_request",
|
|
24
|
+
"project_not_found",
|
|
25
|
+
"project_exists",
|
|
26
|
+
"project_busy",
|
|
27
|
+
"revision_mismatch",
|
|
28
|
+
"shape_not_found",
|
|
29
|
+
"shape_locked",
|
|
30
|
+
"parameter_not_found",
|
|
31
|
+
"parameter_exists",
|
|
32
|
+
"parameter_in_use",
|
|
33
|
+
"configuration_not_found",
|
|
34
|
+
"configuration_exists",
|
|
35
|
+
"invalid_expression",
|
|
36
|
+
"unsupported_kind",
|
|
37
|
+
"unsupported_format",
|
|
38
|
+
"unapplicable_fields",
|
|
39
|
+
"too_many_shapes",
|
|
40
|
+
"limit_exceeded",
|
|
41
|
+
"geometry_failed",
|
|
42
|
+
"cad_failed",
|
|
43
|
+
"internal_error",
|
|
44
|
+
];
|
|
45
|
+
/** Sentences shared by every route, so a code and its sentence cannot drift apart. */
|
|
46
|
+
export const API_ERROR_MESSAGES = {
|
|
47
|
+
invalidProjectId: "Invalid project id.",
|
|
48
|
+
shapeIdRequired: "A shapeId is required.",
|
|
49
|
+
jsonBodyRequired: "Expected a JSON object body.",
|
|
50
|
+
projectNotFound: "That project is not on the server.",
|
|
51
|
+
projectBusy: "That project is being changed; try again.",
|
|
52
|
+
revisionMismatch: "The project changed since the supplied revision.",
|
|
53
|
+
shapeNotFound: "That shape is not in the project.",
|
|
54
|
+
shapesNotFound: (ids) => `Not in the project: ${ids.join(", ")}.`,
|
|
55
|
+
shapeLocked: "That shape is locked.",
|
|
56
|
+
};
|
|
57
|
+
/** Same rule as the store: the id becomes a file name in the project directory. */
|
|
58
|
+
export const API_PROJECT_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9_-]*$";
|
|
59
|
+
export const API_PROJECT_ID_MAX_LENGTH = 120;
|
|
60
|
+
/** Returns the trimmed project id, or undefined when a query could not carry it. */
|
|
61
|
+
export function apiProjectId(value) {
|
|
62
|
+
if (typeof value !== "string")
|
|
63
|
+
return undefined;
|
|
64
|
+
const trimmed = value.trim();
|
|
65
|
+
return trimmed.length <= API_PROJECT_ID_MAX_LENGTH && new RegExp(API_PROJECT_ID_PATTERN).test(trimmed) ? trimmed : undefined;
|
|
66
|
+
}
|
|
67
|
+
/** Returns the trimmed `?shapeId=`, or undefined when it is missing or blank. */
|
|
68
|
+
export function apiShapeId(value) {
|
|
69
|
+
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
70
|
+
}
|
|
71
|
+
/** `PATCH /shapes` wording; MCP's set_shape_expression takes the same path. */
|
|
72
|
+
export const SHAPE_CHANGE_WORDING = {
|
|
73
|
+
oneShape: true,
|
|
74
|
+
locked: () => "That shape is locked. Send locked: false to change it.",
|
|
75
|
+
};
|
|
76
|
+
const DEFAULT_REFUSALS = {
|
|
77
|
+
not_a_group: "That shape is not a group.",
|
|
78
|
+
single_body: "That shape is a single connected body.",
|
|
79
|
+
hole_has_no_parts: "A hole has nothing to separate; it is a cutter, not a body.",
|
|
80
|
+
// The editor treats the same case as a failed cut: a solid handed back
|
|
81
|
+
// unchanged is the one reply a script cannot tell from success.
|
|
82
|
+
cut_removed_nothing: "None of the holes meet the solid, so there is nothing to cut.",
|
|
83
|
+
};
|
|
84
|
+
/** `invalid_request` for refusals about the request, `geometry_failed` for ones about the geometry. */
|
|
85
|
+
const REFUSAL_CODES = {
|
|
86
|
+
not_a_group: "invalid_request",
|
|
87
|
+
single_body: "invalid_request",
|
|
88
|
+
hole_has_no_parts: "invalid_request",
|
|
89
|
+
cut_removed_nothing: "geometry_failed",
|
|
90
|
+
};
|
|
91
|
+
function reply(message, status, code, detail = {}) {
|
|
92
|
+
return { message, status, code, detail };
|
|
93
|
+
}
|
|
94
|
+
/** Names a batch entry by position; `POST /shapes` takes up to two hundred. */
|
|
95
|
+
function atIndex(message, index) {
|
|
96
|
+
return index === undefined ? message : `Shape ${index}: ${message}`;
|
|
97
|
+
}
|
|
98
|
+
function limitExceeded(message, limit, given, detail) {
|
|
99
|
+
return reply(message, 413, "limit_exceeded", { ...detail, limit, given });
|
|
100
|
+
}
|
|
101
|
+
/** The three readings of `unapplicable_fields`, each a 422 with `fields` attached. */
|
|
102
|
+
function unapplicableFields(failure, detail) {
|
|
103
|
+
const message = failure.because === "no_sweep"
|
|
104
|
+
? `A shape of kind "${failure.kind}" has no sweep to change: ${failure.fields.join(", ")}.`
|
|
105
|
+
: failure.because === "outline_not_described"
|
|
106
|
+
? "That revolve's outline was drawn rather than described, so the sweep cannot be rebuilt from it. Send a profile to replace it."
|
|
107
|
+
: `A shape of kind "${failure.kind}" cannot take: ${failure.fields.join(", ")}.`;
|
|
108
|
+
return reply(message, 422, "unapplicable_fields", { fields: failure.fields, ...detail });
|
|
109
|
+
}
|
|
110
|
+
/** Serializes an evaluation error: code, message, span and, for a cycle, its path. */
|
|
111
|
+
export function wireExpressionError(error) {
|
|
112
|
+
return {
|
|
113
|
+
code: error.code,
|
|
114
|
+
message: error.message,
|
|
115
|
+
span: { start: error.span.start, end: error.span.end },
|
|
116
|
+
...(error.cycle ? { cycle: [...error.cycle] } : {}),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const PARAMETER_ERROR_STATUS = {
|
|
120
|
+
invalidParameter: [400, "invalid_request"],
|
|
121
|
+
invalidName: [400, "invalid_request"],
|
|
122
|
+
invalidDimension: [400, "invalid_request"],
|
|
123
|
+
duplicateName: [409, "parameter_exists"],
|
|
124
|
+
unknownParameter: [404, "parameter_not_found"],
|
|
125
|
+
parameterInUse: [409, "parameter_in_use"],
|
|
126
|
+
invalidExpression: [422, "invalid_expression"],
|
|
127
|
+
tooManyParameters: [413, "limit_exceeded"],
|
|
128
|
+
invalidConfiguration: [400, "invalid_request"],
|
|
129
|
+
invalidConfigurationName: [400, "invalid_request"],
|
|
130
|
+
duplicateConfigurationName: [409, "configuration_exists"],
|
|
131
|
+
unknownConfiguration: [404, "configuration_not_found"],
|
|
132
|
+
tooManyConfigurations: [413, "limit_exceeded"],
|
|
133
|
+
};
|
|
134
|
+
/** Maps a table refusal. `reason` carries the engine's finer code. */
|
|
135
|
+
function parameterError(error) {
|
|
136
|
+
const [status, code] = PARAMETER_ERROR_STATUS[error.code];
|
|
137
|
+
return reply(error.message, status, code, {
|
|
138
|
+
// A configuration-level refusal carries an empty parameter; it names `configuration` instead.
|
|
139
|
+
...(error.parameter ? { parameter: error.parameter } : {}),
|
|
140
|
+
reason: error.code,
|
|
141
|
+
...(error.configuration !== undefined ? { configuration: error.configuration } : {}),
|
|
142
|
+
...(error.expressionError ? { expressionError: wireExpressionError(error.expressionError) } : {}),
|
|
143
|
+
...(error.code === "parameterInUse" ? {
|
|
144
|
+
dependents: [...(error.dependents ?? [])],
|
|
145
|
+
shapeDependents: (error.shapeDependents ?? []).map(({ shapeId, fields }) => ({ shapeId, fields: [...fields] })),
|
|
146
|
+
sketchConstraintDependents: (error.sketchConstraintDependents ?? [])
|
|
147
|
+
.map(({ shapeId, constraintIds }) => ({ shapeId, constraintIds: [...constraintIds] })),
|
|
148
|
+
configurationDependents: [...(error.configurationDependents ?? [])],
|
|
149
|
+
} : {}),
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/** Maps a binding refusal. An unbindable field reads as `unapplicable_fields`, as an unknown literal does. */
|
|
153
|
+
function bindingError(error, index) {
|
|
154
|
+
// A batch create names the shape by index; its id was never stored.
|
|
155
|
+
const detail = {
|
|
156
|
+
...(index === undefined ? { shapeId: error.shapeId } : { index }),
|
|
157
|
+
field: error.field,
|
|
158
|
+
reason: error.code,
|
|
159
|
+
...(error.expressionError ? { expressionError: wireExpressionError(error.expressionError) } : {}),
|
|
160
|
+
...Object.fromEntries(["value", "min", "max", "stored"]
|
|
161
|
+
.filter((key) => typeof error[key] === "number")
|
|
162
|
+
.map((key) => [key, error[key]])),
|
|
163
|
+
};
|
|
164
|
+
const message = atIndex(error.message, index);
|
|
165
|
+
if (error.code === "shapeNotFound")
|
|
166
|
+
return reply(message, 404, "shape_not_found", detail);
|
|
167
|
+
if (error.code === "fieldNotBindable")
|
|
168
|
+
return reply(message, 422, "unapplicable_fields", { ...detail, fields: [error.field] });
|
|
169
|
+
if (error.code === "conflictingBinding") {
|
|
170
|
+
return reply(message, 422, "unapplicable_fields", { ...detail, fields: [error.field], constraintIds: error.constraintIds ?? [] });
|
|
171
|
+
}
|
|
172
|
+
return reply(message, 422, "invalid_expression", detail);
|
|
173
|
+
}
|
|
174
|
+
/** Maps a sketch constraint binding refusal, in the shape `bindingError` uses for fields. */
|
|
175
|
+
function constraintBindingError(error, index) {
|
|
176
|
+
const detail = {
|
|
177
|
+
...(index === undefined ? { shapeId: error.shapeId } : { index }),
|
|
178
|
+
constraintId: error.constraintId,
|
|
179
|
+
reason: error.code,
|
|
180
|
+
...(error.expressionError ? { expressionError: wireExpressionError(error.expressionError) } : {}),
|
|
181
|
+
};
|
|
182
|
+
const message = atIndex(error.message, index);
|
|
183
|
+
if (error.code === "constraintNotBindable" || error.code === "sketchNotRebuildable") {
|
|
184
|
+
return reply(message, 422, "unapplicable_fields", detail);
|
|
185
|
+
}
|
|
186
|
+
if (error.code === "conflictingBinding")
|
|
187
|
+
return reply(message, 422, "unapplicable_fields", { ...detail, fields: error.fields ?? [] });
|
|
188
|
+
if (error.code === "invalidExpression" || error.code === "outOfRange")
|
|
189
|
+
return reply(message, 422, "invalid_expression", detail);
|
|
190
|
+
return reply(message, 422, "invalid_request", detail);
|
|
191
|
+
}
|
|
192
|
+
/** Maps one engine failure. `detail` adds fields to every refusal; a wrapped binding failure names the bound shape. */
|
|
193
|
+
export function engineFailureToApiError(failure, wording = {}, detail = {}) {
|
|
194
|
+
const fail = (message, status, code, extra) => reply(message, status, code, { ...extra, ...detail });
|
|
195
|
+
switch (failure.reason) {
|
|
196
|
+
case "project_busy":
|
|
197
|
+
return reply(API_ERROR_MESSAGES.projectBusy, 409, "project_busy", detail);
|
|
198
|
+
case "project_not_found":
|
|
199
|
+
return reply(API_ERROR_MESSAGES.projectNotFound, 404, "project_not_found", detail);
|
|
200
|
+
case "shapes_not_found":
|
|
201
|
+
return reply(wording.oneShape ? API_ERROR_MESSAGES.shapeNotFound : API_ERROR_MESSAGES.shapesNotFound(failure.ids), 404, "shape_not_found", detail);
|
|
202
|
+
case "shape_locked":
|
|
203
|
+
return reply(wording.locked?.(failure.ids) ?? API_ERROR_MESSAGES.shapeLocked, 409, "shape_locked", detail);
|
|
204
|
+
case "geometry_failed":
|
|
205
|
+
return fail(failure.message, failure.status === 500 ? 422 : failure.status, "geometry_failed");
|
|
206
|
+
case "cad_refused":
|
|
207
|
+
return fail(failure.message, failure.status, "cad_failed");
|
|
208
|
+
case "cad_failed":
|
|
209
|
+
return fail(wording.cadFailed ?? "The CAD kernel could not complete that operation.", 500, "cad_failed");
|
|
210
|
+
case "interference_refused": {
|
|
211
|
+
const refusal = failure.refusal;
|
|
212
|
+
if (refusal.reason === "invalid_clearance")
|
|
213
|
+
return fail("clearance must be a finite, non-negative number of millimetres.", 400, "invalid_request");
|
|
214
|
+
if (refusal.reason === "too_many_shapes")
|
|
215
|
+
return limitExceeded(`Interference check refused: ${refusal.given} shapes exceed the limit of ${refusal.limit}. Narrow the ids list.`, refusal.limit, refusal.given, detail);
|
|
216
|
+
return limitExceeded(`Interference check refused: more than ${refusal.limit} candidate pairs; narrow the ids list or reduce clearance.`, refusal.limit, refusal.given, detail);
|
|
217
|
+
}
|
|
218
|
+
case "unsupported_kind":
|
|
219
|
+
return fail(`Shape ${failure.index} has an unsupported kind. The API can build: ${failure.kinds.join(", ")}.`, 422, "unsupported_kind");
|
|
220
|
+
case "invalid_shape_request":
|
|
221
|
+
return fail(atIndex(failure.message, failure.index), 400, "invalid_request", {
|
|
222
|
+
...(failure.index === undefined ? {} : { index: failure.index }),
|
|
223
|
+
...(failure.shapeId === undefined ? {} : { shapeId: failure.shapeId }),
|
|
224
|
+
...(failure.field === undefined ? {} : { field: failure.field }),
|
|
225
|
+
...(failure.constraintId === undefined ? {} : { constraintId: failure.constraintId }),
|
|
226
|
+
});
|
|
227
|
+
case "sweep_failed":
|
|
228
|
+
return fail(atIndex(`${failure.message}.`, failure.index), 422, "geometry_failed");
|
|
229
|
+
case "unapplicable_fields":
|
|
230
|
+
return unapplicableFields(failure, detail);
|
|
231
|
+
case "selection_too_small":
|
|
232
|
+
return fail(wording.tooFewShapes?.(failure.needed, failure.given)
|
|
233
|
+
?? `This needs at least ${failure.needed} shapes; ${failure.given} were given.`, 422, "invalid_request");
|
|
234
|
+
case "no_distribute_axis":
|
|
235
|
+
return fail("Every shape sits at the same place along both axes, so there is nothing to spread. Move them apart, or send axis as x or z.", 422, "invalid_request");
|
|
236
|
+
case "pattern_has_no_step":
|
|
237
|
+
return fail(failure.kind === "linear"
|
|
238
|
+
? "A row needs a stepX or a stepZ, or every copy lands on top of the original."
|
|
239
|
+
: "A ring needs a sweepAngle other than zero, or every copy lands on top of the original.", 400, "invalid_request");
|
|
240
|
+
case "import_unsupported":
|
|
241
|
+
return fail(`Nothing here can read "${failure.fileName}". The readable formats are: ${failure.formats.join(", ")}.`, 415, "unsupported_format");
|
|
242
|
+
case "import_failed":
|
|
243
|
+
return fail(`${failure.fileName}: ${failure.message}`, 422, "geometry_failed");
|
|
244
|
+
case "parameter_invalid":
|
|
245
|
+
return parameterError(failure.error);
|
|
246
|
+
case "binding_invalid":
|
|
247
|
+
return bindingError(failure.error, failure.index);
|
|
248
|
+
case "constraint_binding_invalid":
|
|
249
|
+
return constraintBindingError(failure.error, failure.index);
|
|
250
|
+
case "sketch_unsolvable":
|
|
251
|
+
return fail(atIndex(failure.message, failure.index), 422, "geometry_failed", {
|
|
252
|
+
...(failure.index === undefined ? { shapeId: failure.shapeId } : { index: failure.index }),
|
|
253
|
+
constraintIds: [...failure.constraintIds],
|
|
254
|
+
});
|
|
255
|
+
case "binding_failed":
|
|
256
|
+
return engineFailureToApiError(failure.failure, wording, {
|
|
257
|
+
...detail,
|
|
258
|
+
...(failure.index === undefined ? { shapeId: failure.shapeId } : { index: failure.index }),
|
|
259
|
+
fields: [...failure.fields],
|
|
260
|
+
...(failure.constraintIds ? { constraintIds: [...failure.constraintIds] } : {}),
|
|
261
|
+
});
|
|
262
|
+
default:
|
|
263
|
+
return fail(wording.refusal?.[failure.reason] ?? DEFAULT_REFUSALS[failure.reason], 422, REFUSAL_CODES[failure.reason]);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/** A sketch source ID can reach an output whose lock, or whose group's lock, is not the addressed ID. */
|
|
267
|
+
const LOCKED_HOLDER_WORDING = {
|
|
268
|
+
...SHAPE_CHANGE_WORDING,
|
|
269
|
+
locked: (ids) => `Shape ${ids.join(", ")} is locked, so this change cannot apply. Send it locked: false first.`,
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Maps a `PATCH /shapes` refusal. A lock names the locked shape or group as `shapeId`;
|
|
273
|
+
* when the request binds fields, the engine reports it as `binding_failed`, which adds them.
|
|
274
|
+
*/
|
|
275
|
+
export function shapeChangeApiError(failure, shapeId) {
|
|
276
|
+
if (failure.reason !== "shape_locked")
|
|
277
|
+
return engineFailureToApiError(failure, SHAPE_CHANGE_WORDING);
|
|
278
|
+
const lockedId = failure.ids[0] ?? shapeId;
|
|
279
|
+
const wording = failure.topLevelId
|
|
280
|
+
? nestedLockWording(SHAPE_CHANGE_WORDING, lockedId, failure.topLevelId)
|
|
281
|
+
: lockedId === shapeId ? SHAPE_CHANGE_WORDING : LOCKED_HOLDER_WORDING;
|
|
282
|
+
return engineFailureToApiError(failure, wording, { shapeId: lockedId });
|
|
283
|
+
}
|
|
284
|
+
/** Requests reach only top-level shapes by ID, so a nested lock clears only after ungrouping. */
|
|
285
|
+
export function nestedLockWording(wording, lockedId, topLevelId) {
|
|
286
|
+
return {
|
|
287
|
+
...wording,
|
|
288
|
+
locked: () => `Shape ${lockedId} is locked inside top-level group ${topLevelId}, and only a top-level shape can be unlocked. `
|
|
289
|
+
+ `Ungroup ${topLevelId}, unlocking it first if it is locked, until that shape is top-level, under a new ID; then send it locked: false.`,
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=apiErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiErrors.js","sourceRoot":"","sources":["../src/apiErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc;IACd,cAAc;IACd,sBAAsB;IACtB,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,yBAAyB;IACzB,sBAAsB;IACtB,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;I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