task(CAD-11): truss professional upgrade - chordCount (1-4 belt tubes) with adjustable rendering, free length input (10-1000cm), variable angle corners (15-165), circle truss tool with diameter option, BOM with chordCount grouping + Pi*d circumference
This commit is contained in:
@@ -67,11 +67,12 @@ beforeEach(() => {
|
||||
// ─── 1: Laengen-Presets + Breite ──────────────────────────────
|
||||
|
||||
describe('CAD-8: Laengen-Presets + Breite', () => {
|
||||
it('Laengen-Select: genau 50/100/200/300 cm', () => {
|
||||
it('Laengen-Select: freie Eingabe mit 50-300 Bereich (CAD-11: number)', () => {
|
||||
const lenField = trussTool.optionsSchema?.find((f) => f.key === 'length');
|
||||
expect(lenField).toBeDefined();
|
||||
expect(lenField!.type).toBe('select');
|
||||
expect((lenField!.options ?? []).map((o) => o.value)).toEqual(['50', '100', '200', '300']);
|
||||
expect(lenField!.type).toBe('number');
|
||||
expect(lenField!.min).toBe(10);
|
||||
expect(lenField!.max).toBe(1000);
|
||||
});
|
||||
|
||||
it('Breiten-Option trussWidth (number) vorhanden', () => {
|
||||
@@ -296,7 +297,7 @@ describe('CAD-8: Boxcorner-Rendering (L-Form)', () => {
|
||||
const poly = prims.find((p) => p.kind === 'polyline') as { points: Pt[]; close: boolean };
|
||||
expect(poly).toBeDefined();
|
||||
expect(poly.close).toBe(true);
|
||||
expect(poly.points).toHaveLength(6); // L-Geometrie: 6 Punkte
|
||||
expect(poly.points).toHaveLength(8); // CAD-11: variable-angle Geometrie hat 8 Punkte
|
||||
const minDist = Math.min(...poly.points.map((p) => Math.hypot(p.x - 100, p.y - 100)));
|
||||
expect(minDist).toBeLessThanOrEqual(29);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user