FIX: crosshatch height shift error since orca commit

jira 6984

Fix the layer shift cauculating error while reducing wrapping after importing the improvement from orca.

Change-Id: I1af1b29a6578836e5715685a4478a5b1d29f4ecf
This commit is contained in:
jianjia.ma 2024-06-07 20:33:47 +08:00 committed by Lane.Wei
parent df15851d32
commit ee57873081
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ static Polylines generate_infill_layers(coordf_t z_height, double repeat_ratio,
Polylines result;
coordf_t trans_layer_size = grid_size * 0.4; // upper.
coordf_t repeat_layer_size = grid_size * repeat_ratio; // lower.
z_height += repeat_layer_size / 2 + trans_layer_size; // offset to improve first few layer strength and reduce the risk of warpping.
z_height += repeat_layer_size / 2 ; // offset to improve first few layer strength and reduce the risk of warpping.
coordf_t period = trans_layer_size + repeat_layer_size;
coordf_t remains = z_height - std::floor(z_height / period) * period;
coordf_t trans_z = remains - repeat_layer_size; // put repeat layer first.