Commit Graph
20 Commits
Author SHA1 Message Date
matthewtrahan 93bb5565f4 plugins: the Material option becomes the site's Support gap -- PLA's pad numbers, a 0.1-0.4 gap field in every dialog, Cura's Match Cura and Onshape's PLA/PETG/Custom go 2026-10-14 07:54:03 -05:00
matthewtrahan 50e21cb03e layer height: max 0.6 mm on the site and in the plugin dialogs -- 0.6 and 0.8 nozzle prints slice thicker than the old 0.4 cap, and the tine must be one of their layers 2026-10-13 14:09:43 -05:00
Matthew Trahanandmatthewtrahan f2147bd19f Plate only: every support on the build plate, none on the part (#218) (#221)
* engine: plateOnly -- every support on the build plate, none on the part (#218). Auto and the short walls drop a line the part-attached path would take (built or floored) and count it as skipped.onPart, never stilting it to the plate through the part; drawnWall refuses a line with part under it, naming the setting, and its squat fallback skips the part; the fill pass never retries a wall on the part. Off by default: sweep vs main identical. tests: plate_only -- a drawn line over the part refused, over open plate byte-identical; Auto and Full on the portal at Y90 build nothing on the part and count it; off, the lbracket is unchanged

* ui + plugins: a Plate only checkbox under Walls (#218) -- read by the auto build and the drawn walls; the readout says how many supports it left off and why, and names it when it emptied a part; undoable; German strings. options.json gains plateOnly, so every plugin dialog shows it, and both entries pass it on. tests: the dead-control check runs it on the portal at Y90 (the lbracket has no wall on the part); FreeCAD and Blender unit fixtures list it

* plate only: Full refuses a line over the part before building it, and a mixed line keeps its plate stretch (review) -- the local pass turned the on-part retry back on, and every try reached drawnWall to be refused: the portal at Y90 spent all 120 tries and blamed the wall limit. stationClear's `plate` now refuses a station with part under it on every try. Auto hands a line the part-attached path claims to the plate path (its column probes trim the stations over the part) instead of dropping it whole. The readout names Plate only when it emptied a part in any mode, not only Prop; German help line. tests: every built support reaches the plate, Full isn't capped

---------

Co-authored-by: matthewtrahan <mathyout@pm.me>
2026-10-08 22:32:15 -05:00
matthewtrahan 7b13a58601 plugins/shared: the bridge exports reportLine, for a host whose dialog is a web page (SolidWorks) to show the shared result line; every other export unchanged 2026-10-05 20:51:22 -05:00
matthewtrahan d89f72f0df engine: sway brace tines kiss the part's face (kissEnds), and the material's tine bite is gone -- one SWAY.tineReach 0.3 gates placement; Material tooltip no longer claims PETG shrinks a bite; same braces and tines on 16 cases x PLA/PETG, slices identical on 30 of 32 (lighthouse Y90 notch: +-0.13 mm2) 2026-10-03 15:14:03 -05:00
matthewtrahan 902f0f48f3 shared: review fixes -- overFaces is the site's red (kept), smallFaces its amber; draw tests compare coordinates
overFaces was every face past the threshold, but the site paints only the faces in
regions it supports red (res.kept) and the too-small ones amber. A host painting
overFaces red would have called slivers overhangs that no fin targets. Now
overFaces = red, smallFaces = amber, both pinned to paintOverhangs' rule (a shelf +
2 mm nub part gives an amber face, so that half of the check runs).

drawWall: the site comparison checks where the wall is, not just its counts, on an
off-centre part; layer height 0.1 / 0.3 reach the wall. host_draw_wall refuses a
NaN end in Python instead of a raw JS parse error; stats say partAttached.
2026-10-01 08:32:48 -05:00
matthewtrahan 33bce1252e shared: Draw mode for the plugins -- drawWall builds one hand-drawn wall the way the site's Draw does
engine/draw_entry.js drawWall(soup, a, b, options): the part as computeFins takes it
and the two clicked points in the same frame -> web/draw.js drawnWall, called as
web/ui/walls.js calls it (print-frame part, the material's tunables set). Same seat
as computeFins, so the wall is bit-identical wherever the part sits; a wall it can't
build comes back with the site's reason ("wall too short ..."). Bridge: drawWallB64;
Python: host_draw_wall.

Tests pin it to the site's wall (PLA and PETG), plate-position independent, no
clearance leak into the next wall or the next computeFins.
2026-10-01 08:32:48 -05:00
matthewtrahan 2e7503aa43 shared: computeFins says which triangles are which fin (pieces) and which faces overhang -- for a host that shows one object per fin
A host that wants each wall as its own object (Blender next) had to call buildFins
itself to get the fin ranges, skipping the entry's seat and material clearances.
computeFins now returns pieces ({id, kind, ranges} in triangles of its soup; every
triangle in exactly one) and overFaces (input faces analyze() marks red). Python:
host_compute_pieces; host_compute is unchanged for Orca, Cura and FreeCAD.

The seat (centre + 1 nm snap) and the material clearances move to engine/seat.js
so the next entry (Draw mode) seats a part exactly the same way.
2026-10-01 08:32:48 -05:00
matthewtrahan 597aaa33db cli: review fixes -- --rot reads the site's X·Y·Z readout, --fins-only lines up with the file's part, own 3MF refused
- --rot is three.js Euler XYZ (Rx*Ry*Rz), the order printfins.com shows under
  the part, so a pose found on the site carries over
- --fins-only maps the fins back onto the part as it is in the file; it can't
  take --rot, and writes nothing when there are no fins
- a Support Fins 3MF (part + fins) is refused instead of finned again
- settings the site would hide warn on stderr; -o can't overwrite the input;
  -- ends the options; Node 20.10+
- the summary rounds ties to even, word for word with Python's host_report
2026-09-30 18:30:03 -05:00
matthewtrahan d0c8f7f098 plugins: the one-line result in JS (engine/report.js) -- word for word with Python's host_report, for the command line 2026-09-30 18:30:03 -05:00
matthewtrahan 30a402b742 plugins: sway braces come back as their own block -- Fusion names them Sway brace N, not fins (local issue 018)
The entry's soup was fins+braces | pad, split only by finTriangles, so Fusion built
a braced 150 mm post as 4 'Support fin' bodies and headlined 4 fins. Now
finTriangles is fins only and swayTriangles follows it (fins | braces | pad); Fusion
splits three ways and counts fins from fins alone. Readouts (host_report) name sway
braces apart from walls. Fusion's Grip from / Brace tine spacing now need Tines too,
as on the site. Fusion add-in 0.6.1.
2026-09-30 13:18:37 -05:00
matthewtrahan 073d168c02 plugins: readouts count plain walls; engine errors reach the user as one line
With Tines off every wall is a plain prop, which the entry's stats didn't carry, so
host_report said "0 walls" under a part with four. stats.props is new and walls =
braces + props, as the site counts them. host_options now raises a ValueError with
just the engine's message; V8's text carried the whole bundle source after it.
2026-09-30 12:55:56 -05:00
matthewtrahan b59b9099bc plugins: optionsFromDialog is strict -- refuses bad values instead of guessing; Python gets host_options
"false" was true, '' and None became the minimum, and a percent sent without the /100
was clamped to 1 (coverage 50 -> 1): all silent. Now bools take true/false or their
strings, null/'' mean the default, and anything out of range throws, naming the /100.
The slicer's own layer height is used as is (the site doesn't clamp it either).
Python hosts get host_schema / host_options / host_visible through the bridge. The
defaults test compared a cube with no fins (0 == 0); it now uses lbracket and the
sway-braced bar.
2026-09-30 12:25:40 -05:00
matthewtrahan 909de5ba8c plugins: options review fixes -- showIf grammar, optionsFromDialog/optionVisible, layer height + overhang angle
showIf is now a list (all must hold) of bool keys, {key, in} and {any}, enough for the
site's rules: brace grip/spacing need sway AND tines; layer height shows with tines or
a one-layer pad. Hosts pass dialog values through optionsFromDialog (nest, clamp,
check, drop sway when off) and ask optionVisible, so no host re-implements either.
Matthew's calls: layerHeight in (hostSupplied: slicer, CAD hosts show it), the
overhang angle in, placement mode stays Auto only. Tests: every site control is in
the schema or listed as excluded with a reason; pad styles are the entry's own list.
2026-09-30 12:25:40 -05:00
matthewtrahan f12cb8cca4 plugins: options.json -- one settings schema every plugin dialog is built from
Material, tines, tine grip, bed pad (Off/Auto/Light/Sure hold), sway braces, cutouts
and coverage, with the site's labels and tooltips. Tests pin every default, range and
choice to web/index.html, the choices to the engine's own lists, and check each option
changes the fins (no dead control). The entry takes its defaults from the file, and
padStyle 'off' is the site's Off.
2026-09-30 12:25:40 -05:00
matthewtrahan e3a8f40be5 plugins: entry review fixes -- tests compare PETG geometry to the site's, pin PLA to the engine's built-ins
The PETG check compared counts only, which PLA passes too; it now compares every
vertex (site copy snapped to 1 nm like the entry, else tine noise). New: PLA profile
must equal FIN/PAD/PROP/PERP/SWAY defaults; sway braces carry the material and a
null gap/bite from a host counts as unset. Each option test resets in finally.
2026-09-30 11:19:03 -05:00
matthewtrahan 5cc1da01ac plugins: entry takes material, padStyle and cutout -- plugins can print PETG, the site's pad styles and wall cutouts
The entry sends the full clearance set on every call, as the site's worker does:
buildFins keeps it as module state and a plugin's V8 context lives across calls,
so a partial set would leak PETG into the next PLA run. Unknown values throw
instead of silently building PLA. Sway braces take the material's gap and bite.
2026-09-30 11:19:03 -05:00
Mitch MilamandClaude Opus 5 b40a2ce54c engine: let a plugin ask for sway braces
The braces (web/sway.js) shipped on the site in #29, but no plugin could
reach them: computeFins forwards an explicit list of options to buildFins,
and `sway` was not on it, so every host silently got fins only.

It now forwards `sway` whole -- a host passes the same object the website's
options panel builds -- and reports the result apart from the fins:
swayBraces / swayTines / swaySkipped, plus swayReason for a host that asked
and got none. Off by default, so nothing changes for a caller that says
nothing: ENGINE_DEFAULTS.sway is null and the geometry is byte-identical.

Braces land in the same soup as the fins, so stats.finTriangles counts them
too; splitting them per body would need per-brace ranges this entry point
does not expose yet. Noted where it matters.

Tests: off by default is unchanged, { on: true } braces a tall post and says
so, the counts match the website brace for brace, tine spacing and "grip
from" reach the braces, and a part too short to brace reports why while its
fins still build. 26 pass in this suite, 200 across the JS suites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-30 08:11:47 -05:00
MorbidJ-hub c274b73d6c engine: flag pieces that start in mid-air
floatingPieces() (overhangs.js) finds any closed piece of the mesh that
neither reaches the plate nor rests on another piece (within 0.3 mm).
buildFins() returns them as built.floating and the readout says so; the
plugins' stats carry floating and floatingDrop.

Split out of #84 and ported onto the fins.js split.
2026-09-27 13:48:23 -05:00
matthewtrahan 8518e0451d plugins: move the engine bridge and bundle step into plugins/shared (step 1 of one engine for every plugin)
Orca's engine glue wasn't Orca-specific. Move it where the Fusion add-in (and any
later JS-running plugin) can use it too:

- plugins/orca/panel/fins_entry.js     -> plugins/shared/engine/fins_entry.js
- plugins/orca/panel/engine_bridge.js  -> plugins/shared/engine/bridge.js
- the esbuild step in orca/build.py    -> plugins/shared/bundle.py (bundle_engine)
- bridge/entry tests, sensitivity repro and ENGINE-SENSITIVITY.md move with them

No behaviour change: the built Orca plugin and its engine bundle are
byte-identical to main's. The Python V8 loader stays in Orca for now; it moves
to shared when Fusion needs it.
2026-09-25 16:18:40 -05:00