mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
ENH: merge tree support layers to support layers
Will greately reduce repeated codes. Change-Id: I506a97a907b5b393fe41e13ae53e2f7c9247c4c5
This commit is contained in:
parent
b6ef31f7b9
commit
646b259972
11 changed files with 123 additions and 624 deletions
|
@ -201,10 +201,9 @@ public:
|
|||
// public, so that it could be accessed by free helper functions from GCode.cpp
|
||||
struct LayerToPrint
|
||||
{
|
||||
LayerToPrint() : object_layer(nullptr), support_layer(nullptr), tree_support_layer(nullptr), original_object(nullptr) {}
|
||||
LayerToPrint() : object_layer(nullptr), support_layer(nullptr), original_object(nullptr) {}
|
||||
const Layer* object_layer;
|
||||
const SupportLayer* support_layer;
|
||||
const TreeSupportLayer* tree_support_layer;
|
||||
const PrintObject* original_object; //BBS: used for shared object logic
|
||||
const Layer* layer() const
|
||||
{
|
||||
|
@ -214,9 +213,6 @@ public:
|
|||
if (support_layer != nullptr)
|
||||
return support_layer;
|
||||
|
||||
if (tree_support_layer != nullptr)
|
||||
return tree_support_layer;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -238,10 +234,6 @@ public:
|
|||
count++;
|
||||
}
|
||||
|
||||
if (tree_support_layer != nullptr) {
|
||||
sum_z += tree_support_layer->print_z;
|
||||
count++;
|
||||
}
|
||||
return sum_z / count;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue