mirror of
https://github.com/gittrahan/support-fins.git
synced 2026-10-19 02:10:52 -05:00
curved walls: review fixes -- the 1% slack only when the ticked Full build has a curve (all-straight downhill walls are judged strictly), the readout's line doesn't claim the straight walls hold more (grip or a wedge can decide), and the spec gives the real build-time cost
This commit is contained in:
1 parent
810964407e
commit
1be63f6d53
6 files changed
+12
-8
No files matched your search
+1
-1
@@ -351,7 +351,7 @@ Not printed yet. Off by default; Auto and Full only, site only (plugins later).
|
||||
| whole build | ticked, in Auto no whole-build judge: not the downhill one, not one against the unticked build (Full: next row) | the user's choice; over 16 real cases it never changed the result anyway |
|
||||
| Auto fill, ticked | the fill pass (`fins/fill.js`, rows off) runs under the regions a curve won, there only; the readout counts it apart from Full coverage's (`curvedFill`) | forced curves left overhang the straight walls held (spiral X30 911 → 803 mm², bear X0 211 → 162); with the fill every measured case holds ≥ unticked (torus X30 471 → 835). Ticked Auto takes up to ~3.5 s longer on a big part |
|
||||
| known gaps, ticked | the downhill whole-build judge is skipped for non-bending regions too; the fill doesn't look at a neighbouring region a dropped straight wall also held; a forced swap may raise the lowest tine (bust Y60 17.90 → 18.16 mm, held 1557 → 3239 mm²) | review 2026-10-17: the judge rejected nothing on 9 stress models × 6 tilts + 4 real parts, and neighbour loss measured 0 on 6 parts; revisit on a print or a report |
|
||||
| Full, ticked | the unticked Full build is built too; the curved one stays only if it holds ≥ **99%** as much (`CURVED.fullSlack`), its lowest tine rises ≤ `gripRise` and no wedge is lost (`judgeDownhill`'s test); otherwise the straight build, and the readout says so (`curvedDropped`). Can still cost plastic for no gain (torus, held equal, +12% plastic) | the curves can break up the fill's rows (coffee bean on its side: held −2 to −5%); a strict test dropped the spiral (−0.8%) and bust X30 (−0.3%) too. Doubles Full's build time when ticked |
|
||||
| Full, ticked | the unticked Full build is built too; the curved one stays only if it holds ≥ **99%** as much (`CURVED.fullSlack`), its lowest tine rises ≤ `gripRise` and no wedge is lost (`judgeDownhill`'s test); the slack only when the ticked build has a bending wall (all straight: the strict test). Otherwise the straight build, and the readout says so (`curvedDropped`). Can still cost plastic for no gain (torus, held equal, +12% plastic) | the curves can break up the fill's rows (coffee bean on its side: held −2 to −5%); a strict test dropped the spiral (−0.8%) and bust X30 (−0.3%) too. Ticked Full builds up to ~2.5x as long (the curved build, plus the unticked one with its own downhill judge) |
|
||||
| switch | `opts.curvedWalls === true`; anything else is the race above, byte for byte | |
|
||||
|
||||
## Naming
|
||||
|
||||
+3
-1
@@ -251,7 +251,9 @@ function buildFinsCore(topo, result, rot, opts = {}) {
|
||||
if (mode !== 'full') return curved();
|
||||
return judgeDownhill(topo, result, rot, (on) => (on ? curved()
|
||||
: { ...buildFinsCore(topo, result, rot, { ...opts, curvedWalls: undefined }), curvedDropped: true }),
|
||||
CURVED.fullSlack);
|
||||
// the slack is for a curve: a ticked build whose downhill walls all run
|
||||
// straight is judged as the downhill walls are, strictly
|
||||
(b) => (bends(b.props.filter((q) => q.downhill)) ? CURVED.fullSlack : 0));
|
||||
}
|
||||
return judgeDownhill(topo, result, rot, (downhill) => buildFinsCore(topo, result, rot, { ...opts, downhill }));
|
||||
}
|
||||
|
||||
@@ -49,8 +49,9 @@ const wedges = (built) => (built.fins ?? []).filter((f) => f.kind === 'wedge').l
|
||||
* build's lowest KEPT tine, read through the tine capture (tines.js's
|
||||
* globalThis.__TINECAP, which the races already trim to the walls they keep); a
|
||||
* caller's own capture ends up holding the returned build's tines only.
|
||||
* `slack`: the share of the other build's held area `build(true)` may fall short by
|
||||
* (0 for downhill walls; Curved walls in Full coverage pass CURVED.fullSlack).
|
||||
* `slack`: the share of the other build's held area `build(true)` may fall short by,
|
||||
* or a function of `build(true)`'s result giving it (0 for downhill walls; Curved
|
||||
* walls in Full coverage allow CURVED.fullSlack when a curve is there to keep).
|
||||
*/
|
||||
export function judgeDownhill(topo, result, rot, build, slack = 0) {
|
||||
const outer = globalThis.__TINECAP;
|
||||
@@ -69,7 +70,8 @@ export function judgeDownhill(topo, result, rot, build, slack = 0) {
|
||||
const n = run(false);
|
||||
const cls = classify(topo, result, rot);
|
||||
const hn = heldArea(topo, result, rot, n.b, cls);
|
||||
const worse = heldArea(topo, result, rot, a.b, cls) < hn - slack * hn - 1e-6
|
||||
const s = typeof slack === 'function' ? slack(a.b) : slack;
|
||||
const worse = heldArea(topo, result, rot, a.b, cls) < hn - s * hn - 1e-6
|
||||
|| a.low > n.low + (Number.isFinite(n.low) ? gripRise(n.low) : 0)
|
||||
|| wedges(a.b) < wedges(n.b);
|
||||
if (worse) keep = n;
|
||||
|
||||
+1
-1
@@ -361,7 +361,7 @@ export default {
|
||||
"Auto already reaches every overhang here, so Full coverage added nothing.": "Auto erreicht hier bereits jeden Überhang, daher hat die vollständige Abdeckung nichts hinzugefügt.",
|
||||
"Curved walls: added {n} walls under overhang the curves left bare.": { one: "Gebogene Wände: {n} Wand unter Überhang ergänzt, den die Kurven frei ließen.", other: "Gebogene Wände: {n} Wände unter Überhang ergänzt, den die Kurven frei ließen." },
|
||||
"Curved walls stopped at the wall limit with {area} mm² of overhang still bare — untick it, or switch to Full coverage": "Gebogene Wände hat das Wandlimit erreicht, {area} mm² Überhang sind noch frei — deaktivieren oder zu Volle Abdeckung wechseln",
|
||||
"Curved walls: Full coverage holds more of this overhang with straight walls, so it kept them. Switch to Auto for the curves.": "Gebogene Wände: Volle Abdeckung hält diesen Überhang mit geraden Wänden besser und hat sie behalten. Für die Kurven zu Auto wechseln.",
|
||||
"Curved walls: Full coverage does better here with straight walls, so it kept them. Switch to Auto for the curves.": "Gebogene Wände: Volle Abdeckung schneidet hier mit geraden Wänden besser ab und hat sie behalten. Für die Kurven zu Auto wechseln.",
|
||||
"Full coverage stopped at its wall limit with {area} mm² of overhang still bare — rotate the part, or switch to Auto": "Vollständige Abdeckung stoppte am Wandlimit mit {area} mm² noch freiem Überhang — Bauteil drehen oder zu Auto wechseln",
|
||||
"{area} mm² of overhang no wall can reach this way up — tilt the part, or add a wall by hand": "{area} mm² Überhang kann in dieser Lage von keiner Wand erreicht werden — Bauteil neigen oder manuell eine Wand hinzufügen",
|
||||
"{n} overhangs are too shallow for a fin this way up. Tilt the part steeper so a fin can follow it (try Suggest orientation), or add a wall by hand.": { one: "{n} Überhang ist zu flach für eine Finne in dieser Lage. Neigen Sie das Bauteil steiler, damit eine Finne folgen kann (versuchen Sie „Ausrichtung vorschlagen“), oder fügen Sie manuell eine Stützwand hinzu.", other: "{n} Überhänge sind zu flach für eine Finne in dieser Lage. Neigen Sie das Bauteil steiler, damit eine Finne folgen kann (versuchen Sie „Ausrichtung vorschlagen“), oder fügen Sie manuell eine Stützwand hinzu." },
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@ export default {
|
||||
"Auto already reaches every overhang here, so Full coverage added nothing.": "O Automático já alcança todo balanço aqui, então a Cobertura total não adicionou nada.",
|
||||
"Curved walls: added {n} walls under overhang the curves left bare.": { one: "Paredes curvas: {n} parede adicionada sob o balanço que as curvas deixaram sem apoio.", other: "Paredes curvas: {n} paredes adicionadas sob o balanço que as curvas deixaram sem apoio." },
|
||||
"Curved walls stopped at the wall limit with {area} mm² of overhang still bare — untick it, or switch to Full coverage": "Paredes curvas parou no limite de paredes com {area} mm² de balanço ainda sem apoio — desmarque, ou mude para Cobertura total",
|
||||
"Curved walls: Full coverage holds more of this overhang with straight walls, so it kept them. Switch to Auto for the curves.": "Paredes curvas: a Cobertura total segura mais deste balanço com paredes retas, então ficou com elas. Mude para o Automático para ter as curvas.",
|
||||
"Curved walls: Full coverage does better here with straight walls, so it kept them. Switch to Auto for the curves.": "Paredes curvas: a Cobertura total se sai melhor aqui com paredes retas, então ficou com elas. Mude para o Automático para ter as curvas.",
|
||||
"Full coverage stopped at its wall limit with {area} mm² of overhang still bare — rotate the part, or switch to Auto": "A Cobertura total parou no limite de paredes com {area} mm² de balanço ainda sem apoio — gire a peça ou mude para Automático",
|
||||
"{area} mm² of overhang no wall can reach this way up — tilt the part, or add a wall by hand": "{area} mm² de balanço que nenhuma parede alcança nesta posição — incline a peça ou adicione uma parede à mão",
|
||||
"{n} overhangs are too shallow for a fin this way up. Tilt the part steeper so a fin can follow it (try Suggest orientation), or add a wall by hand.": { one: "{n} balanço é raso demais para uma aleta nesta posição. Incline mais a peça para uma aleta conseguir acompanhá-lo (tente Sugerir orientação), ou adicione uma parede à mão.", other: "{n} balanços são rasos demais para uma aleta nesta posição. Incline mais a peça para uma aleta conseguir acompanhá-los (tente Sugerir orientação), ou adicione uma parede à mão." },
|
||||
|
||||
+1
-1
@@ -426,7 +426,7 @@ function updateFinReadout(built, ms) {
|
||||
}
|
||||
// Curved walls in Full: the straight build held more, so it was kept
|
||||
if (built.curvedDropped) {
|
||||
help.push(t('Curved walls: Full coverage holds more of this overhang with straight walls, so it kept them. Switch to Auto for the curves.'));
|
||||
help.push(t('Curved walls: Full coverage does better here with straight walls, so it kept them. Switch to Auto for the curves.'));
|
||||
}
|
||||
// (in Full coverage the fill's own line above says what is still bare)
|
||||
if (built.unserved && !fl) {
|
||||
|
||||
Reference in new issue
Block a user