Skip to content

Feat/volumic and edges groups#27

Merged
ulysse-bouchet-simvia merged 9 commits intomainfrom
feat/volumic-and-edges-groups
Apr 21, 2026
Merged

Feat/volumic and edges groups#27
ulysse-bouchet-simvia merged 9 commits intomainfrom
feat/volumic-and-edges-groups

Conversation

@ulysse-bouchet-simvia
Copy link
Copy Markdown
Collaborator

[1.9.0] - 2026-04-21

Volume and edge groups now appear in the viewer alongside face and node groups, a new "Groups" settings tab exposes per-kind display tweaks, the bundled vtk.js is replaced by the tree-shaken npm package, and an optional animated background adds a cosmetic touch.

Added

  • Volume groupsmed2obj.py now computes the skin of every volume group in a 3D .med mesh and writes it into the .obj as a dedicated group. The viewer renders them as their own category with a filled isometric cube icon, toggle-able independently from face groups.
  • Edge groups — level -2 groups (1D named cells) are extracted too and rendered as lines via a new EdgeActorCreator. Line width and depth offset (to avoid z-fighting with the skin) are user-controllable.
  • Groups settings tab — new tab in the viewer Settings popup covering:
    • Edge-group thickness slider (1–10 px)
    • Edge-group depth-offset toggle
    • Node-group point-size multiplier (0.25×–4×)
    • Sidebar sort order (natural / by cell count)
    • Bucket groups by kind (on by default; off merges all four kinds into a single list sorted by the same order)
  • Group-kinds legend in the help popup's Groups tab, showing each icon with a short description.
  • Edge threshold multiplier is now persisted across sessions via vs-code-aster.viewer.edgeThresholdMultiplier (was previously editable but lost on reopen).
  • Dream background — optional cosmetic viewer setting (vs-code-aster.viewer.dreamBackground) that drifts four EDF orange/blue blobs behind the mesh via a WebGL fragment shader. Theme-aware: blob intensity adapts to light vs dark themes, peak intensity is capped so overlapping blobs never fully replace the theme color. Does not affect mesh lighting.

Changed

  • vtk.js migrated to @kitware/vtk.js npm package — the 2.6 MB bundled script is gone, replaced by tree-shaken ES-module imports and real TypeScript types. Opens the door to regular version upgrades.
  • Settings popup: the "Edges" tab is renamed to "Mesh edges" and its copy rewritten to distinguish the wireframe edges drawn on each cell from the new edge groups. Tab content now scrolls when it overflows instead of clipping.
  • Sidebar groups now bucket volumes, faces, edges, and nodes in that order, each with its own icon.

Fixed

  • Mesh edge colors now repaint immediately on theme switch instead of waiting for the next camera move.
  • Translucent meshes (highlighted parent behind a selected sub-group) no longer wash out on light themes — vtk.js 35's Order-Independent Transparency pass is bypassed in favor of plain SRC_ALPHA blending.
  • .obj files cached under .vs-code-aster/mesh_cache/ from older extension versions are invalidated when the converter changes (via the bumped med2obj-version: 2 header).
  • Screenshots now work again after the vtk.js migration — the capture path switched to vtk.js's captureNextImage API (which doesn't depend on preserveDrawingBuffer), and the dream background is composited behind the mesh when enabled. The screenshot button's hover highlight is also stripped from the full-viewer capture so it no longer bakes into the saved image.

Extract each volume group's skin and each edge-group's 1D cells in
med2obj.py and render them as dedicated categories in the viewer
sidebar, so volume and edge groups can now be toggled individually
alongside face and node groups.
The previous nested-hexagon icon was easily mistaken for a flat badge
shape; the isometric cube reads clearly as a 3D solid and distinguishes
volume groups from the other kinds in the sidebar at a glance.
Users had no obvious way to tell which icon stood for volume / face /
edge / node groups. A small lexicon at the top of the Groups tab now
maps each icon to its meaning so the sidebar is self-explanatory.
New Groups tab in the viewer settings popup exposes edge-group
thickness and depth offset (avoids z-fighting with the skin),
node-group point-size multiplier, sidebar sort order (by name or by
cell count), and a toggle to bucket groups by kind. The Edges tab is
renamed to Mesh edges and its copy reworded so the wireframe settings
are no longer confused with the new edge-group settings. Also fixes
long tab content overflowing instead of scrolling, and persists the
previously-ephemeral edge threshold multiplier.
Replaces the 2.6 MB bundled script with the tree-shaken package so the
library can be upgraded and typed like any other dependency. Every
vtk.X.Y.Z global lookup now resolves through explicit ES module imports,
and the `declare const vtk: any` stub is gone. Also blocks the
EXT_color_buffer_* extension probe so vtk.js 35's Order-Independent
Transparency falls back to plain SRC_ALPHA blending — its weighted
compositor was washing translucent colors against light backgrounds and
crashing on some group hides. Finally, the theme-change observer now
re-derives mesh edge colors immediately instead of waiting for the next
camera move.
New toggle in the viewer settings (Display tab) that layers a WebGL
fragment shader behind the VTK canvas, drifting four EDF orange and
blue blobs with independent breathing cycles for a subtle "wow" effect.
The shader reads the theme background color so the blob hue is slightly
darkened on light themes to avoid washing out to pastel, and the peak
intensity is capped so overlapping blobs never fully replace the theme
color. VTK clears its canvas to fully transparent (0,0,0,0) when the
dream is on so the shader shows through wherever the mesh doesn't.
vtk.js 35's default WebGL context attributes drop the framebuffer
after compositing and its typings omit the `rootContainer` field,
which together left left-click screenshots blank, right-click
screenshots showing only the UI overlay, and temporarily broke the
viewer layout when we tried to use `container`. Capture now goes
through the official `captureNextImage` API so it no longer depends
on `preserveDrawingBuffer`, the dream background canvas is
composited behind the mesh when enabled, and the screenshot button's
hover highlight is stripped during the full-viewer capture so it
doesn't bake into the saved image.
Adds the [1.9.0] section covering volume and edge groups, the Groups
settings tab, the vtk.js npm migration, the dream background, and the
follow-up screenshot fix. README intro now carries the CI, open-issues,
and Marketplace installs badges alongside version/license, and the
visualizer section mentions the new group kinds, per-kind settings,
and dream background.
@ulysse-bouchet-simvia ulysse-bouchet-simvia self-assigned this Apr 21, 2026
@ulysse-bouchet-simvia ulysse-bouchet-simvia merged commit 12c5fea into main Apr 21, 2026
5 checks passed
@ulysse-bouchet-simvia ulysse-bouchet-simvia deleted the feat/volumic-and-edges-groups branch April 21, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant