OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::FacetsAnnotation Class Referencefinal

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

Inheritance diagram for Slic3r::FacetsAnnotation:
Collaboration diagram for Slic3r::FacetsAnnotation:

Public Types

using Timestamp = uint64_t

Public Member Functions

void assign (const FacetsAnnotation &rhs)
void assign (FacetsAnnotation &&rhs)
const TriangleSelector::TriangleSplittingData & get_data () const noexcept
void set_data (TriangleSelector::TriangleSplittingData &&data)
bool set (const TriangleSelector &selector)
indexed_triangle_set get_facets (const ModelVolume &mv, EnforcerBlockerType type) const
void get_facets (const ModelVolume &mv, std::vector< indexed_triangle_set > &facets_per_type) const
void set_enforcer_block_type_limit (const ModelVolume &mv, EnforcerBlockerType max_type, EnforcerBlockerType to_delete_filament=EnforcerBlockerType::NONE, EnforcerBlockerType replace_filament=EnforcerBlockerType::NONE)
void shift_states_above (const ModelVolume &mv, EnforcerBlockerType threshold, int delta)
void remap_states (const ModelVolume &mv, const EnforcerBlockerStateMap &state_map)
indexed_triangle_set get_facets_strict (const ModelVolume &mv, EnforcerBlockerType type) const
bool has_facets (const ModelVolume &mv, EnforcerBlockerType type) const
bool empty () const
void reset ()
std::string get_triangle_as_string (int i) const
void reserve (int n_triangles)
void set_triangle_from_string (int triangle_id, const std::string &str)
void shrink_to_fit ()
bool equals (const FacetsAnnotation &other) const
Timestamp timestamp () const override throw ()
bool timestamp_matches (const ObjectWithTimestamp &rhs) const throw ()
bool object_id_and_timestamp_match (const ObjectWithTimestamp &rhs) const throw ()
void touch ()
ObjectID id () const

Protected Member Functions

void copy_timestamp (const ObjectWithTimestamp &rhs)
void set_new_unique_id ()
void set_invalid_id ()
void copy_id (const ObjectBase &rhs)
virtual void assign_new_unique_ids_recursive ()

Private Member Functions

 FacetsAnnotation ()=default
 FacetsAnnotation (int)
 FacetsAnnotation (const FacetsAnnotation &rhs)=default
 FacetsAnnotation (FacetsAnnotation &&rhs)=default
FacetsAnnotation & operator= (const FacetsAnnotation &rhs)=default
FacetsAnnotation & operator= (FacetsAnnotation &&rhs)=default
template<class Archive>
void serialize (Archive &ar)

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

TriangleSelector::TriangleSplittingData m_data
Timestamp m_timestamp { 1 }
ObjectID m_id

Static Private Attributes

static Timestamp s_last_timestamp = 1
static size_t s_last_id = 0

Friends

class cereal::access
class UndoRedo::StackImpl
class ModelVolume

Detailed Description

Member Typedef Documentation

◆ Timestamp

using Slic3r::ObjectBase::Timestamp = uint64_t
inherited

Constructor & Destructor Documentation

◆ FacetsAnnotation() [1/4]

Slic3r::FacetsAnnotation::FacetsAnnotation ( )
explicitprivatedefault

Referenced by FacetsAnnotation(), FacetsAnnotation(), assign(), assign(), equals(), operator=(), and operator=().

Here is the caller graph for this function:

◆ FacetsAnnotation() [2/4]

Slic3r::FacetsAnnotation::FacetsAnnotation ( int )
inlineexplicitprivate

References Slic3r::ObjectWithTimestamp::ObjectWithTimestamp().

Here is the call graph for this function:

◆ FacetsAnnotation() [3/4]

Slic3r::FacetsAnnotation::FacetsAnnotation ( const FacetsAnnotation & rhs)
explicitprivatedefault

References FacetsAnnotation().

Here is the call graph for this function:

◆ FacetsAnnotation() [4/4]

Slic3r::FacetsAnnotation::FacetsAnnotation ( FacetsAnnotation && rhs)
explicitprivatedefault

References FacetsAnnotation().

