Skip to content

Commit f4b980e

Browse files
authored
Merge pull request #1523 from sideeffects/sendupstream_fix_seampoints
Fix uninitialized pointflags
2 parents 8bf0463 + 9435051 commit f4b980e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

openvdb/openvdb/tools/VolumeToMesh.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,10 +1614,11 @@ ComputePoints<InputTreeType>::operator()(const tbb::blocked_range<size_t>& range
16141614
if (inclusiveCell) getCellVertexValues(*inputNode, offset, values);
16151615
else getCellVertexValues(inputAcc, ijk, values);
16161616

1617-
size_t count;
1617+
size_t count, weightcount;
16181618

16191619
if (refSigns == 0) {
16201620
count = computeCellPoints(points, values, signs, iso);
1621+
weightcount = 0;
16211622
} else {
16221623
if (inclusiveCell && refInputNode) {
16231624
getCellVertexValues(*refInputNode, offset, refValues);
@@ -1626,6 +1627,7 @@ ComputePoints<InputTreeType>::operator()(const tbb::blocked_range<size_t>& range
16261627
}
16271628
count = computeCellPoints(points, weightedPointMask, values, refValues, signs, refSigns,
16281629
iso, refPointIndexNode->getValue(offset), mQuantizedSeamLinePoints);
1630+
weightcount = count;
16291631
}
16301632

16311633
xyz = ijk.asVec3d();
@@ -1653,7 +1655,7 @@ ComputePoints<InputTreeType>::operator()(const tbb::blocked_range<size_t>& range
16531655
pos[1] = float(point[1]);
16541656
pos[2] = float(point[2]);
16551657

1656-
if (mSeamLinePointsFlags && weightedPointMask[i]) {
1658+
if (mSeamLinePointsFlags && weightcount && weightedPointMask[i]) {
16571659
mSeamLinePointsFlags[pointOffset] = uint8_t(1);
16581660
}
16591661

pendingchanges/fixseampoint.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bug Fixes:
2+
- Fix uninitialized point flags in tools::VolumeToMesh

0 commit comments

Comments
 (0)