Squash merge of lh_brim_rework,

brim separated to Brim.cpp,hpp
Refactored accessors to PrintObjectPtrs, PrintRegionPtrs, LayerPtrs,
SupportLayerPtrs for const correctness.
This commit is contained in:
Vojtech Bubnik 2021-02-03 15:12:53 +01:00
parent e52efe48b0
commit 73c9f939e0
37 changed files with 803 additions and 243 deletions

View file

@ -18,7 +18,7 @@ SCENARIO("PrintObject: object layer heights", "[PrintObject]") {
{ "layer_height", 2 },
{ "nozzle_diameter", 3 }
});
const std::vector<Slic3r::Layer*> &layers = print.objects().front()->layers();
ConstLayerPtrsAdaptor layers = print.objects().front()->layers();
THEN("The output vector has 10 entries") {
REQUIRE(layers.size() == 10);
}
@ -37,7 +37,7 @@ SCENARIO("PrintObject: object layer heights", "[PrintObject]") {
{ "layer_height", 10 },
{ "nozzle_diameter", 11 }
});
const std::vector<Slic3r::Layer*> &layers = print.objects().front()->layers();
ConstLayerPtrsAdaptor layers = print.objects().front()->layers();
THEN("The output vector has 3 entries") {
REQUIRE(layers.size() == 3);
}
@ -55,7 +55,7 @@ SCENARIO("PrintObject: object layer heights", "[PrintObject]") {
{ "layer_height", 15 },
{ "nozzle_diameter", 16 }
});
const std::vector<Slic3r::Layer*> &layers = print.objects().front()->layers();
ConstLayerPtrsAdaptor layers = print.objects().front()->layers();
THEN("The output vector has 2 entries") {
REQUIRE(layers.size() == 2);
}

View file

@ -27,7 +27,7 @@ SCENARIO("SupportMaterial: support_layers_z and contact_distance", "[SupportMate
auto check = [](Slic3r::Print &print, bool &first_support_layer_height_ok, bool &layer_height_minimum_ok, bool &layer_height_maximum_ok, bool &top_spacing_ok)
{
const std::vector<Slic3r::SupportLayer*> &support_layers = print.objects().front()->support_layers();
ConstSupportLayerPtrsAdaptor support_layers = print.objects().front()->support_layers();
first_support_layer_height_ok = support_layers.front()->print_z == print.default_object_config().first_layer_height.value;