@things-factory/figure-service 10.1.306 → 10.1.308

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.
@@ -345,7 +345,10 @@ const SUBJECT = {
345
345
  'set-repeat': step => step.part,
346
346
  'remove-repeat': step => step.part,
347
347
  'set-mounting-face': step => step.part,
348
- 'add-binding': step => step.part,
348
+ /* On a face of a part, said by `part` and `face` or by `to` (ADR-0230): it writes that face's nodes. On the mounting plane, no part. */
349
+ 'add-binding': step => step.part ?? (step.to && 'part' in step.to ? step.to.part : undefined),
350
+ /* A part made only to hold a place gives its places to a place box: its sizes and fastening are read (ADR-0230 Q6). */
351
+ 'part-to-place': step => step.part,
349
352
  'set-joint': step => step.joint?.body1?.part,
350
353
  'remove-joint': (step, base) => (base.joints ?? []).find((j) => j?.id === step.id)?.body1?.part,
351
354
  'set-material': step => step.target,
@@ -364,6 +367,7 @@ const SUBJECT = {
364
367
  'declare-instance-size': () => undefined,
365
368
  'clear-mounting-face': () => undefined,
366
369
  'scale-uniformly': () => undefined,
370
+ 'scale-separately': () => undefined,
367
371
  'follow-size-in-proportion': () => undefined,
368
372
  'set-detail-level': () => undefined,
369
373
  'set-item': () => undefined,
@@ -372,6 +376,8 @@ const SUBJECT = {
372
376
  'publish-input': () => undefined,
373
377
  'unpublish-input': () => undefined,
374
378
  'remove-binding': () => undefined,
379
+ /* One side of a place's room: the place's, no part's. */
380
+ 'set-binding-size': () => undefined,
375
381
  'set-slot-layout': () => undefined,
376
382
  'remove-slot-layout': () => undefined,
377
383
  'set-extension': () => undefined,
@@ -189,6 +189,29 @@ function figureWording(violation, say) {
189
189
  })
190
190
  };
191
191
  }
192
+ case 'PUBLIC_INPUT_REFUSED': {
193
+ /*
194
+ A board may place the figure at any size its range allows and set what it publishes; at these values a part
195
+ cannot be made. There was no case here and the release door said 「undefined」 (production inquiry 2026-11-23).
196
+ The values come from figure-model 0.12.27 on; an older kernel's finding has them only in `detail`.
197
+ */
198
+ const inputs = violation.inputs;
199
+ const tenth = (v) => Math.round(v * 10) / 10;
200
+ const at = inputs
201
+ ? Object.entries(inputs)
202
+ .map(([id, v]) => (/^(sizing\.)?size\.[xyz]$/.test(id) ? `${id.slice(-1).toUpperCase()} ${tenth(v)} mm` : `${id} ${tenth(v)}`))
203
+ .join(' · ')
204
+ : (/^at (.*?) the figure cannot be made/.exec(violation.detail ?? '')?.[1] ?? '');
205
+ return {
206
+ message: part
207
+ ? say(key('message'), { part, at }, `'${part}' cannot be made when a board places the figure at ${at}.`)
208
+ : say(key('message-figure'), { at }, `The figure cannot be made when a board places it at ${at}.`),
209
+ why: say(key('why'), {}, 'A board may place the figure at any size in its range. At this size a shape is not valid, such as a rounded corner larger than half its side.'),
210
+ how: part
211
+ ? say(key('how'), { part }, `Set the smallest size a drawing may give the figure (the size range in the size tab), or make '${part}' fit there: a smaller corner, or a size that follows the figure.`)
212
+ : say(key('how-figure'), {}, 'Set the smallest size a drawing may give the figure (the size range in the size tab), or narrow the range of the value it publishes.')
213
+ };
214
+ }
192
215
  case 'HOLD_UNMEASURED': {
193
216
  const hold = violation.hold ?? '';
194
217
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/figure-service",
3
- "version": "10.1.306",
3
+ "version": "10.1.308",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -42,7 +42,7 @@
42
42
  "test": "node --test test/conventions.test.mjs scripts/templates.test.mts"
43
43
  },
44
44
  "dependencies": {
45
- "@hatiolab/figure-model": "^0.12.26",
45
+ "@hatiolab/figure-model": "^0.12.28",
46
46
  "@operato/typeorm-history": "^10.0.0",
47
47
  "@things-factory/ai-client-base": "^10.1.304",
48
48
  "@things-factory/attachment-base": "^10.1.304",
@@ -55,7 +55,7 @@
55
55
  "jszip": "^3.10.1",
56
56
  "koa-router": "^7.4.0"
57
57
  },
58
- "gitHead": "439681f1596540031c5e6446e659277029ce2eb2",
58
+ "gitHead": "fb1e5f82471a206f641bcc5b79bbb9db909cc0a1",
59
59
  "engines": {
60
60
  "node": ">=22.12"
61
61
  },
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "The controls hold {hold} solves cannot keep the part there in this pose: solved again, it stays {nearest} mm away.",
20
20
  "figure.gate.hold-slip.how-unreachable": "Add a control for hold {hold} to solve, or change the pose at {seconds} s.",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "Add a control for hold {hold} to solve, or change the starting pose.",
22
+ "figure.gate.public-input-refused.message": "'{part}' cannot be made when a board places the figure at {at}.",
23
+ "figure.gate.public-input-refused.message-figure": "The figure cannot be made when a board places it at {at}.",
24
+ "figure.gate.public-input-refused.why": "A board may place the figure at any size in its range. At this size a shape is not valid, such as a rounded corner larger than half its side.",
25
+ "figure.gate.public-input-refused.how": "Set the smallest size a drawing may give the figure (the size range in the size tab), or make '{part}' fit there: a smaller corner, or a size that follows the figure.",
26
+ "figure.gate.public-input-refused.how-figure": "Set the smallest size a drawing may give the figure (the size range in the size tab), or narrow the range of the value it publishes.",
22
27
  "figure.gate.hold-unmeasured.message": "Hold {hold} cannot be measured.",
23
28
  "figure.gate.hold-unmeasured.why": "What it names is missing, or the figure cannot be posed as it asks, so whether the part stays on the floor is not known.",
24
29
  "figure.gate.hold-unmeasured.how": "Set hold {hold} again, or remove it.",
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "En esta postura, los controles que resuelve la sujeción {hold} no pueden mantener la pieza en su sitio: resuelta de nuevo, queda a {nearest} mm.",
20
20
  "figure.gate.hold-slip.how-unreachable": "Añada un control para que la sujeción {hold} lo resuelva, o cambie la postura en {seconds} s.",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "Añada un control para que la sujeción {hold} lo resuelva, o cambie la postura inicial.",
22
+ "figure.gate.public-input-refused.message": "La pieza '{part}' no se puede construir cuando un plano coloca la figura en {at}.",
23
+ "figure.gate.public-input-refused.message-figure": "La figura no se puede construir cuando un plano la coloca en {at}.",
24
+ "figure.gate.public-input-refused.why": "Un plano puede colocar la figura en cualquier tamaño de su rango. En este tamaño la forma no es válida, por ejemplo un radio de esquina mayor que la mitad de su lado.",
25
+ "figure.gate.public-input-refused.how": "Fije el tamaño mínimo en el rango de tamaño del plano (pestaña de tamaño), o haga que '{part}' quepa en ese tamaño: un radio de esquina menor, o un tamaño que siga a la figura.",
26
+ "figure.gate.public-input-refused.how-figure": "Fije el tamaño mínimo en el rango de tamaño del plano (pestaña de tamaño), o reduzca el rango del valor publicado.",
22
27
  "figure.gate.hold-unmeasured.message": "La sujeción {hold} no se puede medir.",
23
28
  "figure.gate.hold-unmeasured.why": "Falta lo que nombra o la figura no puede adoptar la pose que pide, así que no se sabe si la pieza queda en el suelo.",
24
29
  "figure.gate.hold-unmeasured.how": "Vuelva a definir la sujeción {hold} o quítela.",
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "この姿勢では、床固定 {hold} が計算する操作値だけでは部品を固定位置に置けません。再計算しても {nearest} mm 離れます。",
20
20
  "figure.gate.hold-slip.how-unreachable": "床固定 {hold} に計算する操作値を追加するか、{seconds} 秒の姿勢を変えてください。",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "床固定 {hold} に計算する操作値を追加するか、開始姿勢を変えてください。",
22
+ "figure.gate.public-input-refused.message": "図面でフィギュアを {at} の大きさに置くと、部品「{part}」を作れません。",
23
+ "figure.gate.public-input-refused.message-figure": "図面でフィギュアを {at} の大きさに置くと、フィギュアを作れません。",
24
+ "figure.gate.public-input-refused.why": "図面はフィギュアをサイズ範囲内のどの大きさにも置けます。この大きさでは形が成り立ちません。たとえば角の半径が辺の半分より大きくなります。",
25
+ "figure.gate.public-input-refused.how": "サイズタブの「図面でのサイズ範囲」で最小サイズを決めるか、その大きさでも部品「{part}」が収まるよう角の半径を小さくするか、サイズをフィギュアに合わせてください。",
26
+ "figure.gate.public-input-refused.how-figure": "サイズタブの「図面でのサイズ範囲」で最小サイズを決めるか、公開した値の範囲を狭めてください。",
22
27
  "figure.gate.hold-unmeasured.message": "床固定 {hold} を測れません。",
23
28
  "figure.gate.hold-unmeasured.why": "指定した部品や操作値がないか、その姿勢を作れないため、部品が床にあるか分かりません。",
24
29
  "figure.gate.hold-unmeasured.how": "床固定 {hold} を設定し直すか、解除してください。",
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "이 자세에서는 바닥 고정 「{hold}」이 계산하는 조작값만으로 부품을 고정된 자리에 둘 수 없습니다. 다시 계산해도 {nearest} mm 떨어집니다.",
20
20
  "figure.gate.hold-slip.how-unreachable": "바닥 고정 「{hold}」에 계산할 조작값을 더하거나, {seconds}초의 자세를 바꿔 주세요.",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "바닥 고정 「{hold}」에 계산할 조작값을 더하거나, 시작 자세를 바꿔 주세요.",
22
+ "figure.gate.public-input-refused.message": "도면에서 피규어를 {at} 크기로 놓으면 '{part}' 부품을 만들 수 없습니다.",
23
+ "figure.gate.public-input-refused.message-figure": "도면에서 피규어를 {at} 크기로 놓으면 피규어를 만들 수 없습니다.",
24
+ "figure.gate.public-input-refused.why": "도면은 피규어를 크기 범위 안의 어떤 크기로든 놓을 수 있습니다. 이 크기에서는 모양이 성립하지 않습니다. 예를 들어 모서리 반지름이 변 길이의 절반보다 커집니다.",
25
+ "figure.gate.public-input-refused.how": "크기 탭의 「도면에서의 크기 범위」에 최소 크기를 정하거나, 그 크기에서도 '{part}' 부품이 맞도록 모서리 반지름을 줄이거나 크기가 피규어를 따르게 해 주세요.",
26
+ "figure.gate.public-input-refused.how-figure": "크기 탭의 「도면에서의 크기 범위」에 최소 크기를 정하거나, 공개한 값의 범위를 좁혀 주세요.",
22
27
  "figure.gate.hold-unmeasured.message": "바닥 고정 「{hold}」: 부품이 바닥에 있는지 잴 수 없습니다.",
23
28
  "figure.gate.hold-unmeasured.why": "고정이 가리키는 부품이나 조작값이 없거나, 피규어를 그 자세로 만들 수 없어 부품이 바닥에 있는지 알 수 없습니다.",
