Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/CURA-11395-' into CURA-11395-
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Jan 8, 2024
2 parents 88c255c + 3bec150 commit 17bf706
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
16 changes: 8 additions & 8 deletions include/raft.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
// Copyright (c) 2018 Ultimaker B.V.
// CuraEngine is released under the terms of the AGPLv3 or higher.

#ifndef RAFT_H
#define RAFT_H
Expand Down Expand Up @@ -30,7 +30,7 @@ class Raft
/*!
* \brief Get the amount of layers to fill the airgap and initial layer with
* helper parts (support, prime tower, etc.).
*
*
* The initial layer gets a separate filler layer because we don't want to
* apply the layer_0_z_overlap to it.
*/
Expand All @@ -50,12 +50,13 @@ class Raft
/*!
* \brief Get the total amount of extra layers below zero because there is a
* raft.
*
*
* This includes the filler layers which are introduced in the air gap.
*/
static size_t getTotalExtraLayers();

enum LayerType {
enum LayerType
{
RaftBase,
RaftInterface,
RaftSurface,
Expand All @@ -69,9 +70,8 @@ class Raft
* \return The type of layer at the given layer index.
*/
static LayerType getLayerType(LayerIndex layer_index);

};

}//namespace cura
} // namespace cura

#endif//RAFT_H
#endif // RAFT_H
9 changes: 5 additions & 4 deletions src/raft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ void Raft::generate(SliceDataStorage& storage)
storage.raftSurfaceOutline = storage.raftSurfaceOutline.offset(settings.get<coord_t>("raft_surface_margin"), ClipperLib::jtRound);

const coord_t shield_line_width_layer0 = settings.get<coord_t>("skirt_brim_line_width");
const coord_t max_raft_distance = std::max(std::max(settings.get<coord_t>("raft_base_margin"), settings.get<coord_t>("raft_interface_margin")), settings.get<coord_t>("raft_surface_margin"));
const coord_t max_raft_distance
= std::max(std::max(settings.get<coord_t>("raft_base_margin"), settings.get<coord_t>("raft_interface_margin")), settings.get<coord_t>("raft_surface_margin"));
if (storage.draft_protection_shield.size() > 0)
{
Polygons draft_shield_raft
Expand Down Expand Up @@ -160,15 +161,15 @@ Raft::LayerType Raft::getLayerType(LayerIndex layer_index)
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)
if (layer_index < -airgap - surface_layers - interface_layers)
{
return LayerType::RaftBase;
}
if (layer_index < - airgap - surface_layers)
if (layer_index < -airgap - surface_layers)
{
return LayerType::RaftInterface;
}
if (layer_index < - airgap)
if (layer_index < -airgap)
{
return LayerType::RaftSurface;
}
Expand Down

0 comments on commit 17bf706

Please sign in to comment.