mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-21 20:18:17 +08:00
Fixed merge issues.
This commit is contained in:
parent
3a24fb2f47
commit
b1420283b6
@ -2134,7 +2134,7 @@ namespace Slic3r {
|
|||||||
const DynamicPrintConfig& config = range.second;
|
const DynamicPrintConfig& config = range.second;
|
||||||
for (const std::string& opt_key : config.keys())
|
for (const std::string& opt_key : config.keys())
|
||||||
{
|
{
|
||||||
pt::ptree& opt_tree = range_tree.add("option", config.serialize(opt_key));
|
pt::ptree& opt_tree = range_tree.add("option", config.opt_serialize(opt_key));
|
||||||
opt_tree.put("<xmlattr>.opt_key", opt_key);
|
opt_tree.put("<xmlattr>.opt_key", opt_key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -933,10 +933,8 @@ bool store_amf(const char *path, Model *model, const DynamicPrintConfig *config)
|
|||||||
stream << ";" << layer_height_profile[i];
|
stream << ";" << layer_height_profile[i];
|
||||||
stream << "\n </metadata>\n";
|
stream << "\n </metadata>\n";
|
||||||
}
|
}
|
||||||
//FIXME Store the layer height ranges (ModelObject::layer_height_ranges)
|
|
||||||
|
|
||||||
|
// Export layer height ranges including the layer range specific config overrides.
|
||||||
// #ys_FIXME_experiment : Try to export layer config range
|
|
||||||
const t_layer_config_ranges& config_ranges = object->layer_config_ranges;
|
const t_layer_config_ranges& config_ranges = object->layer_config_ranges;
|
||||||
if (!config_ranges.empty())
|
if (!config_ranges.empty())
|
||||||
{
|
{
|
||||||
@ -950,7 +948,7 @@ bool store_amf(const char *path, Model *model, const DynamicPrintConfig *config)
|
|||||||
stream << range.first.first << ";" << range.first.second << "</metadata>\n";
|
stream << range.first.first << ";" << range.first.second << "</metadata>\n";
|
||||||
|
|
||||||
for (const std::string& key : range.second.keys())
|
for (const std::string& key : range.second.keys())
|
||||||
stream << " <metadata type=\"slic3r." << key << "\">" << range.second.serialize(key) << "</metadata>\n";
|
stream << " <metadata type=\"slic3r." << key << "\">" << range.second.opt_serialize(key) << "</metadata>\n";
|
||||||
|
|
||||||
stream << " </range>\n";
|
stream << " </range>\n";
|
||||||
layer_counter++;
|
layer_counter++;
|
||||||
|
@ -1579,9 +1579,9 @@ void ModelVolume::center_geometry_after_creation()
|
|||||||
if (!shift.isApprox(Vec3d::Zero()))
|
if (!shift.isApprox(Vec3d::Zero()))
|
||||||
{
|
{
|
||||||
if (m_mesh)
|
if (m_mesh)
|
||||||
m_mesh->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
const_cast<TriangleMesh*>(m_mesh.get())->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
||||||
if (m_convex_hull)
|
if (m_convex_hull)
|
||||||
m_convex_hull->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
const_cast<TriangleMesh*>(m_convex_hull.get())->translate(-(float)shift(0), -(float)shift(1), -(float)shift(2));
|
||||||
translate(shift);
|
translate(shift);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ private:
|
|||||||
}
|
}
|
||||||
template<class Archive> void serialize(Archive &ar) {
|
template<class Archive> void serialize(Archive &ar) {
|
||||||
ar(cereal::base_class<ObjectBase>(this));
|
ar(cereal::base_class<ObjectBase>(this));
|
||||||
ar(name, input_file, instances, volumes, config, layer_height_ranges, layer_height_profile, sla_support_points, sla_points_status, origin_translation,
|
ar(name, input_file, instances, volumes, config, layer_config_ranges, layer_height_profile, sla_support_points, sla_points_status, origin_translation,
|
||||||
m_bounding_box, m_bounding_box_valid, m_raw_bounding_box, m_raw_bounding_box_valid, m_raw_mesh_bounding_box, m_raw_mesh_bounding_box_valid);
|
m_bounding_box, m_bounding_box_valid, m_raw_bounding_box, m_raw_bounding_box_valid, m_raw_mesh_bounding_box, m_raw_mesh_bounding_box_valid);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -587,10 +587,10 @@ Print::ApplyStatus Print::apply(const Model &model, const DynamicPrintConfig &co
|
|||||||
Moved,
|
Moved,
|
||||||
Deleted,
|
Deleted,
|
||||||
};
|
};
|
||||||
ModelObjectStatus(ModelID id, Status status = Unknown) : id(id), status(status) {}
|
ModelObjectStatus(ObjectID id, Status status = Unknown) : id(id), status(status) {}
|
||||||
ModelID id;
|
ObjectID id;
|
||||||
Status status;
|
Status status;
|
||||||
LayerRanges layer_ranges;
|
LayerRanges layer_ranges;
|
||||||
// Search by id.
|
// Search by id.
|
||||||
bool operator<(const ModelObjectStatus &rhs) const { return id < rhs.id; }
|
bool operator<(const ModelObjectStatus &rhs) const { return id < rhs.id; }
|
||||||
};
|
};
|
||||||
|
@ -3400,5 +3400,13 @@ void ObjectList::recreate_object_list()
|
|||||||
m_prevent_list_events = false;
|
m_prevent_list_events = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModelObject* ObjectList::object(const int obj_idx) const
|
||||||
|
{
|
||||||
|
if (obj_idx < 0)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return (*m_objects)[obj_idx];
|
||||||
|
}
|
||||||
|
|
||||||
} //namespace GUI
|
} //namespace GUI
|
||||||
} //namespace Slic3r
|
} //namespace Slic3r
|
Loading…
x
Reference in New Issue
Block a user