mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Slicing object and rasterization generates output zip. Needs testing.
This commit is contained in:
parent
95419370e1
commit
ffe6862626
5 changed files with 321 additions and 149 deletions
|
@ -2,6 +2,7 @@
|
|||
#define slic3r_SLAPrint_hpp_
|
||||
|
||||
#include "PrintBase.hpp"
|
||||
#include "PrintExport.hpp"
|
||||
#include "Point.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -58,8 +59,10 @@ protected:
|
|||
// Slic3r::Point objects in scaled G-code coordinates
|
||||
Point shift;
|
||||
// Rotation along the Z axis, in radians.
|
||||
float rotation;
|
||||
float rotation;
|
||||
Instance(const Point& tr, float rotZ): shift(tr), rotation(rotZ) {}
|
||||
};
|
||||
|
||||
bool set_instances(const std::vector<Instance> &instances);
|
||||
// Invalidates the step, and its depending steps in SLAPrintObject and SLAPrint.
|
||||
bool invalidate_step(SLAPrintObjectStep step);
|
||||
|
@ -75,6 +78,7 @@ private:
|
|||
|
||||
// Which steps have to be performed. Implicitly: all
|
||||
std::vector<bool> m_stepmask;
|
||||
std::vector<ExPolygons> m_model_slices;
|
||||
|
||||
class SupportData;
|
||||
std::unique_ptr<SupportData> m_supportdata;
|
||||
|
@ -132,6 +136,7 @@ private: // Prevents erroneous use by other classes.
|
|||
|
||||
public:
|
||||
SLAPrint(): m_stepmask(slapsCount, true) {}
|
||||
|
||||
virtual ~SLAPrint() { this->clear(); }
|
||||
|
||||
PrinterTechnology technology() const noexcept { return ptSLA; }
|
||||
|
@ -143,14 +148,21 @@ public:
|
|||
|
||||
void render_supports(SLASupportRenderer& renderer);
|
||||
|
||||
void export_raster(const std::string& fname);
|
||||
template<class Fmt> void export_raster(const std::string& fname) {
|
||||
if(m_printer) m_printer->save<Fmt>(fname);
|
||||
std::cout << "Would export the SLA raster" << std::endl;
|
||||
}
|
||||
|
||||
private:
|
||||
using SLAPrinter = FilePrinter<FilePrinterFormat::SLA_PNGZIP>;
|
||||
using SLAPrinterPtr = std::unique_ptr<SLAPrinter>;
|
||||
|
||||
Model m_model;
|
||||
SLAPrinterConfig m_printer_config;
|
||||
SLAMaterialConfig m_material_config;
|
||||
PrintObjects m_objects;
|
||||
std::vector<bool> m_stepmask;
|
||||
SLAPrinterPtr m_printer;
|
||||
|
||||
friend SLAPrintObject;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue