Part: add dialog for STEP export

This commit is contained in:
wmayer
2022-10-04 20:30:03 +02:00
parent 96a84603b6
commit ebe7ceea33
7 changed files with 554 additions and 7 deletions

View File

@@ -101,6 +101,7 @@
#include <Mod/Part/App/Interface.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/ProgressIndicator.h>
#include <Mod/Part/Gui/DlgExportStep.h>
#include <TDataStd.hxx>
#include <TDataStd_Integer.hxx>
@@ -572,14 +573,14 @@ private:
Py::Dict options;
Base::FileInfo file(name8bit.c_str());
// Here we can open a model dialog...
if (file.hasExtension("stp") || file.hasExtension("step")) {
auto ocafSettings = Import::ExportOCAF2::customExportOptions();
options.setItem("exportHidden", Py::Boolean(ocafSettings.exportHidden));
options.setItem("keepPlacement", Py::Boolean(ocafSettings.keepPlacement));
Part::OCAF::ImportExportSettings stepSettings;
options.setItem("legacy", Py::Boolean(stepSettings.getExportLegacy()));
PartGui::TaskExportStep dlg(Gui::getMainWindow());
if (!dlg.showDialog() || dlg.exec()) {
auto stepSettings = dlg.getSettings();
options.setItem("exportHidden", Py::Boolean(stepSettings.exportHidden));
options.setItem("keepPlacement", Py::Boolean(stepSettings.keepPlacement));
options.setItem("legacy", Py::Boolean(stepSettings.exportLegacy));
}
}
return options;