MCPcopy Create free account
hub / github.com/SimVascular/SimVascular / Mesher_get_mesh

Function Mesher_get_mesh

Code/Source/PythonAPI/MeshingMesher_PyClass.cxx:275–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273");
274
275static PyObject *
276Mesher_get_mesh(PyMeshingMesher* self, PyObject* args)
277{
278 using namespace MeshingMesher;
279 auto api = PyUtilApiFunction("", PyRunTimeErr, __func__);
280
281 auto mesher = self->mesher;
282 if (!MeshExists(api, mesher)) {
283 return nullptr;
284 }
285
286 // Get the cvUnstructuredGrid:
287 auto mesh = mesher->GetUnstructuredGrid();
288 if (mesh == NULL) {
289 api.error("Could not get the unstructured grid for the mesh.");
290 return nullptr;
291 }
292
293 auto vtkUnstructuredGrid = mesh->GetVtkUnstructuredGrid();
294 return vtkPythonUtil::GetObjectFromPointer(vtkUnstructuredGrid);
295}
296
297//---------------------------
298// Mesher_get_model_face_ids

Callers

nothing calls this directly

Calls 3

MeshExistsFunction · 0.85
GetUnstructuredGridMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected