OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::MultiNozzleUtils::NozzleGroupInfo Struct Reference

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

Collaboration diagram for Slic3r::MultiNozzleUtils::NozzleGroupInfo:

Public Member Functions

 NozzleGroupInfo ()=default
 NozzleGroupInfo (const std::string &nozzle_diameter_, const NozzleVolumeType volume_type_, const int extruder_id_, const int nozzle_count_)
bool operator< (const NozzleGroupInfo &rhs) const
bool is_same_type (const NozzleGroupInfo &rhs) const
bool operator== (const NozzleGroupInfo &rhs) const
std::string serialize () const

Static Public Member Functions

static std::optional< NozzleGroupInfo > deserialize (const std::string &str)

Public Attributes

std::string diameter
NozzleVolumeType volume_type
int extruder_id
int nozzle_count

Detailed Description

Constructor & Destructor Documentation

◆ NozzleGroupInfo() [1/2]

Slic3r::MultiNozzleUtils::NozzleGroupInfo::NozzleGroupInfo ( )
default

Referenced by deserialize(), is_same_type(), operator<(), and operator==().

Here is the caller graph for this function:

◆ NozzleGroupInfo() [2/2]

Slic3r::MultiNozzleUtils::NozzleGroupInfo::NozzleGroupInfo ( const std::string & nozzle_diameter_,
const NozzleVolumeType volume_type_,
const int extruder_id_,
const int nozzle_count_ )
inline
58 : diameter(nozzle_diameter_), volume_type(volume_type_), extruder_id(extruder_id_), nozzle_count(nozzle_count_)
59 {}
int extruder_id
Definition MultiNozzleUtils.hpp:52
std::string diameter
Definition MultiNozzleUtils.hpp:50
int nozzle_count
Definition MultiNozzleUtils.hpp:53
NozzleVolumeType volume_type
Definition MultiNozzleUtils.hpp:51

References diameter, extruder_id, nozzle_count, and volume_type.

Member Function Documentation

◆ deserialize()

std::optional< NozzleGroupInfo > Slic3r::MultiNozzleUtils::NozzleGroupInfo::deserialize ( const std::string & str)
static
879{
880 std::istringstream iss(str);
881 std::string token;
882 std::vector<std::string> tokens;
883
884 while (std::getline(iss, token, '-')) { tokens.push_back(token); }
885
886 if (tokens.size() != 4) { return std::nullopt; }
887
888 try {
889 int extruder_id = std::stoi(tokens[0]);
890 std::string diameter = tokens[1];
892 int nozzle_count = std::stoi(tokens[3]);
893
895 } catch (const std::exception &) {
896 return std::nullopt;
897 }
898}
static const t_config_enum_values & get_enum_values()
NozzleVolumeType
Definition PrintConfig.hpp:618

References NozzleGroupInfo(), diameter, extruder_id, Slic3r::ConfigOptionEnum< T >::get_enum_values(), nozzle_count, and volume_type.

Here is the call graph for this function:

◆ is_same_type()

bool Slic3r::MultiNozzleUtils::NozzleGroupInfo::is_same_type ( const NozzleGroupInfo & rhs) const
inline
70 {
71 return diameter == rhs.diameter && volume_type == rhs.volume_type && extruder_id == rhs.extruder_id;
72 }

References NozzleGroupInfo(), diameter, extruder_id, and volume_type.

Here is the call graph for this function:

◆ operator<()

bool Slic3r::MultiNozzleUtils::NozzleGroupInfo::operator< ( const NozzleGroupInfo & rhs) const
inline
62 {
63 if (extruder_id != rhs.extruder_id) return extruder_id < rhs.extruder_id;
64 if (diameter != rhs.diameter) return diameter < rhs.diameter;
65 if (volume_type != rhs.volume_type) return volume_type < rhs.volume_type;
66 return nozzle_count < rhs.nozzle_count;
67 }

References NozzleGroupInfo(), diameter, extruder_id, nozzle_count, and volume_type.

Here is the call graph for this function:

◆ operator==()

bool Slic3r::MultiNozzleUtils::NozzleGroupInfo::operator== ( const NozzleGroupInfo & rhs) const
inline
75 {
76 return diameter == rhs.diameter && volume_type == rhs.volume_type && extruder_id == rhs.extruder_id && nozzle_count == rhs.nozzle_count;
77 }

References NozzleGroupInfo(), diameter, extruder_id, nozzle_count, and volume_type.

Here is the call graph for this function:

◆ serialize()

std::string Slic3r::MultiNozzleUtils::NozzleGroupInfo::serialize ( ) const
869{
870 std::ostringstream oss;
871 oss << extruder_id << "-"
872 << std::setprecision(2) << diameter << "-"
874 << nozzle_count;
875 return oss.str();
876}
std::string get_nozzle_volume_type_string(NozzleVolumeType nozzle_volume_type)
Definition PrintConfig.cpp:860

References diameter, extruder_id, Slic3r::get_nozzle_volume_type_string(), nozzle_count, and volume_type.

Here is the call graph for this function:

Member Data Documentation

◆ diameter

◆ extruder_id

◆ nozzle_count

◆ volume_type


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