mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 02:25:42 +00:00
Merge topic 'detect_2d_mesh'
0a6f66986 add whitespace ecd1512dd render 2d mesh lines Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !2031
This commit is contained in:
commit
450d76d914
@ -251,6 +251,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
|
|||||||
vtkm::cont::DynamicCellSet cellSet = inCellSet;
|
vtkm::cont::DynamicCellSet cellSet = inCellSet;
|
||||||
|
|
||||||
bool is1D = cellSet.IsSameType(vtkm::cont::CellSetStructured<1>());
|
bool is1D = cellSet.IsSameType(vtkm::cont::CellSetStructured<1>());
|
||||||
|
bool is2D = cellSet.IsSameType(vtkm::cont::CellSetStructured<2>());
|
||||||
|
|
||||||
vtkm::cont::CoordinateSystem actualCoords = coords;
|
vtkm::cont::CoordinateSystem actualCoords = coords;
|
||||||
vtkm::cont::Field actualField = inScalarField;
|
vtkm::cont::Field actualField = inScalarField;
|
||||||
@ -289,6 +290,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
|
|||||||
|
|
||||||
vtkm::cont::CellSetSingleType<> newCellSet;
|
vtkm::cont::CellSetSingleType<> newCellSet;
|
||||||
newCellSet.Fill(newCoords.GetNumberOfValues(), vtkm::CELL_SHAPE_LINE, 2, conn);
|
newCellSet.Fill(newCoords.GetNumberOfValues(), vtkm::CELL_SHAPE_LINE, 2, conn);
|
||||||
|
|
||||||
cellSet = vtkm::cont::DynamicCellSet(newCellSet);
|
cellSet = vtkm::cont::DynamicCellSet(newCellSet);
|
||||||
}
|
}
|
||||||
bool isLines = false;
|
bool isLines = false;
|
||||||
@ -301,7 +303,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
|
|||||||
isLines = singleType.GetCellShape(0) == vtkm::CELL_SHAPE_LINE;
|
isLines = singleType.GetCellShape(0) == vtkm::CELL_SHAPE_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool doExternalFaces = !(this->Internals->ShowInternalZones) && !isLines && !is1D;
|
bool doExternalFaces = !(this->Internals->ShowInternalZones) && !isLines && !is1D && !is2D;
|
||||||
if (doExternalFaces)
|
if (doExternalFaces)
|
||||||
{
|
{
|
||||||
// If internal zones are to be hidden, the number of edges processed can be reduced by
|
// If internal zones are to be hidden, the number of edges processed can be reduced by
|
||||||
|
Loading…
Reference in New Issue
Block a user