Commit 6eafb600 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot
Browse files

Merge topic 'warn-mesh-empty-model'


 MeshOperator: warn if models have no cells.
Acked-by: Kitware Robot's avatarKitware Robot <>
Acked-by: David Thompson's avatarDavid Thompson <>
Merge-request: !537
parents 910af500 e483ba7d
......@@ -95,6 +95,22 @@ OperatorResult MeshOperator::operateInternal()
smtk::attribute::StringItemPtr requirementsItem = this->findString("remusRequirements");
smtk::attribute::StringItemPtr attributeItem = this->findString("meshingControlAttributes");
//warn if the models to mesh are empty
bool modelsAreEmpty = true;
for (auto& model : models)
if (!model.cells().empty())
modelsAreEmpty = false;
if (modelsAreEmpty)
smtkWarningMacro(this->log(), "Model contains no cells.");
//convert the model and uuids to to mesh to a string representation
std::string modelSerialized = smtk::io::SaveJSON::fromModelManager(this->manager());
std::string modelUUIDSSerialized = extractModelUUIDSAsJSON(models);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment