mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-16 07:22:10 +00:00
PluginHostApi.cpp had grown into one TU holding the module entry point plus
three unrelated domains (presets, model/mesh graph, app access), and
PluginHostSlicing.cpp mixed ownable geometry value types with the
non-owning live print graph. Reorganize the orca.host surface into
plugin/host/ with one registrar per domain:
- PluginHost.hpp/.cpp entry point (replaces PluginHostApi)
- PluginHostBindings.hpp internal per-domain registrar declarations
- PluginHostGeometry.cpp BoundingBox, Point, Polygon, ExPolygon + ndarray parsing
- PluginHostMesh.hpp/.cpp TriangleMesh snapshot (own TU ahead of planned
mesh construct/mutate APIs)
- PluginHostPresets.cpp Preset, PresetCollection, PresetBundle
- PluginHostModel.cpp scene graph: Model, ModelObject, ModelInstance, ModelVolume
- PluginHostApp.cpp Plater + plater()/model()/preset_bundle() accessors
- PluginHostSlicing.cpp live print graph only, now with a single lifetime story
- PluginHostUi.hpp/.cpp moved unchanged
PluginBindingUtils.hpp stays at plugin/ root: it is shared with pluginTypes/
and tests, not host/-specific.
No Python-visible change: same submodules, class names and docstrings.
Verified with slic3rutils and fff_print suites.
27 lines
813 B
C++
27 lines
813 B
C++
#include "PluginHost.hpp"
|
|
#include "PluginHostBindings.hpp"
|
|
#include "PluginHostUi.hpp"
|
|
|
|
namespace Slic3r {
|
|
|
|
void PluginHost::RegisterBindings(pybind11::module_& module)
|
|
{
|
|
auto host = module.def_submodule("host", "Host application API");
|
|
|
|
// Value types first so the docstring signatures of later registrars
|
|
// resolve to the bound Python names.
|
|
host_bindings::register_geometry(host);
|
|
host_bindings::register_mesh(host);
|
|
host_bindings::register_presets(host);
|
|
host_bindings::register_model(host);
|
|
host_bindings::register_app(host);
|
|
|
|
// UI: native dialogs and interactive HTML windows for plugins.
|
|
PluginHostUi::RegisterBindings(host);
|
|
|
|
// Slicing print-graph data model (Print, Layer, Surface, ...).
|
|
host_bindings::register_slicing(host);
|
|
}
|
|
|
|
} // namespace Slic3r
|