mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
fixed an issue that zaa_enabled is redefined in both object and region. move all zaa config to region to keep it consistent
This commit is contained in:
@@ -35,8 +35,18 @@ LayerPtrs new_layers(
|
||||
coordf_t lo = object_layers[i_layer];
|
||||
coordf_t hi = object_layers[i_layer + 1];
|
||||
coordf_t slice_z = 0.5 * (lo + hi);
|
||||
if (print_object->config().zaa_enabled) {
|
||||
coordf_t z_offset = print_object->config().zaa_min_z;
|
||||
bool zaa_active = false;
|
||||
coordf_t z_offset = 0.0;
|
||||
size_t num_regions = print_object->num_printing_regions();
|
||||
for (size_t rid = 0; rid < num_regions; ++rid) {
|
||||
const auto &rcfg = print_object->printing_region(rid).config();
|
||||
if (rcfg.zaa_enabled) {
|
||||
if (!zaa_active || rcfg.zaa_min_z < z_offset)
|
||||
z_offset = rcfg.zaa_min_z;
|
||||
zaa_active = true;
|
||||
}
|
||||
}
|
||||
if (zaa_active) {
|
||||
slice_z = lo + z_offset;
|
||||
if (slice_z < lo || slice_z > hi) {
|
||||
throw RuntimeError("Bad min Z value");
|
||||
|
||||
Reference in New Issue
Block a user