Here is the call graph for this function:

Member Function Documentation

◆ assign() [1/2]

void Slic3r::FacetsAnnotation::assign ( const FacetsAnnotation & rhs)
inline
761{ if (! this->timestamp_matches(rhs)) { m_data = rhs.m_data; this->copy_timestamp(rhs); } }
TriangleSelector::TriangleSplittingData m_data
Definition Model.hpp:823
bool timestamp_matches(const ObjectWithTimestamp &rhs) const
Definition ObjectID.hpp:133
void copy_timestamp(const ObjectWithTimestamp &rhs)
Definition ObjectID.hpp:125

References FacetsAnnotation(), Slic3r::ObjectWithTimestamp::copy_timestamp(), m_data, and Slic3r::ObjectWithTimestamp::timestamp_matches().

Referenced by Slic3r::ModelObject::convert_units(), Slic3r::model_volume_list_copy_configs(), and Slic3r::GUI::Plater::priv::replace_volume_with_stl().

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

◆ assign() [2/2]

void Slic3r::FacetsAnnotation::assign ( FacetsAnnotation && rhs)
inline
762{ if (! this->timestamp_matches(rhs)) { m_data = std::move(rhs.m_data); this->copy_timestamp(rhs); } }

References FacetsAnnotation(), Slic3r::ObjectWithTimestamp::copy_timestamp(), m_data, and Slic3r::ObjectWithTimestamp::timestamp_matches().

Here is the call graph for this function:

◆ assign_new_unique_ids_recursive()

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

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

95{ this->set_new_unique_id(); }
void set_new_unique_id()
Definition ObjectID.hpp:89

References set_new_unique_id().

Here is the call graph for this function:

◆ copy_id()

void Slic3r::ObjectBase::copy_id ( const ObjectBase & rhs)
inlineprotectedinherited
92{ m_id = rhs.id(); }
ObjectID m_id
Definition ObjectID.hpp:98

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

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

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

◆ copy_timestamp()

void Slic3r::ObjectWithTimestamp::copy_timestamp ( const ObjectWithTimestamp & rhs)
inlineprotectedinherited
125{ m_timestamp = rhs.m_timestamp; }
Timestamp m_timestamp
Definition ObjectID.hpp:139

References ObjectWithTimestamp(), and m_timestamp.

Referenced by Slic3r::FacetsAnnotation::assign(), Slic3r::FacetsAnnotation::assign(), Slic3r::LayerHeightProfile::assign(), and Slic3r::LayerHeightProfile::assign().

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

◆ empty()

◆ equals()

bool Slic3r::FacetsAnnotation::equals ( const FacetsAnnotation & other) const
4168{
4169 const auto& data = other.get_data();
4170 return (m_data == data);
4171}

References FacetsAnnotation(), equals(), get_data(), and m_data.

Referenced by Slic3r::_BBS_3MF_Exporter::_add_model_file_to_archive(), equals(), and Slic3r::Print::process().

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

◆ generate_new_id()

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

References s_last_id.

Referenced by ObjectBase(), and set_new_unique_id().

Here is the caller graph for this function:

◆ get_data()

◆ get_facets() [1/2]

indexed_triangle_set Slic3r::FacetsAnnotation::get_facets ( const ModelVolume & mv,
EnforcerBlockerType type ) const
4035{
4036 TriangleSelector selector(mv.mesh());
4037 // Reset of TriangleSelector is done inside TriangleSelector's constructor, so we don't need it to perform it again in deserialize().
4038 selector.deserialize(m_data, false);
4039 return selector.get_facets(type);
4040}

References Slic3r::TriangleSelector::deserialize(), get_facets(), Slic3r::TriangleSelector::get_facets(), m_data, Slic3r::ModelVolume::mesh(), and ModelVolume.

Referenced by get_facets(), get_facets(), Slic3r::segmentation_by_painting(), and Slic3r::GLVolume::simple_render().

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

◆ get_facets() [2/2]

void Slic3r::FacetsAnnotation::get_facets ( const ModelVolume & mv,
std::vector< indexed_triangle_set > & facets_per_type ) const
4044{
4045 TriangleSelector selector(mv.mesh());
4046 selector.deserialize(m_data, false);
4047 selector.get_facets(facets_per_type);
4048}

References Slic3r::TriangleSelector::deserialize(), get_facets(), Slic3r::TriangleSelector::get_facets(), m_data, Slic3r::ModelVolume::mesh(), and ModelVolume.

Here is the call graph for this function:

◆ get_facets_strict()

indexed_triangle_set Slic3r::FacetsAnnotation::get_facets_strict ( const ModelVolume & mv,
EnforcerBlockerType type ) const
4079{
4080 TriangleSelector selector(mv.mesh());
4081 // Reset of TriangleSelector is done inside TriangleSelector's constructor, so we don't need it to perform it again in deserialize().
4082 selector.deserialize(m_data, false);
4083 return selector.get_facets_strict(type);
4084}

References Slic3r::TriangleSelector::deserialize(), get_facets_strict(), Slic3r::TriangleSelector::get_facets_strict(), m_data, Slic3r::ModelVolume::mesh(), and ModelVolume.

Referenced by get_facets_strict(), and Slic3r::PaintCLI::anonymous_namespace{PaintCLI.cpp}::inspect_layer().

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

◆ get_triangle_as_string()

std::string Slic3r::FacetsAnnotation::get_triangle_as_string ( int i) const
4113{
4114 std::string out;
4115
4116 auto triangle_it = std::lower_bound(m_data.triangles_to_split.begin(), m_data.triangles_to_split.end(), triangle_idx, [](const TriangleSelector::TriangleBitStreamMapping &l, const int r) { return l.triangle_idx < r; });
4117 if (triangle_it != m_data.triangles_to_split.end() && triangle_it->triangle_idx == triangle_idx) {
4118 int offset = triangle_it->bitstream_start_idx;
4119 int end = ++ triangle_it == m_data.triangles_to_split.end() ? int(m_data.bitstream.size()) : triangle_it->bitstream_start_idx;
4120 while (offset < end) {
4121 int next_code = 0;
4122 for (int i=3; i>=0; --i) {
4123 next_code = next_code << 1;
4124 next_code |= int(m_data.bitstream[offset + i]);
4125 }
4126 offset += 4;
4127
4128 assert(next_code >=0 && next_code <= 15);
4129 char digit = next_code < 10 ? next_code + '0' : (next_code-10)+'A';
4130 out.insert(out.begin(), digit);
4131 }
4132 }
4133 return out;
4134}
T * end(Slic3r::Mat< N, M, T > &mat)
Definition Point.hpp:841
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582

References get_triangle_as_string(), m_data, and Slic3r::offset().

Referenced by Slic3r::_BBS_3MF_Exporter::_add_mesh_to_object_stream(), and get_triangle_as_string().

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

◆ has_facets()

bool Slic3r::FacetsAnnotation::has_facets ( const ModelVolume & mv,
EnforcerBlockerType type ) const
4087{
4089}
bool has_facets(EnforcerBlockerType state) const
Definition TriangleSelector.cpp:1475

References has_facets(), Slic3r::TriangleSelector::has_facets(), m_data, and ModelVolume.

Referenced by has_facets(), and Slic3r::PaintCLI::anonymous_namespace{PaintCLI.cpp}::inspect_layer().

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

◆ id()

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

References m_id.

