fix(3d): unified conveyorNetwork, physical B receiver, C/D containment, belt sync, real STL

This commit is contained in:
root
2026-07-09 17:18:32 +02:00
parent 1528cfce10
commit 8e9ae4f62b
53 changed files with 1101 additions and 170 deletions

View File

@@ -53,6 +53,34 @@ describe('modelAssets', () => {
});
});
describe('demo STL coverage', () => {
it('uses real STL for every available demo model', () => {
const stlMap: Record<string, string> = {
'SKU-001': '/models/box-300.stl',
'SKU-002': '/models/lunchbox.stl',
'SKU-004': '/models/box-400.stl',
'SKU-006': '/models/plate.stl',
'SKU-007': '/models/bottle.stl',
'SKU-008': '/models/cylinder.stl',
'SKU-011': '/models/cylinder.stl', // c_priority round item
};
for (const [id, path] of Object.entries(stlMap)) {
const asset = getModelAsset(id);
expect(asset?.loaderType).toBe('stl');
expect(asset?.frontendAssetPath).toBe(path);
}
});
it('keeps fallbacks explicit and only for heavy/missing STL', () => {
const fallbackIds = ['SKU-003', 'SKU-005', 'SKU-009', 'SKU-010'];
for (const id of fallbackIds) {
const asset = getModelAsset(id);
expect(asset?.loaderType).toBe('procedural');
expect(asset?.notes).toBeTruthy();
}
});
});
describe('getModelAsset', () => {
it('should return asset for valid item ID', () => {
const asset = getModelAsset('SKU-006');

View File

@@ -158,11 +158,11 @@ export const MODEL_ASSETS: ModelAsset[] = [
displayName: 'Oversized round',
categoryScenario: 'C',
dimensions: { width: 500, depth: 300, height: 300 },
sourceFile: 'N/A',
frontendAssetPath: undefined,
loaderType: 'procedural',
sourceFile: 'input_info/extracted/Stl/Цилиндр.stl',
frontendAssetPath: '/models/cylinder.stl',
loaderType: 'stl',
fallbackPrimitive: 'cylinder',
notes: 'No STL available for oversized round, using procedural cylinder.',
notes: 'Uses available round STL (cylinder.stl, 106 KB) for the oversized-round C-priority case.',
},
];