update libslic3r

This commit is contained in:
QIDI TECH
2025-02-26 20:06:22 +08:00
parent 7d213ce20c
commit d32f03deb8
29 changed files with 241 additions and 100 deletions

View File

@@ -188,9 +188,10 @@ Model Model::read_from_step(const std::string&
LoadStrategy options,
ImportStepProgressFn stepFn,
StepIsUtf8Fn stepIsUtf8Fn,
std::function<int(Slic3r::Step&, double&, double&)> step_mesh_fn,
std::function<int(Slic3r::Step&, double&, double&, bool&)> step_mesh_fn,
double linear_defletion,
double angle_defletion)
double angle_defletion,
bool is_split_compound)
{
Model model;
bool result = false;
@@ -199,12 +200,12 @@ Model Model::read_from_step(const std::string&
Step step_file(input_file);
step_file.load();
if (step_mesh_fn) {
if (step_mesh_fn(step_file, linear_defletion, angle_defletion) == -1) {
if (step_mesh_fn(step_file, linear_defletion, angle_defletion, is_split_compound) == -1) {
Model empty_model;
return empty_model;
}
}
result = load_step(input_file.c_str(), &model, is_cb_cancel, linear_defletion, angle_defletion, stepFn, stepIsUtf8Fn);
result = load_step(input_file.c_str(), &model, is_cb_cancel, linear_defletion, angle_defletion, is_split_compound, stepFn, stepIsUtf8Fn);
if (is_cb_cancel) {
Model empty_model;
return empty_model;
@@ -3243,10 +3244,10 @@ std::string ModelVolume::type_to_string(const ModelVolumeType t)
// Split this volume, append the result to the object owning this volume.
// Return the number of volumes created from this one.
// This is useful to assign different materials to different volumes of an object.
size_t ModelVolume::split(unsigned int max_extruders)
size_t ModelVolume::split(unsigned int max_extruders, float scale_det)
{
std::vector<std::unordered_map<int, int>> ships;
std::vector<TriangleMesh> meshes = this->mesh().split_and_save_relationship(ships);
std::vector<TriangleMesh> meshes = this->mesh().split_and_save_relationship(ships, scale_det);
if (meshes.size() <= 1)
return 1;
if (meshes.size() != ships.size())