Repository navigation
fe_lab: stop ends any job; field colours take the opacity curve - #944
Merged
Merged
Conversation
Two problems in the FEM gallery:
- Previous / Next while an item computed did not stop it. The gallery
writes "stop load", but fe_lab honoured `stop` only for a heat solve;
a load, a mesh or a Poisson / modes solve ran to the end first, its
progress bar still moving under the new item's heading. Every stage
steps as a sliced task now, so FeTask looks at job.cancel before each
step: a heat solve under way still finishes its step and keeps its
field so far; any other job ends with nothing ("load: stopped", ...)
and the node keeps what it had. fe.stoppable is 1 while any job runs.
- The Colours editor hid the opacity curve, and the field colours used
only the colour ramp. The opacity curve is now shown (fe_controls,
mesh_tools) and baked with the ramp; GeometryNode::setColorTable takes
an opacity per entry, and the field is then an RGBA colour array, so
VTK draws it translucent where the curve is below 1. An all-opaque
curve keeps plain RGB, out of the translucent pass; the colormap key
still resets to an opaque ramp.
Tests: cvcgl_scalar_field checks the RGBA mapping and translucency;
cvcgl_ariadne_realize checks a Poisson solve is stoppable, a stopped
SDF load keeps the volume and mesh, and an opacity curve gives both
mesh_lab's and fe_lab's colours an alpha channel until the colormap key
resets it.
transfix
enabled auto-merge (squash)
October 31, 2026 20:28
transfix
added a commit
that referenced
this pull request
Nov 1, 2026
…dow focus (#946) VTK 9.5's exponential shadow map barely darkened anything at a city's scale, and its light camera spread a 4096 map over ~17 km, so cvcdbg's demo3 showed no building or vehicle shadows. - FilteredShadowMapPass: the maps read back as depths and filtered (16-tap Poisson PCF), with normal offset, depth bias and receiver-plane bias in shadow texels; empty texels read lit; fades at the map's border. SceneGraph::setShadowSoftness. - StridedShadowBaker bakes through its own copy of VTK's loop: shader keys on every prop it draws, and texels hold 1 + exp(c z), so a pale background no longer reads as an occluder. - SceneGraph::setShadowFocus(x, y, z, r) / clearShadowFocus: each light's map aimed at a sphere (demo3: what the camera looks at, ~0.2 m a texel), the whole scene's depth range kept. - No GL error check around the forked bake: VTK's low-memory mapper raises GL_INVALID_OPERATION after a shader-cache release, VTK's own, which its compiled-out checks never report. - New test cvcgl_city_sun_shadows; also carries the macOS JoltRollout calibration (4add8b3 on #942). Merged with package-linux Debug-grpc red on cvcgl_ariadne_realize's heat-stop check, a timing flake inherited from master (#944's CI failed it too); fixed in #953.
transfix
added a commit
that referenced
this pull request
Nov 1, 2026
The heat-stop check sent "stop" once fe.progress reached 1%. The first 3%
of a solve job's progress is the boundary walk before the solve, so on a
slow build (package-linux Debug-grpc) the stop landed there and the job
ended with nothing ('heat: stopped'), failing "heat.steps = 1e30 is
clamped, and stop interrupts it" (#944's CI, and twice on #946's).
Wait for fe.phase "stepping" instead: the time steps are under way, so a
stop ends the solve at a step, and a solve wrapped to one step is still
caught (done, busy 0, before the stop).
(cherry picked from commit 23eae43)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two problems in the FEM gallery (arigl
?doc=fem_gallery):stop load, but fe_lab honouredstoponly for a heat solve. A load, a mesh, or a Poisson or modes solve ran to the end first, with its progress bar still moving under the new item's heading. Every stage is a stepped sliced task now, soFeTaskchecksjob.cancelbefore each step:load: stopped,mesh: stopped, ...), and the node keeps what it had.fe.stoppableis 1 while any job runs, so fe_controls' Stop button works for all of them.show_opacity: false), and the field colours used only the colour ramp.GeometryNode::setColorTable(rgb, alpha)takes an opacity per entry. The field is then a 4-channel (RGBA) colour array, which VTK draws in the translucent pass where the curve is below 1 (times the actor's opacity).Checked in the gallery
A probe copy of
fem_gallery.ari(arigl snapshot, native Release) steps from item 1 to item 10 while item 1's SDF load is at 26%:stopping....load: stopped.A second probe sets the CT body's opacity curve to 0 below 0.35 and 1 above 0.6. The skin and lungs (u = 0) disappear, and only the warm interior of the cut shows.
Tests
cvcgl_scalar_field: an opacity table gives RGBA colours with the alpha sampled like the colours, and the mapper reports translucent geometry. Opacities of the wrong length are ignored.cvcgl_ariadne_realize:load: stopped, keeps the mesh, and keeps the volume, so loading the old source again reads nothing.cvcgl_fe_intervalandcvcgl_tf_bindingpass unchanged (Release, Windows).Not changed: mesh_lab's jobs run one-shot on its async lane, so they can't stop mid-run. The surface items' modes colouring is the open "as a sliced task" item.