OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage Struct Reference

Public Member Functions

void add (const Usage &other)
json to_json () const

Public Attributes

double time { 0. }
double volume { 0. }
double weight { 0. }

Detailed Description

Member Function Documentation

◆ add()

void Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage::add ( const Usage & other)
inline
50 {
51 time += other.time;
52 volume += other.volume;
53 weight += other.weight;
54 }
double volume
Definition GCodeStatistics.cpp:46
double time
Definition GCodeStatistics.cpp:45
double weight
Definition GCodeStatistics.cpp:47

References time, volume, and weight.

◆ to_json()

json Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage::to_json ( ) const
inline
56{ return json{ { "time", rounded(time, 3) }, { "volume", rounded(volume, 3) }, { "weight", rounded(weight, 4) } }; }
double rounded(double value, int decimals)
Definition GCodeStatistics.cpp:29
nlohmann::ordered_json json
Definition GCodeStatistics.cpp:27

References Slic3r::anonymous_namespace{GCodeStatistics.cpp}::rounded(), time, volume, and weight.

Here is the call graph for this function:

Member Data Documentation

◆ time

double Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage::time { 0. }
45{ 0. };

Referenced by add(), and to_json().

◆ volume

double Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage::volume { 0. }
46{ 0. };

Referenced by add(), and to_json().

◆ weight

double Slic3r::anonymous_namespace{GCodeStatistics.cpp}::Usage::weight { 0. }
47{ 0. };

Referenced by add(), and to_json().


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