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

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

Collaboration diagram for Slic3r::SLAPrintStatistics:

Public Member Functions

 SLAPrintStatistics ()
DynamicConfig config () const
std::string finalize_output_path (const std::string &path_in) const
void clear ()

Static Public Member Functions

static DynamicConfig placeholders ()

Public Attributes

double estimated_print_time
double objects_used_material
double support_used_material
size_t slow_layers_count
size_t fast_layers_count
double total_cost
double total_weight
std::vector< double > layers_times

Detailed Description

Constructor & Destructor Documentation

◆ SLAPrintStatistics()

Slic3r::SLAPrintStatistics::SLAPrintStatistics ( )
inline
382{ clear(); }
void clear()
Definition SLAPrint.hpp:399

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Slic3r::SLAPrintStatistics::clear ( )
inline
399 {
405 total_cost = 0.;
406 total_weight = 0.;
407 layers_times.clear();
408 }
double total_cost
Definition SLAPrint.hpp:388
double total_weight
Definition SLAPrint.hpp:389
double support_used_material
Definition SLAPrint.hpp:385
size_t slow_layers_count
Definition SLAPrint.hpp:386
std::vector< double > layers_times
Definition SLAPrint.hpp:390
double estimated_print_time
Definition SLAPrint.hpp:383
size_t fast_layers_count
Definition SLAPrint.hpp:387
double objects_used_material
Definition SLAPrint.hpp:384

References estimated_print_time, fast_layers_count, layers_times, objects_used_material, slow_layers_count, support_used_material, total_cost, and total_weight.

Referenced by SLAPrintStatistics().

Here is the caller graph for this function:

◆ config()

DynamicConfig Slic3r::SLAPrintStatistics::config ( ) const
1236{
1237 DynamicConfig config;
1238 const std::string print_time = Slic3r::short_time(get_time_dhms(float(this->estimated_print_time)));
1239 config.set_key_value("print_time", new ConfigOptionString(print_time));
1240 config.set_key_value("objects_used_material", new ConfigOptionFloat(this->objects_used_material));
1241 config.set_key_value("support_used_material", new ConfigOptionFloat(this->support_used_material));
1242 config.set_key_value("total_cost", new ConfigOptionFloat(this->total_cost));
1243 config.set_key_value("total_weight", new ConfigOptionFloat(this->total_weight));
1244 return config;
1245}
zaa_minimize_perimeter_height ConfigOptionFloat
Definition PrintConfig.hpp:1954
std::string short_time(const std::string &time)
Definition Utils.hpp:563
std::string get_time_dhms(float time_in_secs)
Definition Utils.hpp:609
zaa_minimize_perimeter_height ConfigOptionString
Definition PrintConfig.hpp:1702
DynamicConfig config() const
Definition SLAPrint.cpp:1235

References config(), Slic3r::ConfigOptionFloat, Slic3r::ConfigOptionString, estimated_print_time, Slic3r::get_time_dhms(), objects_used_material, Slic3r::short_time(), support_used_material, total_cost, and total_weight.

Referenced by config(), Slic3r::SLAPrint::output_filename(), and placeholders().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalize_output_path()

std::string Slic3r::SLAPrintStatistics::finalize_output_path ( const std::string & path_in) const
1259{
1260 std::string final_path;
1261 try {
1262 boost::filesystem::path path(path_in);
1263 DynamicConfig cfg = this->config();
1264 PlaceholderParser pp;
1265 std::string new_stem = pp.process(path.stem().string(), 0, &cfg);
1266 final_path = (path.parent_path() / (new_stem + path.extension().string())).string();
1267 }
1268 catch (const std::exception &ex) {
1269 BOOST_LOG_TRIVIAL(error) << "Failed to apply the print statistics to the export file name: " << ex.what();
1270 final_path = path_in;
1271 }
1272 return final_path;
1273}

References Slic3r::SLAPrintObject::config(), and Slic3r::PlaceholderParser::process().

Here is the call graph for this function:

◆ placeholders()

DynamicConfig Slic3r::SLAPrintStatistics::placeholders ( )
static
1248{
1249 DynamicConfig config;
1250 for (const char *key : {
1251 "print_time", "total_cost", "total_weight",
1252 "objects_used_material", "support_used_material" })
1253 config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}"));
1254
1255 return config;
1256}

References config().

Referenced by Slic3r::SLAPrint::output_filename().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ estimated_print_time

double Slic3r::SLAPrintStatistics::estimated_print_time

◆ fast_layers_count

size_t Slic3r::SLAPrintStatistics::fast_layers_count

◆ layers_times

std::vector<double> Slic3r::SLAPrintStatistics::layers_times

Referenced by clear().

◆ objects_used_material

double Slic3r::SLAPrintStatistics::objects_used_material

◆ slow_layers_count

size_t Slic3r::SLAPrintStatistics::slow_layers_count

◆ support_used_material

double Slic3r::SLAPrintStatistics::support_used_material

◆ total_cost

double Slic3r::SLAPrintStatistics::total_cost

Referenced by clear(), and config().

◆ total_weight

double Slic3r::SLAPrintStatistics::total_weight

Referenced by clear(), and config().


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