Skip to content

Commit

Permalink
Fixed bug in lsWriteVisualization mesh, where first material does not…
Browse files Browse the repository at this point in the history
… get correct material id
  • Loading branch information
tobre1 committed Nov 9, 2023
1 parent 65e4c61 commit 2c27550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/lsWriteVisualizationMesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,9 @@ template <class T, int D> class lsWriteVisualizationMesh {
}
#endif

const bool useMaterialMap = materialMap != nullptr;
materialMeshes.push_back(clipper->GetOutput());
materialIds.push_back(0);
materialIds.push_back(useMaterialMap ? materialMap->getMaterialId(0) : 0);

#ifdef LS_TO_VISUALIZATION_DEBUG
{
Expand All @@ -526,7 +527,6 @@ template <class T, int D> class lsWriteVisualizationMesh {
#endif

unsigned counter = 1;
const bool useMaterialMap = materialMap != nullptr;

// now cut large volume mesh with all the smaller ones
for (typename LevelSetsType::const_reverse_iterator it =
Expand Down

0 comments on commit 2c27550

Please sign in to comment.