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

Function Geom_check_surface

Code/Source/PythonAPI/Geometry_PyModule.cxx:967–991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965");
966
967static PyObject*
968Geom_check_surface(PyObject* self, PyObject* args)
969{
970 auto api = PyUtilApiFunction("s|d", PyRunTimeErr, __func__);
971 char *srcName;
972 double tol = 1e-6;
973
974 if (!PyArg_ParseTuple(args, api.format, &srcName, &tol)) {
975 return api.argsError();
976 }
977
978 // Retrieve source object.
979 auto src = GetRepositoryGeometry(api, srcName);
980 if (src == NULL) {
981 return nullptr;
982 }
983
984 int stats[2];
985 if (sys_geom_checksurface(src, stats, tol) != SV_OK) {
986 api.error("Error checking surface for geometry '" + std::string(srcName) + ".");
987 return nullptr;
988 }
989
990 return Py_BuildValue("ii",stats[0],stats[1]);
991}
992
993//------------
994// Geom_clean

Callers

nothing calls this directly

Calls 3

sys_geom_checksurfaceFunction · 0.85
argsErrorMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected