@@ -56,14 +56,18 @@ class Mesh : public FcelibMesh
5656 Mesh () : mesh_(*this ) { FCELIB_MeshInit (&mesh_); }
5757 ~Mesh () { FCELIB_MeshRelease (&mesh_); }
5858
59+ #if !defined(SCL_DEBUG) || SCL_DEBUG != 0
5960 // Service
60- bool MValid () const { return FCELIB_ValidateMesh (&mesh_); }
61+ bool MValid () const { return FCELIB_MeshValidate (&mesh_); }
62+ #endif
6163
6264 // Stats
6365 void PrintInfo () const { FCELIB_PrintMeshInfo (&mesh_); }
66+ #if !defined(SCL_DEBUG) || SCL_DEBUG != 0
6467 void PrintParts (void ) const { FCELIB_PrintMeshParts (&mesh_); }
6568 void PrintTriags (void ) const { FCELIB_PrintMeshTriangles (&mesh_); }
6669 void PrintVerts (void ) const { FCELIB_PrintMeshVertices (&mesh_); }
70+ #endif
6771 int MNumParts () const { return mesh_.hdr .NumParts ; }
6872 int MNumTriags () const { return mesh_.hdr .NumTriangles ; }
6973 int MNumVerts () const { return mesh_.hdr .NumVertices ; }
@@ -1090,7 +1094,8 @@ bool Mesh::OpDeletePart(const int pid)
10901094{
10911095 if (pid > mesh_.hdr .NumParts || pid < 0 )
10921096 throw std::out_of_range (" OpDeletePart: part index (pid) out of range" );
1093- return FCELIB_DeletePart (&mesh_, pid);
1097+ FCELIB_DeletePart (&mesh_, pid);
1098+ return 1 ;
10941099}
10951100
10961101bool Mesh::OpDeletePartTriags (const int pid, const std::vector<int > &idxs)
@@ -1149,17 +1154,21 @@ PYBIND11_MODULE(fcecodec, fcecodec_module, py::mod_gil_not_used())
11491154
11501155 fcecodec_module.def (" GetFceVersion" , &FCECODECMODULE_GetFceVersion, py::arg (" buf" ), R"pbdoc( Returns 3 (FCE3), 4 (FCE4), 5 (FCE4M), negative (invalid) )pbdoc" );
11511156 fcecodec_module.def (" PrintFceInfo" , &FCECODECMODULE_PrintFceInfo, py::arg (" buf" ));
1152- fcecodec_module.def (" ValidateFce" , &FCECODECMODULE_ValidateFce, py::arg (" buf" ), R"pbdoc( Returns 1 for valid FCE data, 0 otherwise. )pbdoc" );
1157+ fcecodec_module.def (" ValidateFce" , &FCECODECMODULE_ValidateFce, py::arg (" buf" ), R"pbdoc( DEPRECATED as of 1.15 Returns 1 for valid FCE data, 0 otherwise. )pbdoc" ); /* DEPRECATED as of 1.15 */
11531158
11541159 py::class_<Mesh>(fcecodec_module, " Mesh" , py::buffer_protocol ())
11551160 .def (py::init<>())
11561161
1162+ #if !defined(SCL_DEBUG) || SCL_DEBUG != 0
11571163 .def (" MValid" , &Mesh::MValid)
1164+ #endif
11581165
11591166 .def (" PrintInfo" , &Mesh::PrintInfo)
1167+ #if !defined(SCL_DEBUG) || SCL_DEBUG != 0
11601168 .def (" PrintParts" , &Mesh::PrintParts)
11611169 .def (" PrintTriags" , &Mesh::PrintTriags)
11621170 .def (" PrintVerts" , &Mesh::PrintVerts)
1171+ #endif
11631172 .def_property_readonly (" MNumParts" , &Mesh::MNumParts)
11641173 .def_property_readonly (" MNumTriags" , &Mesh::MNumTriags)
11651174 .def_property_readonly (" MNumVerts" , &Mesh::MNumVerts)
0 commit comments