mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed conflicts after merge
slaposHollowing was divided into slaposHollowing and slaposDrillHoles on master This commit takes this into account on the code that was merged from lm_drilling_backend_rebased
This commit is contained in:
parent
a1d4dab999
commit
227cc4dc33
6 changed files with 12 additions and 14 deletions
|
@ -1978,7 +1978,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
|
||||
// SLA steps to pull the preview meshes for.
|
||||
typedef std::array<SLAPrintObjectStep, 3> SLASteps;
|
||||
SLASteps sla_steps = { slaposHollowing, slaposSupportTree, slaposPad };
|
||||
SLASteps sla_steps = { slaposDrillHoles, slaposSupportTree, slaposPad };
|
||||
struct SLASupportState {
|
||||
std::array<PrintStateBase::StateWithTimeStamp, std::tuple_size<SLASteps>::value> step;
|
||||
};
|
||||
|
@ -2025,7 +2025,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
// Consider the DONE step without a valid mesh as invalid for the purpose
|
||||
// of mesh visualization.
|
||||
state.step[istep].state = PrintStateBase::INVALID;
|
||||
else if (sla_steps[istep] != slaposHollowing)
|
||||
else if (sla_steps[istep] != slaposDrillHoles)
|
||||
for (const ModelInstance* model_instance : print_object->model_object()->instances)
|
||||
// Only the instances, which are currently printable, will have the SLA support structures kept.
|
||||
// The instances outside the print bed will have the GLVolumes of their support structures released.
|
||||
|
@ -2169,7 +2169,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
assert(it != model_object->instances.end());
|
||||
int instance_idx = it - model_object->instances.begin();
|
||||
for (size_t istep = 0; istep < sla_steps.size(); ++ istep)
|
||||
if (sla_steps[istep] == slaposHollowing) {
|
||||
if (sla_steps[istep] == slaposDrillHoles) {
|
||||
// Hollowing is a special case, where the mesh from the backend is being loaded into the 1st volume of an instance,
|
||||
// not into its own GLVolume.
|
||||
// There shall always be such a GLVolume allocated.
|
||||
|
@ -2182,7 +2182,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||
// The backend either produced a new hollowed mesh, or it invalidated the one that the front end has seen.
|
||||
volume.indexed_vertex_array.release_geometry();
|
||||
if (state.step[istep].state == PrintStateBase::DONE) {
|
||||
TriangleMesh mesh = print_object->get_mesh(slaposHollowing);
|
||||
TriangleMesh mesh = print_object->get_mesh(slaposDrillHoles);
|
||||
assert(! mesh.empty());
|
||||
mesh.transform(sla_print->sla_trafo(*m_model->objects[volume.object_idx()]).inverse());
|
||||
volume.indexed_vertex_array.load_mesh(mesh);
|
||||
|
@ -6106,8 +6106,6 @@ void GLCanvas3D::_load_sla_shells()
|
|||
unsigned int initial_volumes_count = (unsigned int)m_volumes.volumes.size();
|
||||
for (const SLAPrintObject::Instance& instance : obj->instances()) {
|
||||
add_volume(*obj, 0, instance, obj->get_mesh_to_print(), GLVolume::MODEL_COLOR[0], true);
|
||||
// if (! obj->hollowed_interior_mesh().empty())
|
||||
// add_volume(*obj, -int(slaposHollowing), instance, obj->hollowed_interior_mesh(), GLVolume::MODEL_COLOR[0], false);
|
||||
// Set the extruder_id and volume_id to achieve the same color as in the 3D scene when
|
||||
// through the update_volumes_colors_by_extruder() call.
|
||||
m_volumes.volumes.back()->extruder_id = obj->model_object()->volumes.front()->extruder_id();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue