mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 16:25:56 +08:00
Fix finish job
Fix initial position
This commit is contained in:
parent
081a398cee
commit
d624940b7a
@ -41,8 +41,9 @@ Slic3r::Polygon CameraUtils::create_hull2d(const Camera & camera,
|
|||||||
const GLVolume &volume)
|
const GLVolume &volume)
|
||||||
{
|
{
|
||||||
const indexed_triangle_set &its = volume.convex_hull()->its;
|
const indexed_triangle_set &its = volume.convex_hull()->its;
|
||||||
const Transform3d &trafoMat = volume.get_instance_transformation()
|
const Transform3d & trafoMat =
|
||||||
.get_matrix();
|
volume.get_instance_transformation().get_matrix() *
|
||||||
|
volume.get_volume_transformation().get_matrix();
|
||||||
std::vector<Vec3d> vertices;
|
std::vector<Vec3d> vertices;
|
||||||
vertices.reserve(its.vertices.size());
|
vertices.reserve(its.vertices.size());
|
||||||
for (const Vec3f &vertex : its.vertices)
|
for (const Vec3f &vertex : its.vertices)
|
||||||
|
@ -336,6 +336,7 @@ void GLGizmoEmboss::on_set_state()
|
|||||||
remove_notification_not_valid_font();
|
remove_notification_not_valid_font();
|
||||||
} else if (GLGizmoBase::m_state == GLGizmoBase::On) {
|
} else if (GLGizmoBase::m_state == GLGizmoBase::On) {
|
||||||
if (!m_is_initialized) initialize();
|
if (!m_is_initialized) initialize();
|
||||||
|
set_fine_position();
|
||||||
|
|
||||||
// When add Text on empty plate, Create new object with volume
|
// When add Text on empty plate, Create new object with volume
|
||||||
if (m_parent.get_selection().is_empty()) {
|
if (m_parent.get_selection().is_empty()) {
|
||||||
|
@ -16,6 +16,11 @@ using namespace GUI;
|
|||||||
//EmbossJob::EmbossJob(): Job(std::make_shared<NotificationProgressIndicator>(wxGetApp().plater()->get_notification_manager())){}
|
//EmbossJob::EmbossJob(): Job(std::make_shared<NotificationProgressIndicator>(wxGetApp().plater()->get_notification_manager())){}
|
||||||
EmbossJob::EmbossJob() : Job(std::make_shared<EmbossJob::Progress>()) {}
|
EmbossJob::EmbossJob() : Job(std::make_shared<EmbossJob::Progress>()) {}
|
||||||
|
|
||||||
|
EmbossJob::~EmbossJob() {
|
||||||
|
Job::cancel();
|
||||||
|
Job::join();
|
||||||
|
}
|
||||||
|
|
||||||
void EmbossJob::restart(const Data &data)
|
void EmbossJob::restart(const Data &data)
|
||||||
{
|
{
|
||||||
if (Job::is_running()) {
|
if (Job::is_running()) {
|
||||||
@ -40,6 +45,7 @@ void EmbossJob::restart(const Data &data)
|
|||||||
Job::start();
|
Job::start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmbossJob::prepare() {}
|
void EmbossJob::prepare() {}
|
||||||
|
|
||||||
void EmbossJob::process() {
|
void EmbossJob::process() {
|
||||||
|
@ -34,7 +34,15 @@ public:
|
|||||||
int object_idx;
|
int object_idx;
|
||||||
};
|
};
|
||||||
EmbossJob();
|
EmbossJob();
|
||||||
|
~EmbossJob();// cancel work and join
|
||||||
|
|
||||||
void restart(const Data &data);
|
void restart(const Data &data);
|
||||||
|
|
||||||
|
// do not allow Job::start
|
||||||
|
bool join(int timeout_ms = 0) { return Job::join(timeout_ms); };
|
||||||
|
bool is_running() const { return Job::is_running(); }
|
||||||
|
void cancel() { Job::cancel(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Launched just before start(), a job can use it to prepare internals
|
// Launched just before start(), a job can use it to prepare internals
|
||||||
virtual void prepare() override;
|
virtual void prepare() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user