Referenced by Slic3r::CutObjectBase::CutObjectBase(), Slic3r::Model::Model(), Slic3r::ModelInstance::ModelInstance(), Slic3r::ModelMaterial::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::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), Slic3r::ModelVolume::ModelVolume(), ObjectBase(), Slic3r::PrintBase::SlicingStatus::SlicingStatus(), Slic3r::PrintBase::SlicingStatus::SlicingStatus(), Slic3r::_BBS_3MF_Exporter::_add_cut_information_file_to_archive(), Slic3r::_BBS_3MF_Exporter::_add_model_config_file_to_archive(), Slic3r::_BBS_3MF_Exporter::_add_slice_info_config_file_to_archive(), Slic3r::GUI::Plater::priv::actualize_slicing_warnings(), Slic3r::ModelObjectStatusDB::add(), Slic3r::ModelObjectStatusDB::add_if_new(), Slic3r::Model::add_object(), Slic3r::append_and_translate(), Slic3r::SLAPrint::apply(), Slic3r::GUI::calc_distance(), Slic3r::GUI::calc_surface_offset(), Slic3r::check_model_ids_equal(), Slic3r::check_model_ids_validity(), Slic3r::GUI::GLGizmoTextureDisplacement::close_image_adjust(), Slic3r::Model::collect_reusable_objects(), Slic3r::ModelObject::convert_units(), copy_id(), Slic3r::PrintObjectStatusDB::count(), anonymous_namespace{RaycastManager.cpp}::create_key(), Slic3r::GUI::create_meshes(), anonymous_namespace{EmbossJob.cpp}::create_volume(), Slic3r::GUI::Emboss::create_volume_sources(), Slic3r::GUI::GLGizmoPainterBase::data_changed(), Slic3r::GCode::do_export(), Slic3r::GUI::PartPlate::duplicate_all_instance(), Slic3r::GUI::PartPlateList::duplicate_plate(), Slic3r::GUI::PartPlate::estimate_wipe_tower_footprint(), Slic3r::Print::export_cached_data(), Slic3r::GUI::Plater::export_stl(), Slic3r::find_volume_extents(), Slic3r::PreciseSeam::detail::fragment_location(), Slic3r::GUI::Plater::priv::generate_first_layer_bbox(), Slic3r::ModelObjectStatusDB::get(), Slic3r::Model::get_backup_path(), Slic3r::GUI::GLCanvas3D::get_empty_cells(), Slic3r::ModelInstance::get_labeled_id(), Slic3r::GUI::get_model_volume(), Slic3r::PrintObjectStatusDB::get_range(), Slic3r::GUI::get_selected_volume(), Slic3r::GUI::get_volume(), Slic3r::CutObjectBase::has_same_id(), Slic3r::UndoRedo::StackImpl::immutable_object_id_impl(), Slic3r::GUI::GLGizmoFdmSupports::init_print_instance(), Slic3r::CutObjectBase::is_equal(), Slic3r::GUI::GLGizmoSVG::is_svg_object(), Slic3r::ModelVolume::is_the_only_one_part(), Slic3r::GUI::IMSlider::IsNewPrint(), Slic3r::ModelObject::load(), load_and_construct(), Slic3r::Print::load_cached_data(), Slic3r::GLVolumeCollection::load_object_auxiliary(), Slic3r::GLVolumeCollection::load_object_volume(), Slic3r::GUI::GCodeViewer::load_shells(), Slic3r::UndoRedo::StackImpl::load_snapshot(), Slic3r::GUI::GLCanvas3D::CenterOfMass::model_markers(), 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::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::open_image_adjust(), Slic3r::CutObjectBase::operator<(), Slic3r::Model::operator=(), Slic3r::ModelObject::operator=(), Slic3r::ModelObject::operator=(), Slic3r::CutObjectBase::operator==(), Slic3r::outer_inner_brim_area(), Slic3r::GUI::GLGizmoTextureDisplacement::painted_area_mm2(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), anonymous_namespace{GLGizmoEmboss.cpp}::prepare_volumes_to_slice(), Slic3r::GUI::GLGizmoTextureDisplacement::preview_part(), Slic3r::GCode::process_layer(), Slic3r::GUI::NotificationManager::push_slicing_warning_notification(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_preview_job(), Slic3r::GUI::queue_texture_displacement_debug(), Slic3r::GUI::GLGizmoEmboss::re_emboss(), Slic3r::GUI::GLGizmoTextureDisplacement::rebuild_other_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::rebuild_painted_colors(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::_BBS_Backup_Manager::remove_backup(), Slic3r::Model::remove_backup_path_if_exist(), Slic3r::GUI::GLGizmoTextureDisplacement::render_image_adjust_window(), Slic3r::CLI::run(), Slic3r::GUI::GLCanvas3D::LayersEditing::select_object(), Slic3r::ModelMaterial::serialize(), Slic3r::Model::set_backup_path(), Slic3r::GUI::GLGizmoBrimEars::set_brim_data(), Slic3r::GUI::PartPlate::set_hover_id(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), Slic3r::sla_instances(), Slic3r::slices_to_regions(), Slic3r::ModelObject::split(), anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job(), anonymous_namespace{SurfaceDrag.cpp}::start_dragging(), Slic3r::GUI::Emboss::start_update_volume(), Slic3r::UndoRedo::StackImpl::take_snapshot(), Slic3r::GUI::texture_displacement_bake_volume(), Slic3r::GUI::GLGizmoPainterBase::update_contours(), anonymous_namespace{EmbossJob.cpp}::update_name_in_list(), Slic3r::GUI::ObjectList::update_name_in_model(), Slic3r::GUI::update_object_cut_id(), Slic3r::GUI::GLGizmoTextureDisplacement::v2_recommendation(), Slic3r::verify_update_print_object_regions(), wipe_tower_instance_id, and wipe_tower_object_id.

◆ load_and_construct()

template<class Archive>
void Slic3r::ObjectBase::load_and_construct ( Archive & ar,
cereal::construct< ObjectBase > & construct )
inlinestaticprivateinherited
109{ ObjectID id; ar(id); construct(id); }
ObjectID id() const
Definition ObjectID.hpp:69

References id().

Here is the call graph for this function:

◆ object_id_and_timestamp_match()

bool Slic3r::ObjectWithTimestamp::object_id_and_timestamp_match ( const ObjectWithTimestamp & rhs) const
throw ( )
inlineinherited
134{ return this->id() == rhs.id() && m_timestamp == rhs.m_timestamp; }
size_t id
Definition ObjectID.hpp:39

References ObjectWithTimestamp(), Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, and m_timestamp.

Here is the call graph for this function:

◆ operator=() [1/2]

FacetsAnnotation & Slic3r::FacetsAnnotation::operator= ( const FacetsAnnotation & rhs)
privatedefault

References FacetsAnnotation().

Here is the call graph for this function:

◆ operator=() [2/2]

FacetsAnnotation & Slic3r::FacetsAnnotation::operator= ( FacetsAnnotation && rhs)
privatedefault

References FacetsAnnotation().

Here is the call graph for this function:

◆ remap_states()

void Slic3r::FacetsAnnotation::remap_states ( const ModelVolume & mv,
const EnforcerBlockerStateMap & state_map )
4060{
4061 if (empty()) return;
4062 TriangleSelector selector(mv.mesh());
4063 selector.deserialize(m_data, false);
4064 selector.remap_triangle_state(state_map);
4065 this->set(selector);
4066}
bool empty() const
Definition Model.hpp:782
bool set(const TriangleSelector &selector)
Definition Model.cpp:4091

References Slic3r::TriangleSelector::deserialize(), empty(), m_data, Slic3r::ModelVolume::mesh(), ModelVolume, remap_states(), Slic3r::TriangleSelector::remap_triangle_state(), and set().

Referenced by Slic3r::remap_model_filament_slots(), and remap_states().

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

◆ reserve()

void Slic3r::FacetsAnnotation::reserve ( int n_triangles)
inline
792{ m_data.triangles_to_split.reserve(n_triangles); }

References m_data.

Referenced by Slic3r::_3MF_Importer::_generate_volumes(), and Slic3r::_BBS_3MF_Importer::_generate_volumes_new().

Here is the caller graph for this function:

◆ reset()

void Slic3r::FacetsAnnotation::reset ( )
4103{
4104 m_data.triangles_to_split.clear();
4105 m_data.bitstream.clear();
4106 this->touch();
4107}
void touch()
Definition ObjectID.hpp:135

References m_data, reset(), and Slic3r::ObjectWithTimestamp::touch().

Referenced by Slic3r::apply_painted_mesh_to_volume(), Slic3r::GUI::Plater::clear_before_change_mesh(), and reset().

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

◆ serialize()

template<class Archive>
void Slic3r::FacetsAnnotation::serialize ( Archive & ar)
inlineprivate
819 {
820 ar(cereal::base_class<ObjectWithTimestamp>(this), m_data);
821 }

References m_data.

◆ set()

bool Slic3r::FacetsAnnotation::set ( const TriangleSelector & selector)
4092{
4093 TriangleSelector::TriangleSplittingData sel_map = selector.serialize();
4094 if (sel_map != m_data) {
4095 m_data = std::move(sel_map);
4096 this->touch();
4097 return true;
4098 }
4099 return false;
4100}

References m_data, Slic3r::TriangleSelector::serialize(), set(), and Slic3r::ObjectWithTimestamp::touch().

Referenced by Slic3r::apply_painted_mesh_to_volume(), remap_states(), set(), set_enforcer_block_type_limit(), shift_states_above(), Slic3r::GUI::GLGizmoFdmSupports::update_model_object(), Slic3r::GUI::GLGizmoFuzzySkin::update_model_object(), Slic3r::GUI::GLGizmoMmuSegmentation::update_model_object(), Slic3r::GUI::GLGizmoSeam::update_model_object(), and Slic3r::GUI::GLGizmoTextureDisplacement::update_model_object().

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

◆ set_data()

void Slic3r::FacetsAnnotation::set_data ( TriangleSelector::TriangleSplittingData && data)
inline
764{ m_data = std::move(data); this->touch(); }

References m_data, and Slic3r::ObjectWithTimestamp::touch().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), and Slic3r::GUI::GLGizmoTextureDisplacement::swap_layer_slots().

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

◆ set_enforcer_block_type_limit()

void Slic3r::FacetsAnnotation::set_enforcer_block_type_limit ( const ModelVolume & mv,
EnforcerBlockerType max_type,
EnforcerBlockerType to_delete_filament = EnforcerBlockerType::NONE,
EnforcerBlockerType replace_filament = EnforcerBlockerType::NONE )
4072{
4073 TriangleSelector selector(mv.mesh());
4074 selector.deserialize(m_data, false, max_type, to_delete_filament, replace_filament);
4075 this->set(selector);
4076}

References Slic3r::TriangleSelector::deserialize(), m_data, Slic3r::ModelVolume::mesh(), ModelVolume, set(), and set_enforcer_block_type_limit().

Referenced by set_enforcer_block_type_limit().

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

◆ set_invalid_id()

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

References m_id.

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

Here is the caller graph for this function:

◆ set_new_unique_id()

void Slic3r::ObjectBase::set_new_unique_id ( )
inlineprotectedinherited
89{ m_id = generate_new_id(); }
static ObjectID generate_new_id()
Definition ObjectID.hpp:100

References generate_new_id(), and m_id.

Referenced by Slic3r::ModelVolume::ModelVolume(), Slic3r::Model::assign_new_unique_ids_recursive(), Slic3r::ModelVolume::assign_new_unique_ids_recursive(), assign_new_unique_ids_recursive(), Slic3r::CutObjectBase::init(), Slic3r::ModelMaterial::set_new_unique_id(), Slic3r::ModelObject::set_new_unique_id(), and Slic3r::ModelVolume::set_new_unique_id().

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

◆ set_triangle_from_string()

void Slic3r::FacetsAnnotation::set_triangle_from_string ( int triangle_id,
const std::string & str )
4139{
4140 assert(! str.empty());
4141 assert(m_data.triangles_to_split.empty() || m_data.triangles_to_split.back().triangle_idx < triangle_id);
4142 m_data.triangles_to_split.emplace_back(triangle_id, int(m_data.bitstream.size()));
4143
4144 const size_t bitstream_start_idx = m_data.bitstream.size();
4145 for (auto it = str.crbegin(); it != str.crend(); ++it) {
4146 const char ch = *it;
4147 int dec = 0;
4148 if (ch >= '0' && ch<='9')
4149 dec = int(ch - '0');
4150 else if (ch >='A' && ch <= 'F')
4151 dec = 10 + int(ch - 'A');
4152 else
4153 assert(false);
4154
4155 // Convert to binary and append into code.
4156 for (int i = 0; i < 4; ++i)
4157 m_data.bitstream.insert(m_data.bitstream.end(), bool(dec & (1 << i)));
4158 }
4159
4160 if (!m_data.update_used_states(bitstream_start_idx)) {
4161 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": dropping malformed paint data of triangle " << triangle_id;
4162 m_data.bitstream.resize(bitstream_start_idx);
4163 m_data.triangles_to_split.pop_back();
4164 }
4165}

References m_data, and set_triangle_from_string().

Referenced by Slic3r::_3MF_Importer::_generate_volumes(), Slic3r::_BBS_3MF_Importer::_generate_volumes_new(), and set_triangle_from_string().

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

◆ shift_states_above()

void Slic3r::FacetsAnnotation::shift_states_above ( const ModelVolume & mv,
EnforcerBlockerType threshold,
int delta )
4051{
4052 if (empty()) return;
4053 TriangleSelector selector(mv.mesh());
4054 selector.deserialize(m_data, false);
4055 selector.shift_states_above(threshold, delta);
4056 this->set(selector);
4057}

References Slic3r::TriangleSelector::deserialize(), empty(), m_data, Slic3r::ModelVolume::mesh(), ModelVolume, set(), shift_states_above(), and Slic3r::TriangleSelector::shift_states_above().

Referenced by shift_states_above().

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

◆ shrink_to_fit()

void Slic3r::FacetsAnnotation::shrink_to_fit ( )
inline
796{ m_data.triangles_to_split.shrink_to_fit(); m_data.bitstream.shrink_to_fit(); }

References m_data.

Referenced by Slic3r::_3MF_Importer::_generate_volumes(), and Slic3r::_BBS_3MF_Importer::_generate_volumes_new().

Here is the caller graph for this function:

◆ timestamp()

Timestamp Slic3r::ObjectWithTimestamp::timestamp ( ) const
throw ( )
inlineoverridevirtualinherited

◆ timestamp_matches()

bool Slic3r::ObjectWithTimestamp::timestamp_matches ( const ObjectWithTimestamp & rhs) const
throw ( )
inlineinherited
133{ return m_timestamp == rhs.m_timestamp; }

References ObjectWithTimestamp(), and m_timestamp.

Referenced by Slic3r::FacetsAnnotation::assign(), Slic3r::FacetsAnnotation::assign(), Slic3r::LayerHeightProfile::assign(), Slic3r::LayerHeightProfile::assign(), Slic3r::model_custom_seam_data_changed(), Slic3r::model_custom_supports_data_changed(), Slic3r::model_fuzzy_skin_data_changed(), and Slic3r::model_mmu_segmentation_data_changed().

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

◆ touch()

void Slic3r::ObjectWithTimestamp::touch ( )
inlineinherited
static Timestamp s_last_timestamp
Definition ObjectID.hpp:140

References m_timestamp, and s_last_timestamp.

Referenced by Slic3r::_BBS_3MF_Importer::_generate_volumes_new(), Slic3r::LayerHeightProfile::clear(), Slic3r::FacetsAnnotation::reset(), Slic3r::FacetsAnnotation::set(), Slic3r::LayerHeightProfile::set(), Slic3r::LayerHeightProfile::set(), and Slic3r::FacetsAnnotation::set_data().

Here is the caller graph for this function:

◆ cereal::access

friend class cereal::access
friend

References cereal::access.

Referenced by cereal::access.

◆ ModelVolume

◆ UndoRedo::StackImpl

friend class UndoRedo::StackImpl
friend

Member Data Documentation

◆ m_data

◆ m_id

ObjectID Slic3r::ObjectBase::m_id
privateinherited

◆ m_timestamp

Timestamp Slic3r::ObjectWithTimestamp::m_timestamp { 1 }
privateinherited

◆ s_last_id

size_t Slic3r::ObjectBase::s_last_id = 0
staticprivateinherited

Referenced by generate_new_id().

◆ s_last_timestamp

ObjectWithTimestamp::Timestamp Slic3r::ObjectWithTimestamp::s_last_timestamp = 1
staticprivateinherited

Referenced by touch().


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