mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Prototype feature: fill plater with instances of selected object
#fixes #1350
This commit is contained in:
parent
bc3696bd42
commit
adf81af6de
8 changed files with 286 additions and 59 deletions
46
src/slic3r/GUI/Jobs/FillBedJob.hpp
Normal file
46
src/slic3r/GUI/Jobs/FillBedJob.hpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
#ifndef FILLBEDJOB_HPP
|
||||
#define FILLBEDJOB_HPP
|
||||
|
||||
#include "ArrangeJob.hpp"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
class Plater;
|
||||
|
||||
class FillBedJob : public Job
|
||||
{
|
||||
Plater *m_plater;
|
||||
int m_object_idx = -1;
|
||||
|
||||
using ArrangePolygon = arrangement::ArrangePolygon;
|
||||
using ArrangePolygons = arrangement::ArrangePolygons;
|
||||
|
||||
ArrangePolygons m_selected;
|
||||
ArrangePolygons m_unselected;
|
||||
|
||||
Points m_bedpts;
|
||||
|
||||
int m_status_range = 0;
|
||||
|
||||
protected:
|
||||
|
||||
void prepare() override;
|
||||
|
||||
public:
|
||||
FillBedJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater)
|
||||
: Job{std::move(pri)}, m_plater{plater}
|
||||
{}
|
||||
|
||||
int status_range() const override
|
||||
{
|
||||
return m_status_range;
|
||||
}
|
||||
|
||||
void process() override;
|
||||
|
||||
void finalize() override;
|
||||
};
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
#endif // FILLBEDJOB_HPP
|
Loading…
Add table
Add a link
Reference in a new issue