CAM: apply precommit

This commit is contained in:
Adrian Insaurralde Avalos
2024-09-03 14:54:36 -04:00
parent 261ef09348
commit a17a3cf6d7
337 changed files with 26842 additions and 25585 deletions

View File

@@ -45,8 +45,9 @@
#include "VoronoiVertexPy.h"
namespace PathApp {
extern PyObject* initModule();
namespace PathApp
{
extern PyObject* initModule();
}
/* Python entry */
@@ -56,7 +57,7 @@ PyMOD_INIT_FUNC(PathApp)
try {
Base::Interpreter().runString("import Part");
}
catch(const Base::Exception& e) {
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
PyMOD_Return(nullptr);
}
@@ -67,37 +68,37 @@ PyMOD_INIT_FUNC(PathApp)
Py::Object module(pathModule);
// Add Types to module
Base::Interpreter().addType(&Path::CommandPy ::Type, pathModule, "Command");
Base::Interpreter().addType(&Path::PathPy ::Type, pathModule, "Path");
Base::Interpreter().addType(&Path::AreaPy ::Type, pathModule, "Area");
Base::Interpreter().addType(&Path::CommandPy ::Type, pathModule, "Command");
Base::Interpreter().addType(&Path::PathPy ::Type, pathModule, "Path");
Base::Interpreter().addType(&Path::AreaPy ::Type, pathModule, "Area");
PyObject* voronoiModule(module.getAttr("Voronoi").ptr());
Base::Interpreter().addType(&Path::VoronoiPy ::Type, voronoiModule, "Diagram");
Base::Interpreter().addType(&Path::VoronoiCellPy ::Type, voronoiModule, "Cell");
Base::Interpreter().addType(&Path::VoronoiEdgePy ::Type, voronoiModule, "Edge");
Base::Interpreter().addType(&Path::VoronoiVertexPy ::Type, voronoiModule, "Vertex");
Base::Interpreter().addType(&Path::VoronoiPy ::Type, voronoiModule, "Diagram");
Base::Interpreter().addType(&Path::VoronoiCellPy ::Type, voronoiModule, "Cell");
Base::Interpreter().addType(&Path::VoronoiEdgePy ::Type, voronoiModule, "Edge");
Base::Interpreter().addType(&Path::VoronoiVertexPy ::Type, voronoiModule, "Vertex");
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
Path::Command ::init();
Path::Toolpath ::init();
Path::PropertyPath ::init();
Path::Feature ::init();
Path::FeaturePython ::init();
Path::FeatureCompound ::init();
Path::FeatureCompoundPython ::init();
Path::FeatureShape ::init();
Path::FeatureShapePython ::init();
Path::Area ::init();
Path::FeatureArea ::init();
Path::FeatureAreaPython ::init();
Path::FeatureAreaView ::init();
Path::FeatureAreaViewPython ::init();
Path::Voronoi ::init();
Path::VoronoiCell ::init();
Path::VoronoiEdge ::init();
Path::VoronoiVertex ::init();
Path::Command ::init();
Path::Toolpath ::init();
Path::PropertyPath ::init();
Path::Feature ::init();
Path::FeaturePython ::init();
Path::FeatureCompound ::init();
Path::FeatureCompoundPython ::init();
Path::FeatureShape ::init();
Path::FeatureShapePython ::init();
Path::Area ::init();
Path::FeatureArea ::init();
Path::FeatureAreaPython ::init();
Path::FeatureAreaView ::init();
Path::FeatureAreaViewPython ::init();
Path::Voronoi ::init();
Path::VoronoiCell ::init();
Path::VoronoiEdge ::init();
Path::VoronoiVertex ::init();
PyMOD_Return(pathModule);
}