mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-02 19:44:00 -06:00
Allow auto-rotation of objects not completely inside bed.
Don't use SLAPrintObject as the input for optimization. Use ModelObject and pass the print config to the optimization in RotoptimizeJob::prepare()
This commit is contained in:
parent
5443f77489
commit
773116b777
4 changed files with 77 additions and 37 deletions
|
@ -4,18 +4,16 @@
|
|||
#include "PlaterJob.hpp"
|
||||
|
||||
#include "libslic3r/SLA/Rotfinder.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class SLAPrintObject;
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class RotoptimizeJob : public PlaterJob
|
||||
{
|
||||
using FindFn = std::function<Vec2d(const SLAPrintObject & po,
|
||||
float accuracy,
|
||||
sla::RotOptimizeStatusCB statuscb)>;
|
||||
using FindFn = std::function<Vec2d(const ModelObject & mo,
|
||||
const sla::RotOptimizeParams ¶ms)>;
|
||||
|
||||
struct FindMethod { std::string name; FindFn findfn; };
|
||||
|
||||
|
@ -26,6 +24,9 @@ class RotoptimizeJob : public PlaterJob
|
|||
|
||||
size_t m_method_id = 0;
|
||||
float m_accuracy = 0.75;
|
||||
|
||||
DynamicPrintConfig m_default_print_cfg;
|
||||
|
||||
protected:
|
||||
|
||||
void prepare() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue