Repository navigation
Contour and Threshold take a vector field's component - #349
Open
berkgeveci wants to merge 3 commits into
Open
berkgeveci wants to merge 3 commits into
berkgeveci wants to merge 3 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.
As VTK's filters do (vtkContourFilter's ArrayComponent, vtkThreshold's selected component, its count of components meaning the magnitude): a view of the vector's values (ExtractComponent), nothing copied; the first by default. They refused a vector field. 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 #348 and #343 (their commits show here until they merge; this merges after them). Found by running VTK's own Python tests with Tack's algorithms in place of VTK's filters (
multipleComponentContour.py, and thresholds by component).ContourandThresholdrefused a vector field. They now take itscomponent, as VTK's filters do: the first by default (vtkContourFilter'sArrayComponent,vtkThreshold's selected component), and forThresholdalso"magnitude"(VTK's selected component equal to the count of components). A component is a view of the vector's values (tack.arrays.ExtractComponent), nothing copied; Tack'scontourandthresholdtake it as any field. A component of a scalar field other than 0 is refused. VTK's "all components" and "any component" threshold modes are not taken.Tested against
vtkContourFilter(each component of a gradient) andvtkThreshold(components 0 and 2 and the magnitude): the same cells. VTK tests 224 passed on the 9.7.1 wheel, 239 on a local VTK master; quick tier 3044 passed.🤖 Generated with Claude Code