@things-factory/figure-service 10.1.47 → 10.1.48
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/dist-server/service/figure/figure-format.js +12 -0
- package/dist-server/service/figure/figure-format.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/server/service/figure/figure-format.test.ts +16 -0
- package/server/service/figure/figure-format.ts +12 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-service",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.48",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@hatiolab/figure-model": "^0.1.
|
|
26
|
+
"@hatiolab/figure-model": "^0.1.54",
|
|
27
27
|
"@operato/typeorm-history": "^10.0.0",
|
|
28
28
|
"@things-factory/ai-client-base": "^10.1.39",
|
|
29
29
|
"@things-factory/auth-base": "^10.1.47",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"graphql-upload": "^15.0.2",
|
|
34
34
|
"koa-router": "^7.4.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "448b0d568a1816d25aa49f3b6233d8086d6011f9"
|
|
37
37
|
}
|
|
@@ -276,6 +276,22 @@ describe('figure-format — 판을 알아보는 문', () => {
|
|
|
276
276
|
expect(`${finding!.message}${finding!.why}${finding!.how}`).not.toMatch(/come away|piece/)
|
|
277
277
|
})
|
|
278
278
|
|
|
279
|
+
/* 한 비율로 커진다고 선언한 도형에서 제 숫자를 가진 부품(수석 아키텍트 판정 2026-09-24 조건 ②). */
|
|
280
|
+
it('한 비율로 커진다고 선언한 도형에서 따라 커지지 않는 부품을 막고 이름을 댄다', () => {
|
|
281
|
+
let asset = createV3Asset('Uniform')
|
|
282
|
+
asset = addV3Box(asset, { id: 'body', size: { x: 100, y: 100, z: 100 }, position: { x: 0, y: 50, z: 0 } })
|
|
283
|
+
for (const axis of ['x', 'y', 'z']) {
|
|
284
|
+
asset.document.model.inputs.push({ id: `size.${axis}`, unit: 'mm', min: 1, max: 20000, role: 'design' } as never)
|
|
285
|
+
asset.designInputs[`size.${axis}`] = 100
|
|
286
|
+
}
|
|
287
|
+
asset = applyV3Authoring(asset, { kind: 'scale-uniformly' } as never)
|
|
288
|
+
const finding = inspectAnySource(serializeV3Asset(asset), null, translatorOf(KO)).findings.find(f => f.code === 'sizing-not-uniform')
|
|
289
|
+
|
|
290
|
+
expect(finding?.blocking).toBe(true)
|
|
291
|
+
expect(finding!.message).toBe("이 도형은 한 비율로 커지는데, 크기를 X 로 2배로 하면 'body' 부품은 같이 커지지 않습니다.")
|
|
292
|
+
expect(finding!.how).toContain('크기에 비례')
|
|
293
|
+
})
|
|
294
|
+
|
|
279
295
|
/* The server's translator is i18next with its defaults, which escape values for HTML. The panel draws text. */
|
|
280
296
|
it('부품 이름의 따옴표가 HTML 로 바뀌지 않는다 — 서버와 같은 i18next 로', async () => {
|
|
281
297
|
const i18next = require('i18next').createInstance()
|
|
@@ -177,6 +177,18 @@ function v3Wording(violation: V3Violation, say: Say, hasParts: boolean): Pick<Ga
|
|
|
177
177
|
how: say(key('how'), { parts }, `Fasten ${parts} to a face of the part they rest on, or press "fix here" under placement, so they stay put when the figure is resized.`)
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
+
case 'SIZING_NOT_UNIFORM': {
|
|
181
|
+
/* The figure declares it grows by one ratio; these parts keep a size or place of their own (ruling 2026-09-24). */
|
|
182
|
+
const resize = violation.resize!
|
|
183
|
+
const parts = (violation.parts ?? []).map(one => `'${one}'`).join(', ')
|
|
184
|
+
const axes = resize.axes.map(one => one.toUpperCase()).join('·')
|
|
185
|
+
const factor = resize.factor
|
|
186
|
+
return {
|
|
187
|
+
message: say(key('message'), { parts, axes, factor }, `The figure grows by one ratio, but at ${factor}x on ${axes} ${parts} do not grow with it.`),
|
|
188
|
+
why: say(key('why'), {}, 'A figure that grows by one ratio keeps its proportions at any size. A part with a size or place of its own comes apart from the rest.'),
|
|
189
|
+
how: say(key('how'), { parts }, `Let ${parts} follow the figure's size ("in proportion to size" under size and placement), or remove their own fixed numbers.`)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
180
192
|
}
|
|
181
193
|
}
|
|
182
194
|
|
package/translations/en.json
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"figure.gate.parts-split-on-resize.how": "Fasten {parts} to a face of the part they rest on, or press “fix here” under placement, so they stay put when the figure is resized.",
|
|
15
15
|
"figure.gate.parts-split-on-resize.message": "At {factor}x on {axes}, {parts} come away from the rest of the figure.",
|
|
16
16
|
"figure.gate.parts-split-on-resize.why": "A figure placed at another size shows those parts hanging in the air — to a person, it looks broken.",
|
|
17
|
+
"figure.gate.sizing-not-uniform.how": "Let {parts} follow the figure's size (“in proportion to size” under size and placement), or remove their own fixed numbers.",
|
|
18
|
+
"figure.gate.sizing-not-uniform.message": "The figure grows by one ratio, but at {factor}x on {axes} {parts} do not grow with it.",
|
|
19
|
+
"figure.gate.sizing-not-uniform.why": "A figure that grows by one ratio keeps its proportions at any size. A part with a size or place of its own comes apart from the rest.",
|
|
17
20
|
"figure.gate.placement-face-tilted.how": "Choose a mounting face parallel to the plane, or turn '{part}' upright.",
|
|
18
21
|
"figure.gate.placement-face-tilted.message": "The mounting face of '{part}' is tilted {degrees}° from the plane the figure stands on.",
|
|
19
22
|
"figure.gate.placement-face-tilted.why": "A tilted face cannot lie on the plane, so how the figure stands is not settled.",
|
package/translations/ko.json
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"figure.gate.parts-split-on-resize.how": "{parts} 부품을 올려 둔 부품의 면에 붙이거나, 부품의 「위치와 크기」에서 「여기에 고정」을 누르면 크기를 바꿔도 제자리에 있습니다.",
|
|
15
15
|
"figure.gate.parts-split-on-resize.message": "크기를 {axes} 로 {factor}배로 하면 {parts} 부품이 나머지에서 떨어집니다.",
|
|
16
16
|
"figure.gate.parts-split-on-resize.why": "다른 크기로 놓으면 그 부품이 공중에 떠 보입니다. 보는 사람에게는 부서진 도형입니다.",
|
|
17
|
+
"figure.gate.sizing-not-uniform.how": "{parts} 부품이 도형 크기를 따르게 하세요(「위치와 크기」의 「크기에 비례」). 제 고정 숫자를 가진 부품은 한 비율로 커지지 않습니다.",
|
|
18
|
+
"figure.gate.sizing-not-uniform.message": "이 도형은 한 비율로 커지는데, 크기를 {axes} 로 {factor}배로 하면 {parts} 부품은 같이 커지지 않습니다.",
|
|
19
|
+
"figure.gate.sizing-not-uniform.why": "한 비율로 커지는 도형은 어떤 크기에서도 비례를 지킵니다. 제 크기나 자리를 따로 가진 부품은 나머지와 어긋납니다.",
|
|
17
20
|
"figure.gate.placement-face-tilted.how": "평면과 나란한 면을 장착면으로 다시 정하거나, '{part}' 부품을 바로 세우세요.",
|
|
18
21
|
"figure.gate.placement-face-tilted.message": "장착면으로 정한 '{part}' 부품의 면이 놓이는 평면에서 {degrees}° 기울어 있습니다.",
|
|
19
22
|
"figure.gate.placement-face-tilted.why": "기운 면은 평면에 닿을 수 없어서, 도형이 어떤 자세로 놓이는지 정해지지 않습니다.",
|