Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURA-11873 interleaved prime tower bad raft #2078

Merged
merged 11 commits into from
May 21, 2024

Conversation

wawanbreton
Copy link
Contributor

The recent addition of the "interleaved" prime tower didn't really consider the use of the raft, which can use various extruders combinations. This PR fixes cases were some prime tower layers were completely missing while printing the raft, resulting in unusable interleaved prime tower.

The first 2 commits do some code simplification that is now possible due to the changed prime tower raft a few months ago. Before that, the prime tower had a regular raft below it, which is not the case anymore.
The last 2 commits actually handle the prime tower generation, properly taking care of the raft.

CURA-11873

@wawanbreton wawanbreton marked this pull request as ready for review May 10, 2024 10:18
@wawanbreton wawanbreton changed the base branch from main to 5.7 May 10, 2024 10:18
Previously the material_print_temp_prepend setting was taken care of
only for non-Griffin flavor. This logic is now also applied for Griffin,
and the setting is properly applied.

CURA-11868
Previously we would calculate the most appropriate layer to do the
priming of an extruder, but when using a prime blob the extruder needs
to be primed at first layer, which won't happen when using a raft. We
now then for priming at first layer when having a prime blob, and
process priming after the raft base layer has been printed.

CURA-11868
Copy link
Contributor

@casperlamboo casperlamboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember implementing some logic where you could determine per layer nr what raft layer is printed. This PR seems to re-implement a lot of that logic.

CuraEngine/src/raft.cpp

Lines 199 to 229 in 8a3debd

Raft::LayerType Raft::getLayerType(LayerIndex layer_index)
{
const Settings& mesh_group_settings = Application::getInstance().current_slice_->scene.current_mesh_group->settings;
const ExtruderTrain& base_train = mesh_group_settings.get<ExtruderTrain&>("raft_base_extruder_nr");
const ExtruderTrain& interface_train = mesh_group_settings.get<ExtruderTrain&>("raft_interface_extruder_nr");
const ExtruderTrain& surface_train = mesh_group_settings.get<ExtruderTrain&>("raft_surface_extruder_nr");
const auto airgap = Raft::getFillerLayerCount();
const auto interface_layers = interface_train.settings_.get<size_t>("raft_interface_layers");
const auto surface_layers = surface_train.settings_.get<size_t>("raft_surface_layers");
if (layer_index < -airgap - surface_layers - interface_layers)
{
return LayerType::RaftBase;
}
if (layer_index < -airgap - surface_layers)
{
return LayerType::RaftInterface;
}
if (layer_index < -airgap)
{
return LayerType::RaftSurface;
}
else if (layer_index < 0)
{
return LayerType::Airgap;
}
else
{
return LayerType::Model;
}
}

Does it make sense to re-use some of that code?

src/raft.cpp Outdated Show resolved Hide resolved
@wawanbreton
Copy link
Contributor Author

Does it make sense to re-use some of that code?

Yes it does ! I did it where it was possible, but maybe there are other parts of the code where it could also be used. I will try to keep that in mind.
I also simplified your actual implementation now that I have added specific methods to retrieve the numbers of layers.

@HellAholic HellAholic merged commit 805623c into 5.7 May 21, 2024
20 checks passed
@HellAholic HellAholic deleted the CURA-11873_interleaved_prime_tower_bad_raft branch May 21, 2024 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants