fe-map: optional measurement along a sphere (shape conceded, radius free, haversine distance); land dots in the 3D view

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Toby
2026-10-31 13:44:40 -04:00
parent a5fe852429
commit 01ffa67de6
6 changed files with 482 additions and 64 deletions
+13
View File
@@ -97,6 +97,19 @@ console.log('3D', JSON.stringify(r3));
if (!(parseInt(r3.w) > 120)) fail('3D release did not wrap round', r3.w);
if (!(+r3.b.replace(/,/g, '') < +r3.f.replace(/,/g, ''))) fail('3D not better than the plane', r3);
await p.locator('.lift').screenshot({ path: path.join(here, 'out/femap_3d.png') });
// measured along a sphere (assumes the shape, leaves its size free)
await p.click('#arc');
await p.waitForFunction(() => document.getElementById('r3s').textContent === 'done', null, { timeout: 180000 });
const ra = await p.evaluate(() => ({ b: +document.getElementById('r3b').textContent.replace(/,/g, ''), r: +document.getElementById('r3r').textContent.replace(/[^\d]/g, ''),
o: +document.getElementById('r3o').textContent.replace(/[^\d]/g, ''), note: document.getElementById('note3').textContent }));
console.log('Along a sphere', JSON.stringify({ b: ra.b, r: ra.r, o: ra.o }));
if (!(ra.r > 6200 && ra.r < 6700)) fail('radius along a sphere out of range', ra.r);
if (!(ra.b <= 5) || !(ra.o > 0 && ra.o < 1000)) fail('sphere fit poor', ra);
if (!/haversine/.test(ra.note) || !/Assumes a sphere/.test(ra.note)) fail('sphere caveat missing', ra.note);
await p.locator('.lift').screenshot({ path: path.join(here, 'out/femap_arc.png') });
await p.click('#arc');
await p.waitForFunction(() => document.getElementById('r3s').textContent === 'done', null, { timeout: 180000 });
if (!/No shape is assumed/.test(await p.evaluate(() => document.getElementById('note3').textContent))) fail('free-mode note not restored');
if (errs.length) fail('errors', errs.slice(0, 3));
console.log(fails ? `femap: ${fails} FAILS` : 'femap OK');
await b.close();