mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-27 14:03:15 +08:00
Use tight compression for SLA archives with svg
This commit is contained in:
parent
91b79bb85c
commit
516f459edc
@ -503,13 +503,11 @@ static void write_thumbnail(Zipper &zipper, const ThumbnailData &data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SL1Archive::export_print(const std::string fname,
|
void SL1Archive::export_print(Zipper &zipper,
|
||||||
const SLAPrint &print,
|
const SLAPrint &print,
|
||||||
const ThumbnailsList &thumbnails,
|
const ThumbnailsList &thumbnails,
|
||||||
const std::string &prjname)
|
const std::string &prjname)
|
||||||
{
|
{
|
||||||
Zipper zipper{fname};
|
|
||||||
|
|
||||||
std::string project =
|
std::string project =
|
||||||
prjname.empty() ?
|
prjname.empty() ?
|
||||||
boost::filesystem::path(zipper.get_filename()).stem().string() :
|
boost::filesystem::path(zipper.get_filename()).stem().string() :
|
||||||
@ -549,4 +547,14 @@ void SL1Archive::export_print(const std::string fname,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SL1Archive::export_print(const std::string fname,
|
||||||
|
const SLAPrint &print,
|
||||||
|
const ThumbnailsList &thumbnails,
|
||||||
|
const std::string &prjname)
|
||||||
|
{
|
||||||
|
Zipper zipper{fname, Zipper::FAST_COMPRESSION};
|
||||||
|
|
||||||
|
export_print(zipper, print, thumbnails, prjname);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
@ -22,6 +22,11 @@ protected:
|
|||||||
SLAPrinterConfig & cfg() { return m_cfg; }
|
SLAPrinterConfig & cfg() { return m_cfg; }
|
||||||
const SLAPrinterConfig & cfg() const { return m_cfg; }
|
const SLAPrinterConfig & cfg() const { return m_cfg; }
|
||||||
|
|
||||||
|
void export_print(Zipper &,
|
||||||
|
const SLAPrint &print,
|
||||||
|
const ThumbnailsList &thumbnails,
|
||||||
|
const std::string &projectname);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SL1Archive() = default;
|
SL1Archive() = default;
|
||||||
|
@ -224,4 +224,14 @@ sla::RasterEncoder SL1_SVGArchive::get_encoder() const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SL1_SVGArchive::export_print(const std::string fname,
|
||||||
|
const SLAPrint &print,
|
||||||
|
const ThumbnailsList &thumbnails,
|
||||||
|
const std::string &projectname)
|
||||||
|
{
|
||||||
|
Zipper zipper{fname, Zipper::TIGHT_COMPRESSION};
|
||||||
|
|
||||||
|
SL1Archive::export_print(zipper, print, thumbnails, projectname);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
@ -14,6 +14,11 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
void export_print(const std::string fname,
|
||||||
|
const SLAPrint &print,
|
||||||
|
const ThumbnailsList &thumbnails,
|
||||||
|
const std::string &projectname = "") override;
|
||||||
|
|
||||||
using SL1Archive::SL1Archive;
|
using SL1Archive::SL1Archive;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user