mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge remote-tracking branch 'origin/master' into tm_sla_supports_backend and add get_current_elevation
This commit is contained in:
commit
c39698878d
22 changed files with 756 additions and 179 deletions
|
@ -38,16 +38,18 @@ private: // Prevents erroneous use by other classes.
|
|||
using Inherited = _SLAPrintObjectBase;
|
||||
|
||||
public:
|
||||
const Transform3d& trafo() const { return m_trafo; }
|
||||
const SLAPrintObjectConfig& config() const { return m_config; }
|
||||
const Transform3d& trafo() const { return m_trafo; }
|
||||
|
||||
struct Instance {
|
||||
Instance(ModelID instance_id, const Point &shift, float rotation) : instance_id(instance_id), shift(shift), rotation(rotation) {}
|
||||
bool operator==(const Instance &rhs) const { return this->instance_id == rhs.instance_id && this->shift == rhs.shift && this->rotation == rhs.rotation; }
|
||||
// ID of the corresponding ModelInstance.
|
||||
ModelID instance_id;
|
||||
// Slic3r::Point objects in scaled G-code coordinates
|
||||
Point shift;
|
||||
// Rotation along the Z axis, in radians.
|
||||
float rotation;
|
||||
float rotation;
|
||||
};
|
||||
const std::vector<Instance>& instances() const { return m_instances; }
|
||||
|
||||
|
@ -72,6 +74,11 @@ public:
|
|||
// as the pad height also needs to be considered.
|
||||
double get_elevation() const;
|
||||
|
||||
// This method returns the needed elevation according to the processing
|
||||
// status. If the supports are not ready, it is zero, if they are and the
|
||||
// pad is not, then without the pad, otherwise the full value is returned.
|
||||
double get_current_elevation() const;
|
||||
|
||||
// Should be obvious
|
||||
const std::vector<ExPolygons>& get_support_slices() const;
|
||||
const std::vector<ExPolygons>& get_model_slices() const;
|
||||
|
@ -95,12 +102,14 @@ protected:
|
|||
m_transformed_rmesh.invalidate([this, &trafo](){ m_trafo = trafo; });
|
||||
}
|
||||
|
||||
bool set_instances(const std::vector<Instance> &instances);
|
||||
void set_instances(const std::vector<Instance> &instances) { m_instances = instances; }
|
||||
// Invalidates the step, and its depending steps in SLAPrintObject and SLAPrint.
|
||||
bool invalidate_step(SLAPrintObjectStep step);
|
||||
bool invalidate_all_steps();
|
||||
// Invalidate steps based on a set of parameters changed.
|
||||
bool invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys);
|
||||
|
||||
private:
|
||||
|
||||
// Object specific configuration, pulled from the configuration layer.
|
||||
SLAPrintObjectConfig m_config;
|
||||
// Translation in Z + Rotation by Y and Z + Scaling / Mirroring.
|
||||
|
@ -143,7 +152,7 @@ public:
|
|||
PrinterTechnology technology() const noexcept { return ptSLA; }
|
||||
|
||||
void clear() override;
|
||||
bool empty() const override { return false; }
|
||||
bool empty() const override { return m_objects.empty(); }
|
||||
ApplyStatus apply(const Model &model, const DynamicPrintConfig &config) override;
|
||||
void process() override;
|
||||
|
||||
|
@ -156,8 +165,13 @@ private:
|
|||
using SLAPrinter = FilePrinter<FilePrinterFormat::SLA_PNGZIP>;
|
||||
using SLAPrinterPtr = std::unique_ptr<SLAPrinter>;
|
||||
|
||||
// Invalidate steps based on a set of parameters changed.
|
||||
bool invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys);
|
||||
|
||||
SLAPrinterConfig m_printer_config;
|
||||
SLAMaterialConfig m_material_config;
|
||||
SLAPrintObjectConfig m_default_object_config;
|
||||
|
||||
PrintObjects m_objects;
|
||||
std::vector<bool> m_stepmask;
|
||||
SLAPrinterPtr m_printer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue