mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-16 12:21:11 +00:00
Merge upstream main into IMEX parallel printing branch
Resolves two conflicts: - GLCanvas3D.hpp: keep both the IMEX ghost render declarations and upstream's _render_wireframe_overlay(). - test_gcodewriter.cpp: both sides appended test cases to the same region; keep upstream's origin/machine-limit tests alongside the pressure-advance and temperature scenarios.
This commit is contained in:
@@ -476,7 +476,7 @@ void PartPlate::set_spiral_vase_mode(bool spiral_mode, bool as_global)
|
||||
}
|
||||
}
|
||||
|
||||
bool PartPlate::valid_instance(int obj_id, int instance_id)
|
||||
bool PartPlate::valid_instance(int obj_id, int instance_id) const
|
||||
{
|
||||
if ((obj_id >= 0) && (obj_id < m_model->objects.size()))
|
||||
{
|
||||
@@ -2805,7 +2805,7 @@ std::vector<int> PartPlate::get_extruders_under_cli(bool conside_custom_gcode, D
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if ((obj_id >= 0) && (obj_id < m_model->objects.size()))
|
||||
if (valid_instance(obj_id, instance_id))
|
||||
{
|
||||
ModelObject* object = m_model->objects[obj_id];
|
||||
ModelInstance* instance = object->instances[instance_id];
|
||||
@@ -3476,6 +3476,9 @@ void PartPlate::set_pos_and_size(Vec3d& origin, int width, int depth, int height
|
||||
for (std::set<std::pair<int, int>>::iterator it = obj_to_instance_set.begin(); it != obj_to_instance_set.end(); ++it) {
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
if (!valid_instance(obj_id, instance_id))
|
||||
continue;
|
||||
|
||||
ModelObject* object = m_model->objects[obj_id];
|
||||
ModelInstance* instance = object->instances[instance_id];
|
||||
|
||||
@@ -3979,7 +3982,7 @@ void PartPlate::duplicate_all_instance(unsigned int dup_count, bool need_skip, s
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if ((obj_id >= 0) && (obj_id < m_model->objects.size()))
|
||||
if (valid_instance(obj_id, instance_id))
|
||||
{
|
||||
ModelObject* object = m_model->objects[obj_id];
|
||||
ModelInstance* instance = object->instances[instance_id];
|
||||
@@ -4012,7 +4015,7 @@ void PartPlate::duplicate_all_instance(unsigned int dup_count, bool need_skip, s
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if ((obj_id >= 0) && (obj_id < m_model->objects.size()))
|
||||
if (valid_instance(obj_id, instance_id))
|
||||
{
|
||||
ModelObject* object = m_model->objects[obj_id];
|
||||
ModelInstance* instance = object->instances[instance_id];
|
||||
@@ -4129,8 +4132,8 @@ int PartPlate::printable_instance_size()
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if (obj_id >= m_model->objects.size())
|
||||
continue;
|
||||
if (!valid_instance(obj_id, instance_id))
|
||||
continue;
|
||||
|
||||
ModelObject * object = m_model->objects[obj_id];
|
||||
ModelInstance *instance = object->instances[instance_id];
|
||||
@@ -4152,7 +4155,7 @@ bool PartPlate::has_printable_instances()
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if (obj_id >= m_model->objects.size())
|
||||
if (!valid_instance(obj_id, instance_id))
|
||||
continue;
|
||||
|
||||
ModelObject* object = m_model->objects[obj_id];
|
||||
@@ -4176,7 +4179,8 @@ bool PartPlate::is_all_instances_unprintable()
|
||||
int obj_id = it->first;
|
||||
int instance_id = it->second;
|
||||
|
||||
if (obj_id >= m_model->objects.size()) continue;
|
||||
if (!valid_instance(obj_id, instance_id))
|
||||
continue;
|
||||
|
||||
ModelObject * object = m_model->objects[obj_id];
|
||||
ModelInstance *instance = object->instances[instance_id];
|
||||
|
||||
Reference in New Issue
Block a user