OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GCodeProcessorResult::ObjectMass Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/GCode/GCodeProcessor.hpp>

Collaboration diagram for Slic3r::GCodeProcessorResult::ObjectMass:

Classes

struct  Sum

Public Member Functions

Sum total () const
void add (const Sum &sum, const BoundingBoxf3 &extent, size_t layer)

Public Attributes

std::vector< Sum > printed_up_to_layer
BoundingBoxf3 box
bool assembly { false }
std::string name
int instance { -1 }

Detailed Description

Member Function Documentation

◆ add()

void Slic3r::GCodeProcessorResult::ObjectMass::add ( const Sum & sum,
const BoundingBoxf3 & extent,
size_t layer )
7600{
7601 box.merge(extent);
7602 if (printed_up_to_layer.size() <= layer)
7603 printed_up_to_layer.resize(layer + 1);
7604 printed_up_to_layer[layer].add(sum);
7605}
BoundingBoxf3 box
Definition GCodeProcessor.hpp:300
std::vector< Sum > printed_up_to_layer
Definition GCodeProcessor.hpp:299

References box, and printed_up_to_layer.

◆ total()

Sum Slic3r::GCodeProcessorResult::ObjectMass::total ( ) const
inline
307{ return printed_up_to_layer.empty() ? Sum{} : printed_up_to_layer.back(); }
Definition GCodeProcessor.hpp:283

References printed_up_to_layer.

Referenced by Slic3r::GUI::GLCanvas3D::CenterOfMass::render().

Here is the caller graph for this function:

Member Data Documentation

◆ assembly

bool Slic3r::GCodeProcessorResult::ObjectMass::assembly { false }

◆ box

BoundingBoxf3 Slic3r::GCodeProcessorResult::ObjectMass::box

◆ instance

int Slic3r::GCodeProcessorResult::ObjectMass::instance { -1 }
305{ -1 };

Referenced by Slic3r::set_mass_locator().

◆ name

std::string Slic3r::GCodeProcessorResult::ObjectMass::name

◆ printed_up_to_layer

std::vector<Sum> Slic3r::GCodeProcessorResult::ObjectMass::printed_up_to_layer

The documentation for this struct was generated from the following files: