mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 16:59:05 +08:00
FIX: infill speed not work on region level
Jira: none Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ie3d17c5e3cbf91a8854e3b4cd80babeb2b1bd121
This commit is contained in:
parent
551ba96205
commit
480489b29b
@ -60,7 +60,10 @@ struct SurfaceFillParams
|
||||
|
||||
// Index of this entry in a linear vector.
|
||||
size_t idx = 0;
|
||||
|
||||
// infill speed settings
|
||||
float sparse_infill_speed = 0;
|
||||
float top_surface_speed = 0;
|
||||
float solid_infill_speed = 0;
|
||||
|
||||
bool operator<(const SurfaceFillParams &rhs) const {
|
||||
#define RETURN_COMPARE_NON_EQUAL(KEY) if (this->KEY < rhs.KEY) return true; if (this->KEY > rhs.KEY) return false;
|
||||
@ -85,6 +88,10 @@ struct SurfaceFillParams
|
||||
RETURN_COMPARE_NON_EQUAL(flow.nozzle_diameter());
|
||||
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, bridge);
|
||||
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, extrusion_role);
|
||||
RETURN_COMPARE_NON_EQUAL(sparse_infill_speed);
|
||||
RETURN_COMPARE_NON_EQUAL(top_surface_speed);
|
||||
RETURN_COMPARE_NON_EQUAL(solid_infill_speed);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -102,7 +109,10 @@ struct SurfaceFillParams
|
||||
this->anchor_length_max == rhs.anchor_length_max &&
|
||||
this->with_loop == rhs.with_loop &&
|
||||
this->flow == rhs.flow &&
|
||||
this->extrusion_role == rhs.extrusion_role;
|
||||
this->extrusion_role == rhs.extrusion_role &&
|
||||
this->sparse_infill_speed == rhs.sparse_infill_speed &&
|
||||
this->top_surface_speed == rhs.top_surface_speed &&
|
||||
this->solid_infill_speed == rhs.solid_infill_speed;
|
||||
}
|
||||
};
|
||||
|
||||
@ -182,7 +192,15 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||
//BBS: always enable thick bridge for internal bridge
|
||||
layerm.bridging_flow(extrusion_role, (surface.is_bridge() && !surface.is_external()) || object_config.thick_bridges) :
|
||||
layerm.flow(extrusion_role, (surface.thickness == -1) ? layer.height : surface.thickness);
|
||||
|
||||
//BBS: record speed params
|
||||
if (!params.with_loop && !params.bridge) {
|
||||
if (params.extrusion_role == erInternalInfill)
|
||||
params.sparse_infill_speed = region_config.sparse_infill_speed;
|
||||
else if (params.extrusion_role == erTopSolidInfill)
|
||||
params.top_surface_speed = region_config.top_surface_speed;
|
||||
else if (params.extrusion_role == erSolidInfill)
|
||||
params.solid_infill_speed = region_config.internal_solid_infill_speed;
|
||||
}
|
||||
// Calculate flow spacing for infill pattern generation.
|
||||
if (surface.is_solid() || is_bridge) {
|
||||
params.spacing = params.flow.spacing();
|
||||
|
Loading…
x
Reference in New Issue
Block a user