Skip to content

Releases: VektorNode/selva

Selva Plugin plugin-v0.22.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 11:01

Added

Hidden tabs (schema 2.15.0)

  • Tabs take an optional visible flag, toggled with the eye button on a tab in the builder. A hidden tab never shows in the web UI; its inputs still solve with their current values.
  • A tab whose groups are all hidden (by visible: false or visibility conditions) is hidden too, and a side panel with no visible tabs collapses away. Saved schemas upgrade automatically; absent means visible.
  • Update Selva Cloud before installing this plugin on a Rhino.Compute server: an older Selva rejects 2.15 schemas.

Material Preset component (Selva > Display)

  • Outputs a ready material for a real finish: stainless steel brushed, aluminium mill finish, galvanised steel, weathered titanium zinc, copper, coil-coated (RAL), wood, concrete, glass, brass, titanium. Metal and concrete base colours are measured values from physicallybased.info. Wire it into a Display, or into Three Material's Base to override parts of it.
  • Materials carry an optional FinishStrength (wire finishStrength) that scales the brushed or rolled finish; 0 turns it off. Presets can set it; Three Material passes its Base's through.

Live solve channel

  • The plugin reports each solve while it runs: solveStarted, progress, diagnostics and solveEnded as SolveEvents. Locally they ride the WebSocket; on Rhino.Compute (VektorNode fork) the plugin POSTs them to the callback named in the request's selvaevents block, batched with a heartbeat. In plain Grasshopper they are dropped.
  • Abort from the web UI: a cancelSolve WebSocket message locally, the callback reply's abort flag on Compute. Either sets Grasshopper's abort flag, so the solve stops at the next component.
  • The plugin decides each solve's verdict once (SolveOutcome: diagnostics, blocked, aborted). Locally it travels on the outputs envelope as outcome; on Compute the fork returns it as the response's selva block. A blocked or aborted solve sends empty outputs, so the client clears the previous result.

Message component (Selva > Utilities, hidden)

  • Raises a remark, warning or error when Condition is false and passes Condition through as Passed. An error blocks the solve's outputs from reaching the web UI; downstream components still compute, so gate expensive work on Passed.
  • Level (Remark/Warning/Error) and Notify (Popup/Log) are integer inputs with named values on right-click. Log adds the message to the list without interrupting; errors always interrupt.

Report Progress component (Selva > Utilities, hidden)

  • Wired inline before a step, it passes Data through and shows Message with a progress bar in the web UI. The plugin derives the fraction from which reporters run this solution, weighted by each step's last timing, so authors never write one and the bar only moves forward.

Fixed

  • Changing a Value List from the web UI no longer solves the definition twice.
  • Upgrading an obsolete component keeps values internalized in its colour, file and other non-primitive inputs. They were dropped, so an upgraded Three Material with a set colour turned white.
  • Web Display's grain UVs (anisotropic materials) no longer tilt on coarse flat parts or squeeze texture on faces oblique to the grain, follow each leg of a mitred corner piece instead of running vertical, and are now in millimetres whatever the model unit.

Added

Prepare UI Inputs

  • New Selva > UI component, Prepare UI Inputs (Plugin/Selva.GH/Features/UIBuilder/Components/GH_PrepareUIInputs.cs). Registers existing Number Sliders, Value Lists, Boolean Toggles, and Panels by instance GUID, previews the contextual parameter (Get Number, Get Integer, Get Value List, Get Boolean, Get String) each one infers from its live data, and inserts it between the control and the inputs it drives - or beside a disconnected control - as one undoable, previewed operation. Existing compatible Get parameters are recognized and can be adopted, renamed, or repaired. Removal reverses the insertion and never deletes a node the component did not create or explicitly adopt.
  • Ported from a WASPer plugin prototype (Components/1.2_Studies/Sm06) per 00_Plans/SELVA_PREPARE_UI_INPUTS_PLAN.md; the classification and inference math live in Services/PrepareUIInputInference.cs, split out with no Grasshopper dependency so it is covered by unit tests in Plugin/Selva.Tests.

Changed

sourceComponentId is now batchId

  • The field was never "the component that made this mesh" — it is the batch's identity namespace, which with a mesh's originalIndex forms the key that survives a solve (hidden state, selection, per-object overrides). It is usually the producing Display's InstanceGuid, but a combined batch takes the combiner's id, and the old name actively misled there. "Which component produced this mesh" is the per-mesh gh:component attr instead.
  • Renamed in the C# API and in the SLVM EXTN chunk. The JSON wire name is unchanged (sourceComponentId in the values envelope and on mesh userData): it is the contract with published @selvajs/* releases and is baked into every pre-v3 blob, .gh archive and .slvm file. Containers written with the old EXTN spelling are still read, on both stacks, pinned by a regression test each side.

SLVM v3 — one chunked container for wire and file

  • The mesh payload is now an SLVM v3 chunked container (magic SLVM, fourcc chunks, unknown types skipped by length) — the same bytes on the wire, in .gh archives, and on disk as .slvm. It replaces three nested layers: the DMF1 file sidecar, the JSON metadata embedded in the geometry blob, and the duplicate copy of that metadata the old file carried (a 12,679-mesh scene shrinks from 3.05 MB to 1.33 MB on disk).
  • The object table is columnar and pays only for what's present: vertex/index windows are prefix sums (never stored), auto-numbered names cost one byte total, layers/names dedupe through a string pool, and per-mesh metadata is stored as sparse attr columns — the key once, then only the objects carrying it. Namespaced keys (gh:branch, ifc:guid, …) give hosts and users a first-class slot for per-mesh provenance.
  • Grasshopper concepts left the core format: sourceComponentId and the Rhino NURBS JSON behind curves now live in a namespaced EXTN "selva.gh" chunk a foreign reader can skip. Object identity now travels inside the container's own table, so Display From File no longer restamps it on load — its Id input is gone; see Obsolete components below.
  • Curves and points became core objects in the file: their polylines/positions are stored through the same quantize+delta codec as meshes (CRVS/PNTS chunks) instead of JSON double arrays. Data-URI textures are extracted into binary TEXR chunks and reconstructed on read.
  • Everything old still reads: DMF1 files, bare SLVA/SLVZ blobs in saved .gh files, and every geometry blob back to v1 — readers dispatch on the leading magic. New bytes are always SLVM v3, so the web app must run a matching @selvajs/visualization release.
  • The codec (reader/writer, container, identity) moved into its own Rhino-free Selva.Slva project, so it builds and tests independently of Selva.GH. See Selva.Slva/README.md.

WebDisplay → Mesh cast: bulk join, honest validity

  • Casting a Web Display into a Mesh param now appends the whole mesh sequence in one call instead of one Append per mesh — quadratic before, 27 s → 35 ms on a 12,679-mesh batch — and validates the joined mesh with IsValid instead of Faces.Count > 0, so a failed join fails the cast instead of leaking corrupt geometry downstream.
  • Degenerate faces produced by quantization (triangles thinner than one int16 step collapse to a line) are culled when meshes are rebuilt from a batch, so previews, casts and the new components below always hand Grasshopper valid meshes.

Added

Deconstruct Display component

  • Unpacks a Web Display into one Rhino mesh per entry in its mesh table — with names, layers and material colours as parallel lists — instead of forcing the single-mesh join. The route that preserves per-mesh identity on large batches.

Combine Display component

  • Collapses every branch of a Web Display tree into one payload on the same path: a branch holding five Displays becomes one. The tree structure survives, so a downstream Display To File writes one file per branch instead of one per item, and the viewer receives one payload per branch.
  • Merging is a real re-encode, not a concatenation. Materials dedupe across a branch, so Displays sharing a material collapse into one group — one draw call in the browser instead of several — and the geometry is re-quantized over the branch's union bounding box for a single optimal blob. Measured on two real scenes (6,043 + 12,679 meshes): 2.31 MB of separate payloads → 1.90 MB combined, in 0.7 s.
  • Each merged payload takes its own id (the component's, plus the branch path) for web pick identity, so every mesh records where it came from in the gh:component / gh:originalIndex metadata attrs — provenance survives the merge, and survives a second merge too. An unreadable input is skipped with a warning naming its branch instead of failing the whole combine.

Performance

WebDisplay: SLVA v4 — 28–50% smaller mesh payloads

  • The mesh wire format gained a fourth version. Its delta-filtered vertex, index and UV streams can now be stored as byte planes (all X deltas, then Y, then Z, low bytes before high) instead of interleaved values. Near-zero deltas turn the high planes into runs of zeros, so the DEFLATE pass compresses far better. Measured through the real writer: a welded 65k-vertex surface 144 KB → 104 KB (−28%), a 262k-vertex surface 636 KB → 409 KB (−36%), a 3000-part CAD scatter 116 KB → 58 KB (−50%). Cloud delivery multiplies each saving by 1.33×, since the payload is base64-encoded.
  • **The l...
Read more

@selvajs/visualization@1.5.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Minor Changes

  • 78727bf: Fix z-fighting on thin closed parts (sheet metal, hems) up close. Meshes detected as closed, outward-facing solids now cull their back faces, and the dynamic near plane fits to the nearest geometry in view instead of the whole scene's bounding sphere. Surfaces' slope-based polygon offset is halved, so parts just behind a surface seen at a grazing angle no longer show through it from about 2 m away.

    cullBackfaces: true now forces FrontSide on every mesh; left off, only detected closed solids are culled. LookMaterialOverride takes an optional side, which the x-ray and wireframe looks set to DoubleSide so culled solids still show their far side.

  • 78727bf: Metals reflect a soft studio room instead of the scene HDR. The HDR's hard horizon over a near-black ground made a metal face split into a blown-out white band and a black one, jagged wherever roughness varied. Non-metals keep the HDR, so the looks don't change for them. The studio probe is each metal material's own envMap, which also makes three honour the material's envMapIntensity (a wire material's own value, else the look's blended toward 1 by metalness); with only scene.environment, three overwrites envMapIntensity with scene.environmentIntensity on every draw. The automatic satin clearcoat on metals is gone; set clearcoat on the wire material to get a coat back. Saved metal materials render differently after this change.

    Meshes with UVs get a tangent attribute built from them, so anisotropy and normal maps no longer use noisy screen-space derivatives, and stay finite where U or V is constant.

    Wire materials take optional mapSize (mm one texture repeat covers; maps then use RepeatWrapping), finish ('brushed' or 'rolled': procedural scratch fibres along the grain, in roughness, brightness and the normal, with brushing-pass bands that still read at a distance), finishStrength (scales the finish; 0 off), transmission and ior (glass).

Patch Changes

  • 78727bf: Fix shading and aliasing artifacts on sheet-metal models. Normals are recomputed from a full weld, area-weighted and split at creases sharper than 30°, so faces welded across a fold no longer smear into streaks around holes, and identical parts shade alike however the writer welded their seams. Closed-solid detection welds seam copies that float32 rounding left a step or two apart, so closed Breps are culled reliably. With ambient occlusion on, the scene renders with 4× MSAA below 2× DPR and at the full pixel ratio (aoPixelRatio now caps only the AO buffers), removing dashed highlights, jagged silhouettes and HiDPI blur. The dynamic near plane measures triangles clipped to the view, so a large mesh beside the camera no longer pins it to the floor.

@selvajs/ui@6.5.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Minor Changes

  • 78727bf: Tabs take an optional visible flag (schema 2.15.0); visible: false hides the tab. A tab whose groups are all hidden is hidden too, and a side panel with no visible tabs collapses away.

@selvajs/solve@1.2.2

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Patch Changes

  • Updated dependencies [3daeb50]
  • Updated dependencies [78727bf]
    • @selvajs/platform@0.20.2
    • @selvajs/schemas@5.2.0

@selvajs/selva@4.19.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Minor Changes

  • 78727bf: Supports UI schema 2.15.0 (hidden tabs) and ships the new viewer: metal reflections, procedural brushed/rolled finishes, glass, closed-solid culling and 4× MSAA. Update Selva before the Rhino.Compute server's plugin: an older Selva rejects every schema a 2.15 plugin extracts as "authored with a newer Selva plugin".

@selvajs/schemas@5.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Minor Changes

  • 78727bf: Tabs take an optional visible flag (schema 2.15.0); visible: false hides the tab. A tab whose groups are all hidden is hidden too, and a side panel with no visible tabs collapses away.

@selvajs/platform@0.20.2

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Patch Changes

  • 3daeb50: Widen the optional vitest peer range to ^3.2.4 || ^4.0.0 || ^5.0.0, so consumers on vitest 4 or 5 no longer hit an npm ERESOLVE. The contract suites in @selvajs/platform/testing already run on vitest 5 here.
  • Updated dependencies [78727bf]
    • @selvajs/schemas@5.2.0

@selvajs/notifications@0.2.2

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

Patch Changes

  • Updated dependencies [3daeb50]
    • @selvajs/platform@0.20.2

@selvajs/cli@4.19.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 11:34
7cb4f98

No changes in this release.

Selva Plugin plugin-v0.21.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 13:52