Skip to content
Snippets Groups Projects
Commit c002e5ce authored by Dan Lipsa's avatar Dan Lipsa
Browse files

We can have non-empty polydata with empty cell array.

This is a polydata that only has points and point arrays.
parent 108123a2
No related branches found
No related tags found
No related merge requests found
......@@ -475,10 +475,10 @@ vtkSmartPointer<vtkDataSet> GetMesh(
conduit_cpp::Node connectivity = topologyNode["elements/connectivity"];
const conduit_cpp::DataType dtype0 = connectivity.dtype();
const auto nb_cells = dtype0.number_of_elements();
ug->SetPoints(CreatePoints(coords));
const auto vtk_cell_type = GetCellType(topologyNode["elements/shape"].as_string());
if (nb_cells > 0)
{
ug->SetPoints(CreatePoints(coords));
const auto vtk_cell_type = GetCellType(topologyNode["elements/shape"].as_string());
if (vtk_cell_type == VTK_POLYHEDRON)
{
// polyhedra uses O2M and not M2C arrays, so need to process it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment