Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::ModelMaterial Class Referencefinal

#include <src/libslic3r/Model.hpp>

+ Inheritance diagram for Slic3r::ModelMaterial:
+ Collaboration diagram for Slic3r::ModelMaterial:

Public Types

using Timestamp = uint64_t
 

Public Member Functions

Modelget_model () const
 
void apply (const t_model_material_attributes &attributes)
 
ObjectID id () const
 
virtual Timestamp timestamp () const
 

Public Attributes

t_model_material_attributes attributes
 
ModelConfigObject config
 

Protected Member Functions

void set_invalid_id ()
 
void copy_id (const ObjectBase &rhs)
 
virtual void assign_new_unique_ids_recursive ()
 

Private Member Functions

 ModelMaterial (Model *model)
 
 ModelMaterial (const ModelMaterial &rhs)=default
 
void set_model (Model *model)
 
void set_new_unique_id ()
 
 ModelMaterial ()
 
template<class Archive >
void serialize (Archive &ar)
 
 ModelMaterial (ModelMaterial &&rhs)=delete
 
ModelMaterialoperator= (const ModelMaterial &rhs)=delete
 
ModelMaterialoperator= (ModelMaterial &&rhs)=delete
 

Static Private Member Functions

static ObjectID generate_new_id ()
 
template<class Archive >
static void load_and_construct (Archive &ar, cereal::construct< ObjectBase > &construct)
 

Private Attributes

Modelm_model
 
ObjectID m_id
 

Static Private Attributes

static size_t s_last_id = 0
 

Friends

class Model
 
class cereal::access
 
class UndoRedo::StackImpl
 

Detailed Description

Member Typedef Documentation

◆ Timestamp

Constructor & Destructor Documentation

◆ ModelMaterial() [1/4]

Slic3r::ModelMaterial::ModelMaterial ( Model model)
inlineprivate
161: m_model(model) { assert(this->id().valid()); }
Model * m_model
Definition Model.hpp:156

◆ ModelMaterial() [2/4]

Slic3r::ModelMaterial::ModelMaterial ( const ModelMaterial rhs)
privatedefault

◆ ModelMaterial() [3/4]

Slic3r::ModelMaterial::ModelMaterial ( )
inlineprivate
171: ObjectBase(-1), config(-1) { assert(this->id().invalid()); assert(this->config.id().invalid()); }
ModelConfigObject config
Definition Model.hpp:148
ObjectBase()
Definition ObjectID.hpp:65
ObjectID id() const
Definition ObjectID.hpp:55
bool invalid() const
Definition ObjectID.hpp:35

References Slic3r::ObjectBase::id(), and Slic3r::ObjectID::invalid().

+ Here is the call graph for this function:

◆ ModelMaterial() [4/4]

Slic3r::ModelMaterial::ModelMaterial ( ModelMaterial &&  rhs)
privatedelete

Member Function Documentation

◆ apply()

void Slic3r::ModelMaterial::apply ( const t_model_material_attributes attributes)
inline
152 { this->attributes.insert(attributes.begin(), attributes.end()); }
t_model_material_attributes attributes
Definition Model.hpp:146

References attributes.

◆ assign_new_unique_ids_recursive()

virtual void Slic3r::ObjectBase::assign_new_unique_ids_recursive ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::Model, Slic3r::ModelObject, and Slic3r::ModelVolume.

79{ this->set_new_unique_id(); }
void set_new_unique_id()
Definition ObjectID.hpp:73

References Slic3r::ObjectBase::set_new_unique_id().

+ Here is the call graph for this function:

◆ copy_id()

void Slic3r::ObjectBase::copy_id ( const ObjectBase rhs)
inlineprotectedinherited
76{ m_id = rhs.id(); }
ObjectID m_id
Definition ObjectID.hpp:82
size_t id
Definition ObjectID.hpp:37

References Slic3r::ObjectBase::id(), and Slic3r::ObjectBase::m_id.

Referenced by Slic3r::CutObjectBase::copy().

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

◆ generate_new_id()

static ObjectID Slic3r::ObjectBase::generate_new_id ( )
inlinestaticprivateinherited
84{ return ObjectID(++ s_last_id); }
static size_t s_last_id
Definition ObjectID.hpp:85

References Slic3r::ObjectBase::s_last_id.

Referenced by Slic3r::ObjectBase::set_new_unique_id().

+ Here is the caller graph for this function:

◆ get_model()

Model * Slic3r::ModelMaterial::get_model ( ) const
inline
150{ return m_model; }

References m_model.

Referenced by Slic3r::ModelVolume::material(), and Slic3r::ModelVolume::set_material().

+ Here is the caller graph for this function:

◆ id()

ObjectID Slic3r::ObjectBase::id ( ) const
inlineinherited
55{ return m_id; }

References Slic3r::ObjectBase::m_id.

Referenced by Slic3r::Model::Model(), Slic3r::ModelInstance::ModelInstance(), ModelMaterial(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelObject::ModelObject(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::_3MF_Importer::_load_model_from_file(), Slic3r::GUI::Plater::priv::actualize_slicing_warnings(), Slic3r::ModelObjectStatusDB::add(), Slic3r::ModelObjectStatusDB::add_if_new(), Slic3r::Print::apply(), Slic3r::SLAPrint::apply(), Slic3r::GUI::GLGizmoFdmSupports::apply_data_from_backend(), Slic3r::ModelVolume::check(), Slic3r::check_model_ids_equal(), Slic3r::ModelObject::convert_units(), Slic3r::ObjectBase::copy_id(), Slic3r::PrintObjectStatusDB::count(), anonymous_namespace{RaycastManager.cpp}::create_key(), priv::create_volume(), Slic3r::GUI::Emboss::create_volume_sources(), Slic3r::GUI::GLGizmoHollow::data_changed(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GUI::GLGizmoSlaSupports::data_changed(), Slic3r::Model::delete_object(), Slic3r::GUI::Plater::export_stl_obj(), Slic3r::ModelObjectStatusDB::get(), Slic3r::GUI::get_arrange_poly(), Slic3r::GUI::GLGizmoSlaSupports::get_data_from_backend(), Slic3r::PrintObjectStatusDB::get_range(), Slic3r::GUI::GLGizmoFdmSupports::has_backend_supports(), Slic3r::GUI::GLGizmoSlaSupports::has_backend_supports(), Slic3r::CutObjectBase::has_same_id(), Slic3r::UndoRedo::StackImpl::immutable_object_id_impl(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::inner_brim_area(), Slic3r::ModelObject::is_cut(), Slic3r::CutObjectBase::is_equal(), Slic3r::ObjectBase::load_and_construct(), Slic3r::UndoRedo::StackImpl::load_snapshot(), Slic3r::GUI::ObjectList::merge(), Slic3r::model_property_changed(), Slic3r::model_volume_list_changed(), Slic3r::model_volume_list_copy_configs(), Slic3r::ModelConfigObject::object_id_and_timestamp_match(), Slic3r::ObjectWithTimestamp::object_id_and_timestamp_match(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::CommonGizmosDataObjects::SelectionInfo::on_update(), Slic3r::CutObjectBase::operator<(), Slic3r::Model::operator=(), Slic3r::ModelObject::operator=(), Slic3r::ModelObject::operator=(), Slic3r::CutObjectBase::operator==(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::GLGizmoEmboss::process(), Slic3r::GUI::processed_objects_idxs(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::LayersEditing::select_object(), serialize(), Slic3r::SLAPrintObject::SliceRecord::set_model_slice_idx(), Slic3r::SLAPrintObject::SliceRecord::set_support_slice_idx(), Slic3r::slices_to_regions(), Slic3r::ModelObject::split(), Slic3r::UndoRedo::StackImpl::take_snapshot(), Slic3r::top_level_outer_brim_area(), Slic3r::GUI::update_object_cut_id(), and anonymous_namespace{EmbossJob.cpp}::update_volume_name().

◆ load_and_construct()

template<class Archive >
static void Slic3r::ObjectBase::load_and_construct ( Archive &  ar,
cereal::construct< ObjectBase > &  construct 
)
inlinestaticprivateinherited
96{ ObjectID id; ar(id); construct(id); }

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ operator=() [1/2]

ModelMaterial & Slic3r::ModelMaterial::operator= ( const ModelMaterial rhs)
privatedelete

◆ operator=() [2/2]

ModelMaterial & Slic3r::ModelMaterial::operator= ( ModelMaterial &&  rhs)
privatedelete

◆ serialize()

template<class Archive >
void Slic3r::ModelMaterial::serialize ( Archive &  ar)
inlineprivate
172 {
173 assert(this->id().invalid()); assert(this->config.id().invalid());
174 Internal::StaticSerializationWrapper<ModelConfigObject> config_wrapper(config);
175 ar(attributes, config_wrapper);
176 // assert(this->id().valid()); assert(this->config.id().valid());
177 }

References attributes, config, Slic3r::ObjectBase::id(), and Slic3r::ObjectID::invalid().

+ Here is the call graph for this function:

◆ set_invalid_id()

void Slic3r::ObjectBase::set_invalid_id ( )
inlineprotectedinherited
74{ m_id = 0; }

References Slic3r::ObjectBase::m_id.

Referenced by Slic3r::CutObjectBase::invalidate().

+ Here is the caller graph for this function:

◆ set_model()

void Slic3r::ModelMaterial::set_model ( Model model)
inlineprivate
164{ m_model = model; }

References m_model.

Referenced by Slic3r::Model::add_material().

+ Here is the caller graph for this function:

◆ set_new_unique_id()

void Slic3r::ModelMaterial::set_new_unique_id ( )
inlineprivate

References Slic3r::ObjectBase::set_new_unique_id().

+ Here is the call graph for this function:

◆ timestamp()

virtual Timestamp Slic3r::ObjectBase::timestamp ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::ModelConfigObject, and Slic3r::ObjectWithTimestamp.

60{ return 0; }

Referenced by Slic3r::GUI::Plater::priv::undo_redo_to().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ cereal::access

friend class cereal::access
friend

◆ Model

friend class Model
friend

◆ UndoRedo::StackImpl

friend class UndoRedo::StackImpl
friend

Member Data Documentation

◆ attributes

t_model_material_attributes Slic3r::ModelMaterial::attributes

◆ config

ModelConfigObject Slic3r::ModelMaterial::config

◆ m_id

◆ m_model

Model* Slic3r::ModelMaterial::m_model
private

Referenced by get_model(), and set_model().

◆ s_last_id

size_t Slic3r::ObjectBase::s_last_id = 0
staticprivateinherited

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