Wip on svg archive import
This commit is contained in:
parent
e0fc337b2d
commit
4ef860811f
14 changed files with 592 additions and 347 deletions
|
@ -2,15 +2,37 @@
|
|||
#define SLAARCHIVEREADER_HPP
|
||||
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/ExPolygon.hpp"
|
||||
|
||||
struct indexed_triangle_set;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
ConfigSubstitutions import_sla_archive(const std::string &zipfname, DynamicPrintConfig &out);
|
||||
|
||||
enum class SLAImportQuality { Accurate, Balanced, Fast };
|
||||
|
||||
class MissingProfileError : public RuntimeError { using RuntimeError::RuntimeError; };
|
||||
|
||||
class SLAArchiveReader {
|
||||
public:
|
||||
|
||||
virtual ~SLAArchiveReader() = default;
|
||||
|
||||
virtual ConfigSubstitutions read(std::vector<ExPolygons> &slices,
|
||||
DynamicPrintConfig &profile) = 0;
|
||||
|
||||
virtual ConfigSubstitutions read(DynamicPrintConfig &profile) = 0;
|
||||
|
||||
static std::unique_ptr<SLAArchiveReader> create(
|
||||
const std::string &fname,
|
||||
SLAImportQuality quality = SLAImportQuality::Balanced,
|
||||
std::function<bool(int)> progr = [](int){ return false; });
|
||||
};
|
||||
|
||||
class ReaderUnimplementedError : public RuntimeError { using RuntimeError::RuntimeError; };
|
||||
|
||||
ConfigSubstitutions import_sla_archive(const std::string &zipfname,
|
||||
DynamicPrintConfig &out);
|
||||
|
||||
ConfigSubstitutions import_sla_archive(
|
||||
const std::string &zipfname,
|
||||
indexed_triangle_set &out,
|
||||
|
@ -18,8 +40,6 @@ ConfigSubstitutions import_sla_archive(
|
|||
SLAImportQuality quality = SLAImportQuality::Balanced,
|
||||
std::function<bool(int)> progr = [](int) { return true; });
|
||||
|
||||
class MissingProfileError : public RuntimeError { using RuntimeError::RuntimeError; };
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // SLAARCHIVEREADER_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue