JuliaGeometry/Meshes.jl

Remove direct access to compute graph nodes to get full interactivity

Open

#1,371 opened on Jun 6, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Julia (98 forks)auto 404
enhancementhelp wantedviz

Repository metrics

Stars
 (460 stars)
PR merge metrics
 (PR metrics pending)

Description

We still need to adjust the code in a few places to get full interactivity within our recipes.

For instance, consider the following MWE:

using Meshes
using Random

import GLMakie as Mke

boxes = rand(Box, 10)
balls = rand(Ball, 10)
tetra = rand(Tetrahedron, 10)
geoms = shuffle([boxes; balls; tetra])

fig = Mke.Figure()
sld = Mke.Slider(fig[1, 1], range=1:length(geoms))
ax3 = Mke.Axis3(fig[2, 1], aspect=:data)
sub = Mke.@lift geoms[1:$(sld.value)]
viz!(ax3, sub)

Mke.on(sld.value) do i
  Mke.autolimits!(ax3)
end

fig

Because the slider starts with only the first geometry, the direct access to plot[objectid][] registers a single recipe in the compute graph, no matter how much we move the slider:

https://github.com/JuliaGeometry/Meshes.jl/blob/416dfeb89185750a192f9b553801920f9b04fa85/ext/geomset.jl#L14

We need to refactor the code to handle heterogeneous vectors of geometries.

There are other places that rely on direct access (e.g., plot.showsegments[]) that need a fix.

Find all occurrences on VSCode with the following regex:

plot.*\[\]

Contributor guide