diff --git a/include/raft.h b/include/raft.h index 11f0fffdf6..b6f837f53e 100644 --- a/include/raft.h +++ b/include/raft.h @@ -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 @@ -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. */ @@ -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, @@ -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 diff --git a/src/raft.cpp b/src/raft.cpp index c299b79061..233f93a40b 100644 --- a/src/raft.cpp +++ b/src/raft.cpp @@ -28,7 +28,8 @@ void Raft::generate(SliceDataStorage& storage) storage.raftSurfaceOutline = storage.raftSurfaceOutline.offset(settings.get("raft_surface_margin"), ClipperLib::jtRound); const coord_t shield_line_width_layer0 = settings.get("skirt_brim_line_width"); - const coord_t max_raft_distance = std::max(std::max(settings.get("raft_base_margin"), settings.get("raft_interface_margin")), settings.get("raft_surface_margin")); + const coord_t max_raft_distance + = std::max(std::max(settings.get("raft_base_margin"), settings.get("raft_interface_margin")), settings.get("raft_surface_margin")); if (storage.draft_protection_shield.size() > 0) { Polygons draft_shield_raft @@ -160,15 +161,15 @@ Raft::LayerType Raft::getLayerType(LayerIndex layer_index) const auto interface_layers = interface_train.settings_.get("raft_interface_layers"); const auto surface_layers = surface_train.settings_.get("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; }