Repository navigation
VTK algorithms keep the input's active attributes, and set their own - #348
Open
berkgeveci wants to merge 2 commits into
Open
berkgeveci wants to merge 2 commits into
berkgeveci wants to merge 2 commits into
Conversation
The algorithms that add fields wrote Tack's values straight into VTK's point data. On VTK's higher-order cells that put an order-2 field's values in Tack's node order, not VTK's (Elevation scrambled, its Gradients wrong), and values on Tack's points, the corners, where VTK's points include the edge middles (a 1193-point grid got an array of 1193 tuples of 1227 components). The import now records which node of its space each VTK point is, and the writers put a point field into that space (project) and give each VTK point its node's value. Found running VTK's quadraticQuadDeriv.py on Tack.
Tack keeps no roles, so the arrays the algorithms carried came back plain: mappers colored by nothing, glyphs and lighting found no vectors or normals. An output now keeps its input's active scalars, vectors, normals, texture coordinates and tensors where it carries arrays of those names (Probe its source's), as VTK's filters pass them; Elevation and ImplicitValues make their array the active scalars, SurfaceNormals, PointNormals and Tubes theirs the active normals (a tube took the lines' carried Normals, and was lit wrongly). Found running VTK's Python tests on Tack.
This branch has not been deployed
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.
Stacked on #343 (its commit shows here until it merges; this merges after it). Found by running VTK's own Python tests with Tack's algorithms in place of VTK's filters: about 1,500 outputs lacked an active attribute VTK's filter gives, and tests rendered white or lit wrongly (
TestElevationFilter.py,clipHex.py).The bug: Tack keeps no roles, so the arrays the algorithms carried came back as plain arrays. A mapper colors by the active scalars, a glyph turns by the active vectors, lighting reads the active normals: all found nothing. A tube took the lines' carried
Normals(dataset_to_vtkmakes an array of that name the active normals) and was lit with the cube's face normals.The fix (
_keep_active, after every run):Probetakes its source's (ACTIVE_FROM)._made_active):ElevationandImplicitValuestheir array as the scalars,SurfaceNormals,PointNormalsandTubestheirnormalsas the normals.Tested: elevation, contour, clip, threshold over pieces, probe, tubes over a cube's edges (carrying its
Normals) and surface normals each give VTK's active attribute. VTK tests 223 passed on the 9.7.1 wheel and 238 on a local VTK master; quick tier 3046 passed.🤖 Generated with Claude Code