PRUS.cpp: Fixed an always-true condition in extract_model_from_archive
SupportMaterial.cpp: Simplified one condition (also solves a -Wmaybe-uninitialized warning on gcc)
This commit is contained in:
parent
b67d8c1614
commit
1d18339e62
2 changed files with 5 additions and 12 deletions
|
@ -278,7 +278,7 @@ static void extract_model_from_archive(
|
||||||
instance->set_rotation(instance_rotation);
|
instance->set_rotation(instance_rotation);
|
||||||
instance->set_scaling_factor(instance_scaling_factor);
|
instance->set_scaling_factor(instance_scaling_factor);
|
||||||
instance->set_offset(instance_offset);
|
instance->set_offset(instance_offset);
|
||||||
if (group_id != (size_t)-1)
|
if (group_id != (unsigned int)(-1))
|
||||||
group_to_model_object[group_id] = model_object;
|
group_to_model_object[group_id] = model_object;
|
||||||
} else {
|
} else {
|
||||||
// This is not the 1st mesh of a group. Add it to the ModelObject.
|
// This is not the 1st mesh of a group. Add it to the ModelObject.
|
||||||
|
|
|
@ -2934,20 +2934,13 @@ void PrintObjectSupportMaterial::generate_toolpaths(
|
||||||
// Prepare fillers.
|
// Prepare fillers.
|
||||||
SupportMaterialPattern support_pattern = m_object_config->support_material_pattern;
|
SupportMaterialPattern support_pattern = m_object_config->support_material_pattern;
|
||||||
bool with_sheath = m_object_config->support_material_with_sheath;
|
bool with_sheath = m_object_config->support_material_with_sheath;
|
||||||
InfillPattern infill_pattern;
|
InfillPattern infill_pattern = (support_pattern == smpHoneycomb ? ipHoneycomb : ipRectilinear);
|
||||||
std::vector<float> angles;
|
std::vector<float> angles;
|
||||||
angles.push_back(base_angle);
|
angles.push_back(base_angle);
|
||||||
switch (support_pattern) {
|
|
||||||
case smpRectilinearGrid:
|
if (support_pattern == smpRectilinearGrid)
|
||||||
angles.push_back(interface_angle);
|
angles.push_back(interface_angle);
|
||||||
// fall through
|
|
||||||
case smpRectilinear:
|
|
||||||
infill_pattern = ipRectilinear;
|
|
||||||
break;
|
|
||||||
case smpHoneycomb:
|
|
||||||
infill_pattern = ipHoneycomb;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
BoundingBox bbox_object(Point(-scale_(1.), -scale_(1.0)), Point(scale_(1.), scale_(1.)));
|
BoundingBox bbox_object(Point(-scale_(1.), -scale_(1.0)), Point(scale_(1.), scale_(1.)));
|
||||||
|
|
||||||
// const coordf_t link_max_length_factor = 3.;
|
// const coordf_t link_max_length_factor = 3.;
|
||||||
|
|
Loading…
Reference in a new issue