Mesh: fixes issue #10075: 3MF files exported from FreeCAD don't work in PrusaSlicer
Add an option to force to always write a mesh as model type even if it's not a solid
This commit is contained in:
@@ -211,6 +211,7 @@ private:
|
||||
auto fTolerance( hGrp->GetFloat("MaxDeviationExport", 0.1f) );
|
||||
|
||||
int exportAmfCompressed( hGrp->GetBool("ExportAmfCompressed", true) );
|
||||
bool export3mfModel( hGrp->GetBool("Export3mfModel", true) );
|
||||
|
||||
static const std::array<const char *, 5> kwList{"objectList", "filename", "tolerance",
|
||||
"exportAmfCompressed", nullptr};
|
||||
@@ -261,6 +262,7 @@ private:
|
||||
else if (exportFormat == MeshIO::ThreeMF) {
|
||||
Extension3MFFactory::initialize();
|
||||
exporter = std::make_unique<Exporter3MF>(outputFileName, Extension3MFFactory::createExtensions());
|
||||
dynamic_cast<Exporter3MF*>(exporter.get())->setForceModel(export3mfModel);
|
||||
}
|
||||
else if (exportFormat != MeshIO::Undefined) {
|
||||
exporter = std::make_unique<MergeExporter>(outputFileName, exportFormat);
|
||||
|
||||
Reference in New Issue
Block a user