24
29
  "figure.gate.hold-unmeasured.how": "바닥 고정 「{hold}」 설정을 다시 하거나 해제해 주세요.",
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "Dalam postur ini, kawalan yang diselesaikan oleh pegangan {hold} tidak dapat mengekalkan bahagian itu di tempatnya: diselesaikan semula, ia kekal {nearest} mm jauhnya.",
20
20
  "figure.gate.hold-slip.how-unreachable": "Tambah kawalan untuk diselesaikan oleh pegangan {hold}, atau ubah postur pada {seconds} s.",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "Tambah kawalan untuk diselesaikan oleh pegangan {hold}, atau ubah postur permulaan.",
22
+ "figure.gate.public-input-refused.message": "Bahagian '{part}' tidak dapat dibuat apabila lukisan meletakkan figura pada {at}.",
23
+ "figure.gate.public-input-refused.message-figure": "Figura tidak dapat dibuat apabila lukisan meletakkannya pada {at}.",
24
+ "figure.gate.public-input-refused.why": "Lukisan boleh meletakkan figura pada apa-apa saiz dalam julatnya. Pada saiz ini bentuknya tidak sah, contohnya jejari sudut lebih besar daripada separuh sisinya.",
25
+ "figure.gate.public-input-refused.how": "Tetapkan saiz terkecil dalam julat saiz lukisan (tab saiz), atau jadikan '{part}' muat pada saiz itu: jejari sudut yang lebih kecil, atau saiz yang mengikut figura.",
26
+ "figure.gate.public-input-refused.how-figure": "Tetapkan saiz terkecil dalam julat saiz lukisan (tab saiz), atau sempitkan julat nilai yang diterbitkan.",
22
27
  "figure.gate.hold-unmeasured.message": "Pegangan {hold} tidak dapat diukur.",
23
28
  "figure.gate.hold-unmeasured.why": "Apa yang dinamakannya tiada, atau figura tidak dapat dipose seperti yang diminta, jadi tidak diketahui sama ada bahagian kekal di lantai.",
24
29
  "figure.gate.hold-unmeasured.how": "Tetapkan semula pegangan {hold}, atau buangnya.",
@@ -19,6 +19,11 @@
19
19
  "figure.gate.hold-slip.why-unreachable": "在此姿势下,仅靠地面固定 {hold} 求解的控制值无法使部件保持在固定位置。重新求解后仍相差 {nearest} mm。",
20
20
  "figure.gate.hold-slip.how-unreachable": "请为地面固定 {hold} 添加要求解的控制值,或更改 {seconds} 秒处的姿势。",
21
21
  "figure.gate.hold-slip.how-unreachable-start": "请为地面固定 {hold} 添加要求解的控制值,或更改起始姿势。",
22
+ "figure.gate.public-input-refused.message": "在图纸上把模型放成 {at} 时,无法生成部件“{part}”。",
23
+ "figure.gate.public-input-refused.message-figure": "在图纸上把模型放成 {at} 时,无法生成模型。",
24
+ "figure.gate.public-input-refused.why": "图纸可以把模型放成尺寸范围内的任意大小。在这个尺寸下形状不成立,例如圆角半径大于边长的一半。",
25
+ "figure.gate.public-input-refused.how": "请在尺寸选项卡的“图纸中的尺寸范围”设置最小尺寸,或让部件“{part}”在该尺寸下也能成立:减小圆角半径,或让其尺寸跟随模型。",
26
+ "figure.gate.public-input-refused.how-figure": "请在尺寸选项卡的“图纸中的尺寸范围”设置最小尺寸,或缩小公开值的范围。",
22
27
  "figure.gate.hold-unmeasured.message": "无法测量地面固定 {hold}。",
23
28
  "figure.gate.hold-unmeasured.why": "它所指定的部件或控制值不存在,或模型无法摆出所需姿势,因此不知道部件是否在地面上。",
24
29
  "figure.gate.hold-unmeasured.how": "请重新设置或解除地面固定 {hold}。",