Skip to content

Commit 94b9880

Browse files
authored
Merge pull request #2178 from Nikhil216/fix-tube-filter
fix(vtktubefilter): correcting the discrepancy in the number of point...
2 parents 6e82cca + a85b0ce commit 94b9880

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Sources/Filters/General/TubeFilter/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,7 @@ function vtkTubeFilter(publicAPI, model) {
661661
size: numNewPts * 3,
662662
numberOfComponents: 3,
663663
});
664-
let numNormals = 3 * numNewPts;
665-
if (model.capping) {
666-
numNormals = 3 * (numNewPts + 2 * model.numberOfSides);
667-
}
664+
const numNormals = 3 * numNewPts;
668665
const newNormalsData = new Float32Array(numNormals);
669666
const newNormals = vtkDataArray.newInstance({
670667
numberOfComponents: 3,

Sources/Filters/General/TubeFilter/test/testTubeFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ test('Test vtkTubeFilter execution', (t) => {
112112
'Make sure the output number of points is correct with capping.'
113113
);
114114
t.ok(
115-
tubeOutput2.getPointData().getNormals().getNumberOfTuples() === 24,
115+
tubeOutput2.getPointData().getNormals().getNumberOfTuples() === 18,
116116
'Make sure the output number of normals is correct with capping.'
117117
);
118118
t.end();

0 commit comments

Comments
 (0)