mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-07 06:49:05 +08:00
Added a check that all objects have the same layer height profile
This commit is contained in:
parent
281732ca38
commit
89686b808d
@ -612,6 +612,15 @@ std::string Print::validate() const
|
|||||||
bool was_layer_height_profile_valid = object->layer_height_profile_valid;
|
bool was_layer_height_profile_valid = object->layer_height_profile_valid;
|
||||||
object->update_layer_height_profile();
|
object->update_layer_height_profile();
|
||||||
object->layer_height_profile_valid = was_layer_height_profile_valid;
|
object->layer_height_profile_valid = was_layer_height_profile_valid;
|
||||||
|
|
||||||
|
PrintObject* first_object = this->objects.front();
|
||||||
|
int i = 0;
|
||||||
|
while ( i < first_object->layer_height_profile.size() && i < object->layer_height_profile.size() ) {
|
||||||
|
if (std::abs(first_object->layer_height_profile[i] - object->layer_height_profile[i]) > EPSILON )
|
||||||
|
return "The Wipe tower is only supported if all objects have the same layer height profile";
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
/*for (size_t i = 5; i < object->layer_height_profile.size(); i += 2)
|
/*for (size_t i = 5; i < object->layer_height_profile.size(); i += 2)
|
||||||
if (object->layer_height_profile[i-1] > slicing_params.object_print_z_min + EPSILON &&
|
if (object->layer_height_profile[i-1] > slicing_params.object_print_z_min + EPSILON &&
|
||||||
std::abs(object->layer_height_profile[i] - object->config.layer_height) > EPSILON)
|
std::abs(object->layer_height_profile[i] - object->config.layer_height) > EPSILON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user