Assembly: Implement Bill Of Materials (#14198)

* Assembly: Implementation of BOM

* Assembly: BOM: make it possible for BOM to be made without an assembly.
This commit is contained in:
PaddleStroke
2024-06-17 18:16:32 +02:00
committed by GitHub
parent 60a0e70882
commit 3fa0b68878
31 changed files with 2355 additions and 29 deletions

View File

@@ -24,9 +24,12 @@
#include "PreCompiled.h"
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Base/PyObjectBase.h>
#include "ViewProviderAssembly.h"
#include "ViewProviderBom.h"
#include "ViewProviderBomGroup.h"
#include "ViewProviderJointGroup.h"
#include "ViewProviderViewGroup.h"
@@ -39,6 +42,15 @@ extern PyObject* initModule();
/* Python entry */
PyMOD_INIT_FUNC(AssemblyGui)
{
// load dependent module
try {
Base::Interpreter().runString("import SpreadsheetGui");
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
PyMOD_Return(nullptr);
}
PyObject* mod = AssemblyGui::initModule();
Base::Console().Log("Loading AssemblyGui module... done\n");
@@ -47,7 +59,9 @@ PyMOD_INIT_FUNC(AssemblyGui)
// 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.
AssemblyGui::ViewProviderAssembly ::init();
AssemblyGui::ViewProviderAssembly::init();
AssemblyGui::ViewProviderBom::init();
AssemblyGui::ViewProviderBomGroup::init();
AssemblyGui::ViewProviderJointGroup::init();
AssemblyGui::ViewProviderViewGroup::init();