OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::SupportNode Struct Reference

Represents the metadata of a node in the tree. More...

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Support/TreeSupport.hpp>

Collaboration diagram for Slic3r::SupportNode:

Public Member Functions

 SupportNode ()
 SupportNode (const Point position, const int distance_to_top, const int obj_layer_nr, const int support_roof_layers_below, const bool to_buildplate, SupportNode *parent, coordf_t print_z_, coordf_t height_, coordf_t dist_mm_to_top_=0, coordf_t radius_=0)
bool operator== (const SupportNode &other) const

Public Attributes

int distance_to_top
 The number of layers to go to the top of this branch. Negative value means it's a virtual node between support and overhang, which doesn't need to be extruded.
coordf_t dist_mm_to_top = 0
Point position
 The position of this node on the layer.
Point movement
double radius = 0.0
double max_move_dist = 0.0
TreeNodeType type = eCircle
bool is_corner = false
bool is_processed = false
bool is_sharp_tail = false
bool valid = true
ExPolygon overhang
Point skin_direction
 The direction of the skin lines above the tip of the branch.
int support_roof_layers_below
 The number of support roof layers below this one.
int obj_layer_nr
bool to_buildplate
 Whether to try to go towards the build plate.
SupportNode * parent
 The originating node for this one, one layer higher.
std::vector< SupportNode * > parents
SupportNode * child = nullptr
std::list< SupportNode * > merged_neighbours
 All neighbours (on the same layer) that where merged into this node.
coordf_t print_z
coordf_t height

Static Public Attributes

static constexpr SupportNode * NO_PARENT = nullptr
static double diameter_angle_scale_factor

Detailed Description

Represents the metadata of a node in the tree.

Constructor & Destructor Documentation

◆ SupportNode() [1/2]

Slic3r::SupportNode::SupportNode ( )
inline
69 , position(Point(0, 0))
70 , obj_layer_nr(0)
72 , to_buildplate(true)
73 , parent(nullptr)
74 , print_z(0.0)
75 , height(0.0)
76 {}
Kernel::Point_3 Point
Definition MeshRepair.cpp:81
int distance_to_top
The number of layers to go to the top of this branch. Negative value means it's a virtual node betwee...
Definition TreeSupport.hpp:122
int obj_layer_nr
Definition TreeSupport.hpp:159
Point position
The position of this node on the layer.
Definition TreeSupport.hpp:131
int support_roof_layers_below
The number of support roof layers below this one.
Definition TreeSupport.hpp:158
SupportNode * parent
The originating node for this one, one layer higher.
Definition TreeSupport.hpp:177
coordf_t print_z
Definition TreeSupport.hpp:190
bool to_buildplate
Whether to try to go towards the build plate.
Definition TreeSupport.hpp:168
coordf_t height
Definition TreeSupport.hpp:191

References distance_to_top, height, obj_layer_nr, parent, position, print_z, support_roof_layers_below, and to_buildplate.

Referenced by SupportNode(), and operator==().

Here is the caller graph for this function:

◆ SupportNode() [2/2]

Slic3r::SupportNode::SupportNode ( const Point position,
const int distance_to_top,
const int obj_layer_nr,
const int support_roof_layers_below,
const bool to_buildplate,
SupportNode * parent,
coordf_t print_z_,
coordf_t height_,
coordf_t dist_mm_to_top_ = 0,
coordf_t radius_ = 0 )
inline
86 , parent(parent)
87 , print_z(print_z_)
88 , height(height_)
89 , dist_mm_to_top(dist_mm_to_top_)
90 , radius(radius_)
91 {
92 if (parent) {
93 parents.push_back(parent);
94 type = parent->type;
95 overhang = parent->overhang;
96 if (dist_mm_to_top == 0)
97 dist_mm_to_top = parent->dist_mm_to_top + parent->height;
98 if (radius == 0 && parent->radius>0)
99 radius = parent->radius + (dist_mm_to_top - parent->dist_mm_to_top) * diameter_angle_scale_factor;
100 parent->child = this;
101 for (auto& neighbor : parent->merged_neighbours) {
102 neighbor->child = this;
103 parents.push_back(neighbor);
104 }
105 is_sharp_tail = parent->is_sharp_tail;
106 skin_direction = parent->skin_direction;
107 }
108 }
coordf_t dist_mm_to_top
Definition TreeSupport.hpp:123
Point skin_direction
The direction of the skin lines above the tip of the branch.
Definition TreeSupport.hpp:148
static double diameter_angle_scale_factor
Definition TreeSupport.hpp:126
double radius
Definition TreeSupport.hpp:133
ExPolygon overhang
Definition TreeSupport.hpp:140
bool is_sharp_tail
Definition TreeSupport.hpp:138
std::vector< SupportNode * > parents
Definition TreeSupport.hpp:178
TreeNodeType type
Definition TreeSupport.hpp:135

References SupportNode(), diameter_angle_scale_factor, dist_mm_to_top, distance_to_top, height, is_sharp_tail, obj_layer_nr, overhang, parent, parents, position, print_z, radius, skin_direction, support_roof_layers_below, to_buildplate, and type.

Here is the call graph for this function:

Member Function Documentation

◆ operator==()

bool Slic3r::SupportNode::operator== ( const SupportNode & other) const
inline
194 {
195 return position == other.position;
196 }

References SupportNode(), and position.

Here is the call graph for this function:

Member Data Documentation

◆ child

SupportNode* Slic3r::SupportNode::child = nullptr

◆ diameter_angle_scale_factor

double Slic3r::SupportNode::diameter_angle_scale_factor
static

◆ dist_mm_to_top

coordf_t Slic3r::SupportNode::dist_mm_to_top = 0

◆ distance_to_top

int Slic3r::SupportNode::distance_to_top

The number of layers to go to the top of this branch. Negative value means it's a virtual node between support and overhang, which doesn't need to be extruded.

Referenced by SupportNode(), SupportNode(), Slic3r::TreeSupport::insert_dropped_node(), and Slic3r::TreeSupport::plan_layer_heights().

◆ height

coordf_t Slic3r::SupportNode::height

◆ is_corner

bool Slic3r::SupportNode::is_corner = false

◆ is_processed

bool Slic3r::SupportNode::is_processed = false

◆ is_sharp_tail

bool Slic3r::SupportNode::is_sharp_tail = false

Referenced by SupportNode().

◆ max_move_dist

double Slic3r::SupportNode::max_move_dist = 0.0
mutable

◆ merged_neighbours

std::list<SupportNode*> Slic3r::SupportNode::merged_neighbours

All neighbours (on the same layer) that where merged into this node.

In order to prune branches that can't have any support (because they can't be on the model and the path to the buildplate isn't clear), the entire branch needs to be known.

◆ movement

Point Slic3r::SupportNode::movement

◆ NO_PARENT

SupportNode* Slic3r::SupportNode::NO_PARENT = nullptr
staticconstexpr

◆ obj_layer_nr

int Slic3r::SupportNode::obj_layer_nr

Referenced by SupportNode(), and SupportNode().

◆ overhang

ExPolygon Slic3r::SupportNode::overhang

Referenced by SupportNode().

◆ parent

SupportNode* Slic3r::SupportNode::parent

The originating node for this one, one layer higher.

In order to prune branches that can't have any support (because they can't be on the model and the path to the buildplate isn't clear), the entire branch needs to be known.

Referenced by SupportNode(), SupportNode(), and Slic3r::TreeSupport::smooth_nodes().

◆ parents

std::vector<SupportNode*> Slic3r::SupportNode::parents

Referenced by SupportNode().

◆ position

Point Slic3r::SupportNode::position

◆ print_z

coordf_t Slic3r::SupportNode::print_z

◆ radius

double Slic3r::SupportNode::radius = 0.0
mutable

◆ skin_direction

Point Slic3r::SupportNode::skin_direction

The direction of the skin lines above the tip of the branch.

This determines in which direction we should reduce the width of the branch.

Referenced by SupportNode().

◆ support_roof_layers_below

int Slic3r::SupportNode::support_roof_layers_below

The number of support roof layers below this one.

When a contact point is created, it is determined whether the mesh needs to be supported with support roof or not, since that is a per-mesh setting. This is stored in this variable in order to track how far we need to extend that support roof downwards.

Referenced by SupportNode(), SupportNode(), and Slic3r::TreeSupport::insert_dropped_node().

◆ to_buildplate

bool Slic3r::SupportNode::to_buildplate

Whether to try to go towards the build plate.

If the node is inside the collision areas, it has no choice but to go towards the model. If it is not inside the collision areas, it must go towards the build plate to prevent a scar on the surface.

Referenced by SupportNode(), and SupportNode().

◆ type

TreeNodeType Slic3r::SupportNode::type = eCircle

Referenced by SupportNode().

◆ valid

bool Slic3r::SupportNode::valid = true

The documentation for this struct was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Support/TreeSupport.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Support/TreeSupport.cpp