Repository navigation
Releases: VektorNode/selva
Release list
Selva Plugin plugin-v0.22.0
Added
Hidden tabs (schema 2.15.0)
- Tabs take an optional
visibleflag, 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: falseor 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
Baseto override parts of it. - Materials carry an optional
FinishStrength(wirefinishStrength) that scales the brushed or rolled finish; 0 turns it off. Presets can set it; Three Material passes itsBase's through.
Live solve channel
- The plugin reports each solve while it runs:
solveStarted,progress, diagnostics andsolveEndedasSolveEvents. Locally they ride the WebSocket; on Rhino.Compute (VektorNode fork) the plugin POSTs them to the callback named in the request'sselvaeventsblock, batched with a heartbeat. In plain Grasshopper they are dropped. - Abort from the web UI: a
cancelSolveWebSocket message locally, the callback reply'sabortflag 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 theoutputsenvelope asoutcome; on Compute the fork returns it as the response'sselvablock. 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
Conditionis false and passesConditionthrough asPassed. An error blocks the solve's outputs from reaching the web UI; downstream components still compute, so gate expensive work onPassed. Level(Remark/Warning/Error) andNotify(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
Datathrough and showsMessagewith 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 > UIcomponent,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 compatibleGetparameters 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) per00_Plans/SELVA_PREPARE_UI_INPUTS_PLAN.md; the classification and inference math live inServices/PrepareUIInputInference.cs, split out with no Grasshopper dependency so it is covered by unit tests inPlugin/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
originalIndexforms 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-meshgh:componentattr instead. - Renamed in the C# API and in the SLVM
EXTNchunk. The JSON wire name is unchanged (sourceComponentIdin the values envelope and on meshuserData): it is the contract with published@selvajs/*releases and is baked into every pre-v3 blob,.gharchive and.slvmfile. Containers written with the oldEXTNspelling 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
SLVMv3 chunked container (magicSLVM, fourcc chunks, unknown types skipped by length) — the same bytes on the wire, in.gharchives, and on disk as.slvm. It replaces three nested layers: theDMF1file 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:
sourceComponentIdand the Rhino NURBS JSON behind curves now live in a namespacedEXTN "selva.gh"chunk a foreign reader can skip. Object identity now travels inside the container's own table, soDisplay From Fileno longer restamps it on load — itsIdinput 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/PNTSchunks) instead of JSON double arrays. Data-URI textures are extracted into binaryTEXRchunks and reconstructed on read. - Everything old still reads:
DMF1files, bare SLVA/SLVZ blobs in saved.ghfiles, 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/visualizationrelease. - The codec (reader/writer, container, identity) moved into its own Rhino-free
Selva.Slvaproject, so it builds and tests independently ofSelva.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
Appendper mesh — quadratic before, 27 s → 35 ms on a 12,679-mesh batch — and validates the joined mesh withIsValidinstead ofFaces.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:originalIndexmetadata 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...
@selvajs/visualization@1.5.0
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: truenow forcesFrontSideon every mesh; left off, only detected closed solids are culled.LookMaterialOverridetakes an optionalside, which the x-ray and wireframe looks set toDoubleSideso 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'senvMapIntensity(a wire material's own value, else the look's blended toward 1 by metalness); with onlyscene.environment, three overwritesenvMapIntensitywithscene.environmentIntensityon every draw. The automatic satin clearcoat on metals is gone; setclearcoaton the wire material to get a coat back. Saved metal materials render differently after this change.Meshes with UVs get a
tangentattribute 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 useRepeatWrapping),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),transmissionandior(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 (
aoPixelRationow 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
Minor Changes
- 78727bf: Tabs take an optional
visibleflag (schema 2.15.0);visible: falsehides 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
@selvajs/selva@4.19.0
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
Minor Changes
- 78727bf: Tabs take an optional
visibleflag (schema 2.15.0);visible: falsehides 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
@selvajs/notifications@0.2.2
Patch Changes
- Updated dependencies [3daeb50]
- @selvajs/platform@0.20.2
@selvajs/cli@4.19.0
No changes in this release.