43 #include <pybind11/include/pybind11/pybind11.h> 44 #include <pybind11/include/pybind11/embed.h> 47 #include <MeshComparePlugin.hh> 51 #include <OpenFlipper/BasePlugin/PythonFunctions.hh> 52 #include <OpenFlipper/PythonInterpreter/PythonTypeConversions.hh> 58 PYBIND11_EMBEDDED_MODULE(MeshCompare, m) {
60 QObject* pluginPointer = getPluginPointer(
"MeshCompare");
63 std::cerr <<
"Error Getting plugin pointer for Plugin-MeshCompare" << std::endl;
70 std::cerr <<
"Error converting plugin pointer for Plugin-MeshCompare" << std::endl;
76 py::class_< MeshComparePlugin,std::unique_ptr<MeshComparePlugin, py::nodelete> > compare(m,
"MeshCompare");
81 compare.def(py::init([plugin]() {
return plugin; }));
84 QCoreApplication::translate(
"PythonDocMeshCompare",
"Compares two meshes. Use the getter functions to retrieve the maximal deviations").toLatin1().data(),
85 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"ID of the first object").toLatin1().data()),
86 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"ID of the second object").toLatin1().data()),
87 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"Compute distance between meshes").toLatin1().data()) =
true,
88 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"Compute normal deviation between meshes").toLatin1().data()) =
true,
89 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"Compute Gauss curvature deviation between meshes").toLatin1().data()) =
true,
90 py::arg(QCoreApplication::translate(
"PythonDocMeshCompare",
"Compute mean curvature deviation between meshes").toLatin1().data()) =
true );
93 QCoreApplication::translate(
"PythonDocMeshCompare",
"Get the maximal distance of the last comparison (-1, if no comparison performed so far)").toLatin1().data() );
96 QCoreApplication::translate(
"PythonDocMeshCompare",
"Get the maximal normal deviation of the last comparison in degree (-1, if no comparison performed so far)").toLatin1().data() );
99 QCoreApplication::translate(
"PythonDocMeshCompare",
"Get the maximal mean curvature deviation of the last comparison (-1, if no comparison performed so far)").toLatin1().data() );
102 QCoreApplication::translate(
"PythonDocMeshCompare",
"Get the maximal Gauss curvature deviation of the last comparison (-1, if no comparison performed so far)").toLatin1().data() );
double lastMaximalMeanCurvatureDeviation()
Get the maximal mean curvature deviation of the last comparison (-1, if no comparison performed so fa...
double lastMaximalNormalDeviation()
Get the maximal normal deviation of the last comparison in degree (-1, if no comparison performed so ...
double lastMaximalGaussCurvatureDeviation()
Get the maximal gauss curvature deviation of the last comparison (-1, if no comparison performed so f...
double lastMaximalDistance()
Get the maximal distance of the last comparison (-1, if no comparison performed so far) ...
void compare(int _sourceId, int _targetId, bool _computeDist=true, bool _computeNormal=true, bool _computeGauss=true, bool _computeMean=true)