@things-factory/figure-ui 10.1.87 → 10.1.88

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/figure-ui",
3
- "version": "10.1.87",
3
+ "version": "10.1.88",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -40,9 +40,9 @@
40
40
  "@operato/shell": "^10.0.0",
41
41
  "@operato/styles": "^10.0.0",
42
42
  "@operato/utils": "^10.0.0",
43
- "@things-factory/ai-assistant": "^10.1.87",
43
+ "@things-factory/ai-assistant": "^10.1.88",
44
44
  "@things-factory/figure-service": "^10.1.84",
45
45
  "three": "^0.185.1"
46
46
  },
47
- "gitHead": "dc552c2a7b7f97e3377a26c378ee15d3a1de612a"
47
+ "gitHead": "11ece44d38c469f73aa28f4789f4baa244545097"
48
48
  }
@@ -230,3 +230,22 @@ test('길이를 바꿀 때 남는 면은 부품의 관계가 정한 것을 읽
230
230
  has(editorPanel, /m\?\.\[this\.axis\] !== 'editable'/)
231
231
  assert.equal(say('figure.text.section-editor-keeps', { face: ko['figure.label.face-bottom']! }), '아랫면 유지')
232
232
  })
233
+
234
+ test('ADR-0100 A1: 상자·판·벽은 같은 돌출에 처음 치수만 다르고, 더해도 숨은 부착이나 연결이 생기지 않는다', async () => {
235
+ const { paletteRecipe } = await import('../client/modeller/palette.ts')
236
+ const { addFigurePrimitive: add, figureSectionMeasuresOf } = await import('@hatiolab/figure-model')
237
+ const sizes: Record<string, unknown> = {}
238
+ for (const kind of ['box', 'plate', 'wall'] as const) {
239
+ const asset = add(createFigureAsset(kind), paletteRecipe(kind, kind))
240
+ const shape = asset.document.model.nodes.find(n => n.id === `${kind}.shape`)!
241
+ assert.equal(shape.op, 'extrude@1', `${kind} is a push`)
242
+ assert.equal(shape.params?.section, 'rectangle')
243
+ assert.deepEqual(asset.joints ?? [], [], `${kind}: no fastening made`)
244
+ assert.equal(asset.document.model.nodes.some(n => n.op === 'attach@1'), false, `${kind}: no attach node`)
245
+ assert.deepEqual(figureSectionMeasuresOf(asset, kind)!.measures, { y: 'editable', x: 'editable', z: 'editable' }, `${kind}: its own numbers, nothing followed`)
246
+ const s = (compileFigureAsset(asset).evaluate().geometry.find(g => (g as { id: string }).id === kind) as unknown as { shape: FigureEvaluatedShape }).shape
247
+ sizes[kind] = [(s.extrusion!.section as { size: Record<string, number> }).size.x, s.extrusion!.end - s.extrusion!.start]
248
+ }
249
+ assert.notDeepEqual(sizes.box, sizes.plate)
250
+ assert.notDeepEqual(sizes.plate, sizes.wall)
251
+ })