mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 21:26:01 +08:00
Update for SLA
This commit is contained in:
parent
226ab414d9
commit
7e59cc7e64
@ -419,7 +419,8 @@ void UpdateJob::update_volume(ModelVolume *volume, TriangleMesh &&mesh, const Da
|
|||||||
volume->set_mesh(std::move(mesh));
|
volume->set_mesh(std::move(mesh));
|
||||||
volume->set_new_unique_id();
|
volume->set_new_unique_id();
|
||||||
volume->calculate_convex_hull();
|
volume->calculate_convex_hull();
|
||||||
volume->get_object()->invalidate_bounding_box();
|
ModelObject *object = volume->get_object();
|
||||||
|
object->invalidate_bounding_box();
|
||||||
|
|
||||||
// write data from base into volume
|
// write data from base into volume
|
||||||
base.write(*volume);
|
base.write(*volume);
|
||||||
@ -433,20 +434,17 @@ void UpdateJob::update_volume(ModelVolume *volume, TriangleMesh &&mesh, const Da
|
|||||||
update_name_in_list(*obj_list, *volume);
|
update_name_in_list(*obj_list, *volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When text is object.
|
// Get object id to set object as changed
|
||||||
// When text positive volume is lowest part of object than modification of text
|
Plater* plater = app.plater();
|
||||||
// have to move object on bed.
|
ModelObjectPtrs objects = plater->model().objects;
|
||||||
if (volume->type() == ModelVolumeType::MODEL_PART)
|
int obj_idx = -1;
|
||||||
volume->get_object()->ensure_on_bed();
|
for (int i = 0; i < objects.size(); ++i)
|
||||||
|
if (objects[i]->id() == object->id()) {
|
||||||
// redraw scene
|
obj_idx = i;
|
||||||
GLCanvas3D *canvas = app.plater()->canvas3D();
|
break;
|
||||||
|
}
|
||||||
bool refresh_immediately = false;
|
assert(obj_idx >= 0);
|
||||||
canvas->reload_scene(refresh_immediately);
|
plater->changed_object(obj_idx);
|
||||||
|
|
||||||
// Change buttons "Export G-code" into "Slice now"
|
|
||||||
canvas->post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
|
@ -7808,7 +7808,8 @@ void Plater::clear_before_change_mesh(int obj_idx, const std::string ¬ificati
|
|||||||
void Plater::changed_mesh(int obj_idx)
|
void Plater::changed_mesh(int obj_idx)
|
||||||
{
|
{
|
||||||
ModelObject* mo = model().objects[obj_idx];
|
ModelObject* mo = model().objects[obj_idx];
|
||||||
sla::reproject_points_and_holes(mo);
|
if (p->printer_technology == ptSLA)
|
||||||
|
sla::reproject_points_and_holes(mo);
|
||||||
update();
|
update();
|
||||||
p->object_list_changed();
|
p->object_list_changed();
|
||||||
p->schedule_background_process();
|
p->schedule_background_process();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user