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

#include <src/libslic3r/Model.hpp>

+ Inheritance diagram for Slic3r::Model:
+ Collaboration diagram for Slic3r::Model:

Public Types

enum class  LoadAttribute : int { AddDefaultInstances , CheckVersion }
 
using LoadAttributes = enum_bitmask< LoadAttribute >
 
using Timestamp = uint64_t
 

Public Member Functions

 Model ()
 
 ~Model ()
 
 Model (const Model &rhs)
 
 Model (Model &&rhs)
 
Modeloperator= (const Model &rhs)
 
Modeloperator= (Model &&rhs)
 
ModelObjectadd_object ()
 
ModelObjectadd_object (const char *name, const char *path, const TriangleMesh &mesh)
 
ModelObjectadd_object (const char *name, const char *path, TriangleMesh &&mesh)
 
ModelObjectadd_object (const ModelObject &other)
 
void delete_object (size_t idx)
 
bool delete_object (ObjectID id)
 
bool delete_object (ModelObject *object)
 
void clear_objects ()
 
ModelMaterialadd_material (t_model_material_id material_id)
 
ModelMaterialadd_material (t_model_material_id material_id, const ModelMaterial &other)
 
ModelMaterialget_material (t_model_material_id material_id)
 
void delete_material (t_model_material_id material_id)
 
void clear_materials ()
 
bool add_default_instances ()
 
BoundingBoxf3 bounding_box_approx () const
 
BoundingBoxf3 bounding_box_exact () const
 
double max_z () const
 
unsigned int update_print_volume_state (const BuildVolume &build_volume)
 
bool center_instances_around_point (const Vec2d &point)
 
void translate (coordf_t x, coordf_t y, coordf_t z)
 
TriangleMesh mesh () const
 
void duplicate_objects_grid (size_t x, size_t y, coordf_t dist)
 
bool looks_like_multipart_object () const
 
void convert_multipart_object (unsigned int max_extruders)
 
bool looks_like_imperial_units () const
 
void convert_from_imperial_units (bool only_small_volumes)
 
bool looks_like_saved_in_meters () const
 
void convert_from_meters (bool only_small_volumes)
 
int removed_objects_with_zero_volume ()
 
void adjust_min_z ()
 
void print_info () const
 
std::string propose_export_file_name_and_path () const
 
std::string propose_export_file_name_and_path (const std::string &new_extension) const
 
bool is_fdm_support_painted () const
 
bool is_seam_painted () const
 
bool is_mm_painted () const
 
ObjectID id () const
 
virtual Timestamp timestamp () const
 

Static Public Member Functions

static Model read_from_file (const std::string &input_file, DynamicPrintConfig *config=nullptr, ConfigSubstitutionContext *config_substitutions=nullptr, LoadAttributes options=LoadAttribute::AddDefaultInstances)
 
static Model read_from_archive (const std::string &input_file, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, LoadAttributes options=LoadAttribute::AddDefaultInstances)
 

Public Attributes

ModelMaterialMap materials
 
ModelObjectPtrs objects
 
ModelWipeTower wipe_tower
 
CustomGCode::Info custom_gcode_per_print_z
 

Protected Member Functions

void set_new_unique_id ()
 
void set_invalid_id ()
 
void copy_id (const ObjectBase &rhs)
 

Private Member Functions

 Model (int)
 
void assign_new_unique_ids_recursive ()
 
void update_links_bottom_up_recursive ()
 
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

ObjectID m_id
 

Static Private Attributes

static size_t s_last_id = 0
 

Friends

class cereal::access
 
class UndoRedo::StackImpl
 

Detailed Description

Member Typedef Documentation

◆ LoadAttributes

◆ Timestamp

Member Enumeration Documentation

◆ LoadAttribute

enum class Slic3r::Model::LoadAttribute : int
strong
Enumerator
AddDefaultInstances 
CheckVersion 

Constructor & Destructor Documentation

◆ Model() [1/4]

Slic3r::Model::Model ( )
inline
1262{ assert(this->id().valid()); }

◆ ~Model()

Slic3r::Model::~Model ( )
inline
1263{ this->clear_objects(); this->clear_materials(); }
void clear_materials()
Definition Model.cpp:288
void clear_objects()
Definition Model.cpp:272

References clear_materials(), and clear_objects().

+ Here is the call graph for this function:

◆ Model() [2/4]

Slic3r::Model::Model ( const Model rhs)
inline
1267: ObjectBase(-1) { assert(this->id().invalid()); this->assign_copy(rhs); assert(this->id().valid()); assert(this->id() == rhs.id()); }
ObjectBase()
Definition ObjectID.hpp:65

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ Model() [3/4]

Slic3r::Model::Model ( Model &&  rhs)
inlineexplicit
1268: ObjectBase(-1) { assert(this->id().invalid()); this->assign_copy(std::move(rhs)); assert(this->id().valid()); assert(this->id() == rhs.id()); }

◆ Model() [4/4]

Slic3r::Model::Model ( int  )
inlineexplicitprivate
1352: ObjectBase(-1) { assert(this->id().invalid()); }

Member Function Documentation

◆ add_default_instances()

bool Slic3r::Model::add_default_instances ( )
319{
320 // apply a default position to all objects not having one
321 for (ModelObject *o : this->objects)
322 if (o->instances.empty())
323 o->add_instance();
324 return true;
325}
ModelObjectPtrs objects
Definition Model.hpp:1254
if(!(yy_init))
Definition lexer.c:1190
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:229

References objects.

Referenced by read_from_archive(), read_from_file(), and Slic3r::CLI::run().

+ Here is the caller graph for this function:

◆ add_material() [1/2]

ModelMaterial * Slic3r::Model::add_material ( t_model_material_id  material_id)
296{
297 assert(! material_id.empty());
298 ModelMaterial* material = this->get_material(material_id);
299 if (material == nullptr)
300 material = this->materials[material_id] = new ModelMaterial(this);
301 return material;
302}
ModelMaterial * get_material(t_model_material_id material_id)
Definition Model.hpp:1301
ModelMaterialMap materials
Definition Model.hpp:1252

References get_material(), and materials.

Referenced by Slic3r::ModelVolume::set_material(), and Slic3r::AMFParserContext::startElement().

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

◆ add_material() [2/2]

ModelMaterial * Slic3r::Model::add_material ( t_model_material_id  material_id,
const ModelMaterial other 
)
305{
306 assert(! material_id.empty());
307 // delete existing material if any
308 ModelMaterial* material = this->get_material(material_id);
309 delete material;
310 // set new material
311 material = new ModelMaterial(other);
312 material->set_model(this);
313 this->materials[material_id] = material;
314 return material;
315}

References get_material(), materials, and Slic3r::ModelMaterial::set_model().

+ Here is the call graph for this function:

◆ add_object() [1/4]

◆ add_object() [2/4]

ModelObject * Slic3r::Model::add_object ( const char *  name,
const char *  path,
const TriangleMesh mesh 
)
196{
197 ModelObject* new_object = new ModelObject(this);
198 this->objects.push_back(new_object);
199 new_object->name = name;
200 new_object->input_file = path;
201 ModelVolume *new_volume = new_object->add_volume(mesh);
202 new_volume->name = name;
203 new_volume->source.input_file = path;
204 new_volume->source.object_idx = (int)this->objects.size() - 1;
205 new_volume->source.volume_idx = (int)new_object->volumes.size() - 1;
206 new_object->invalidate_bounding_box();
207 return new_object;
208}
TriangleMesh mesh() const
Definition Model.cpp:382

References Slic3r::ModelObject::add_volume(), Slic3r::ModelObject::input_file, Slic3r::ModelVolume::Source::input_file, Slic3r::ModelObject::invalidate_bounding_box(), mesh(), Slic3r::ModelObject::name, Slic3r::ModelVolume::name, Slic3r::ModelVolume::Source::object_idx, objects, Slic3r::ModelVolume::source, Slic3r::ModelVolume::Source::volume_idx, and Slic3r::ModelObject::volumes.

+ Here is the call graph for this function:

◆ add_object() [3/4]

ModelObject * Slic3r::Model::add_object ( const char *  name,
const char *  path,
TriangleMesh &&  mesh 
)
211{
212 ModelObject* new_object = new ModelObject(this);
213 this->objects.push_back(new_object);
214 new_object->name = name;
215 new_object->input_file = path;
216 ModelVolume *new_volume = new_object->add_volume(std::move(mesh));
217 new_volume->name = name;
218 new_volume->source.input_file = path;
219 new_volume->source.object_idx = (int)this->objects.size() - 1;
220 new_volume->source.volume_idx = (int)new_object->volumes.size() - 1;
221 new_object->invalidate_bounding_box();
222 return new_object;
223}

References Slic3r::ModelObject::add_volume(), Slic3r::ModelObject::input_file, Slic3r::ModelVolume::Source::input_file, Slic3r::ModelObject::invalidate_bounding_box(), mesh(), Slic3r::ModelObject::name, Slic3r::ModelVolume::name, Slic3r::ModelVolume::Source::object_idx, objects, Slic3r::ModelVolume::source, Slic3r::ModelVolume::Source::volume_idx, and Slic3r::ModelObject::volumes.

+ Here is the call graph for this function:

◆ add_object() [4/4]

ModelObject * Slic3r::Model::add_object ( const ModelObject other)
226{
227 ModelObject* new_object = ModelObject::new_clone(other);
228 new_object->set_model(this);
229 this->objects.push_back(new_object);
230 return new_object;
231}

References objects, and Slic3r::ModelObject::set_model().

+ Here is the call graph for this function:

◆ adjust_min_z()

void Slic3r::Model::adjust_min_z ( )
565{
566 if (objects.empty())
567 return;
568
569 if (this->bounding_box_exact().min.z() < 0.0)
570 {
571 for (ModelObject* obj : objects)
572 {
573 if (obj != nullptr)
574 {
575 coordf_t obj_min_z = obj->min_z();
576 if (obj_min_z < 0.0)
577 obj->translate_instances(Vec3d(0.0, 0.0, -obj_min_z));
578 }
579 }
580 }
581}
BoundingBoxf3 bounding_box_exact() const
Definition Model.cpp:336
double coordf_t
Definition libslic3r.h:45
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() min(const half &a, const half &b)
Definition Half.h:507
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:52

References bounding_box_exact(), and objects.

+ Here is the call graph for this function:

◆ assign_new_unique_ids_recursive()

void Slic3r::Model::assign_new_unique_ids_recursive ( )
privatevirtual

Reimplemented from Slic3r::ObjectBase.

82{
83 this->set_new_unique_id();
84 for (std::pair<const t_model_material_id, ModelMaterial*> &m : this->materials)
86 for (ModelObject *model_object : this->objects)
87 model_object->assign_new_unique_ids_recursive();
88}
void assign_new_unique_ids_recursive()
Definition Model.cpp:81
void set_new_unique_id()
Definition ObjectID.hpp:73

References materials, objects, and Slic3r::ObjectBase::set_new_unique_id().

+ Here is the call graph for this function:

◆ bounding_box_approx()

BoundingBoxf3 Slic3r::Model::bounding_box_approx ( ) const
329{
330 BoundingBoxf3 bb;
331 for (ModelObject *o : this->objects)
332 bb.merge(o->bounding_box_approx());
333 return bb;
334}
BoundingBoxf3 bounding_box_approx() const
Definition Model.cpp:328
TMultiShape< PolygonImpl > merge(const TMultiShape< PolygonImpl > &shapes)
Definition geometries.hpp:259

References Slic3r::BoundingBox3Base< PointType >::merge(), and objects.

+ Here is the call graph for this function:

◆ bounding_box_exact()

BoundingBoxf3 Slic3r::Model::bounding_box_exact ( ) const
337{
338 BoundingBoxf3 bb;
339 for (ModelObject *o : this->objects)
340 bb.merge(o->bounding_box_exact());
341 return bb;
342}

References Slic3r::BoundingBox3Base< PointType >::merge(), and objects.

Referenced by adjust_min_z().

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

◆ center_instances_around_point()

bool Slic3r::Model::center_instances_around_point ( const Vec2d point)
361{
362 BoundingBoxf3 bb;
363 for (ModelObject *o : this->objects)
364 for (size_t i = 0; i < o->instances.size(); ++ i)
365 bb.merge(o->instance_bounding_box(i, false));
366
367 Vec2d shift2 = point - to_2d(bb.center());
368 if (std::abs(shift2(0)) < EPSILON && std::abs(shift2(1)) < EPSILON)
369 // No significant shift, don't do anything.
370 return false;
371
372 Vec3d shift3 = Vec3d(shift2(0), shift2(1), 0.0);
373 for (ModelObject *o : this->objects) {
374 for (ModelInstance *i : o->instances)
375 i->set_offset(i->get_offset() + shift3);
376 o->invalidate_bounding_box();
377 }
378 return true;
379}
static constexpr double EPSILON
Definition libslic3r.h:51
Eigen::Matrix< double, 2, 1, Eigen::DontAlign > Vec2d
Definition Point.hpp:51
Eigen::Matrix< typename Derived::Scalar, 2, 1, Eigen::DontAlign > to_2d(const Eigen::MatrixBase< Derived > &ptN)
Definition Point.hpp:121

References Slic3r::BoundingBox3Base< PointType >::center(), EPSILON, Slic3r::BoundingBox3Base< PointType >::merge(), objects, and Slic3r::to_2d().

Referenced by Slic3r::GUI::generate_thumbnail_from_model(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::ObjectList::load_modifier(), and Slic3r::GUI::Plater::priv::update().

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

◆ clear_materials()

void Slic3r::Model::clear_materials ( )
289{
290 for (auto &m : this->materials)
291 delete m.second;
292 this->materials.clear();
293}

References materials.

Referenced by ~Model(), and Slic3r::UndoRedo::StackImpl::load_snapshot().

+ Here is the caller graph for this function:

◆ clear_objects()

void Slic3r::Model::clear_objects ( )
273{
274 for (ModelObject *o : this->objects)
275 delete o;
276 this->objects.clear();
277}

References objects.

Referenced by ~Model(), Slic3r::GUI::GLGizmoCut3D::PartSelection::~PartSelection(), Slic3r::Print::clear(), Slic3r::SLAPrint::clear(), convert_multipart_object(), Slic3r::GUI::Plater::priv::delete_all_objects_from_model(), Slic3r::UndoRedo::StackImpl::load_snapshot(), Slic3r::GUI::Plater::priv::reset(), and Slic3r::GUI::Selection::Clipboard::reset().

+ Here is the caller graph for this function:

◆ convert_from_imperial_units()

void Slic3r::Model::convert_from_imperial_units ( bool  only_small_volumes)
509{
510 static constexpr const float in_to_mm = 25.4f;
511 for (ModelObject* obj : this->objects)
512 if (! only_small_volumes || obj->get_object_stl_stats().volume < volume_threshold_inches) {
513 obj->scale_mesh_after_creation(in_to_mm);
514 for (ModelVolume* v : obj->volumes) {
515 assert(! v->source.is_converted_from_meters);
516 v->source.is_converted_from_inches = true;
517 }
518 }
519}
static constexpr const double volume_threshold_inches
Definition Model.cpp:481
IGL_INLINE void volume(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< Derivedvol > &vol)
Definition volume.cpp:15

References objects, and Slic3r::volume_threshold_inches.

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

+ Here is the caller graph for this function:

◆ convert_from_meters()

void Slic3r::Model::convert_from_meters ( bool  only_small_volumes)
536{
537 static constexpr const double m_to_mm = 1000;
538 for (ModelObject* obj : this->objects)
539 if (! only_small_volumes || obj->get_object_stl_stats().volume < volume_threshold_meters) {
540 obj->scale_mesh_after_creation(m_to_mm);
541 for (ModelVolume* v : obj->volumes) {
542 assert(! v->source.is_converted_from_inches);
543 v->source.is_converted_from_meters = true;
544 }
545 }
546}
static constexpr const double volume_threshold_meters
Definition Model.cpp:521

References objects, and Slic3r::volume_threshold_meters.

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

+ Here is the caller graph for this function:

◆ convert_multipart_object()

void Slic3r::Model::convert_multipart_object ( unsigned int  max_extruders)
438{
439 assert(this->objects.size() >= 2);
440 if (this->objects.size() < 2)
441 return;
442
443 ModelObject* object = new ModelObject(this);
444 object->input_file = this->objects.front()->input_file;
445 object->name = boost::filesystem::path(this->objects.front()->input_file).stem().string();
446 //FIXME copy the config etc?
447
448 unsigned int extruder_counter = 0;
449 for (const ModelObject* o : this->objects)
450 for (const ModelVolume* v : o->volumes) {
451 // If there are more than one object, put all volumes together
452 // Each object may contain any number of volumes and instances
453 // The volumes transformations are relative to the object containing them...
454 Geometry::Transformation trafo_volume = v->get_transformation();
455 // Revert the centering operation.
456 trafo_volume.set_offset(trafo_volume.get_offset() - o->origin_translation);
457 int counter = 1;
458 auto copy_volume = [o, max_extruders, &counter, &extruder_counter](ModelVolume *new_v) {
459 assert(new_v != nullptr);
460 new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name;
461 new_v->config.set("extruder", auto_extruder_id(max_extruders, extruder_counter));
462 return new_v;
463 };
464 if (o->instances.empty()) {
465 copy_volume(object->add_volume(*v))->set_transformation(trafo_volume);
466 } else {
467 for (const ModelInstance* i : o->instances)
468 // ...so, transform everything to a common reference system (world)
469 copy_volume(object->add_volume(*v))->set_transformation(i->get_transformation() * trafo_volume);
470 }
471 }
472
473 // commented-out to fix #2868
474// object->add_instance();
475// object->instances[0]->set_offset(object->raw_mesh_bounding_box().center());
476
477 this->clear_objects();
478 this->objects.push_back(object);
479}
#define const
Definition getopt.c:38
static int auto_extruder_id(unsigned int max_extruders, unsigned int &cntr)
Definition Model.cpp:429

References Slic3r::ModelObject::add_volume(), Slic3r::auto_extruder_id(), clear_objects(), Slic3r::Geometry::Transformation::get_offset(), objects, and Slic3r::Geometry::Transformation::set_offset().

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

+ Here is the call graph for this function:
+ Here is the caller 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:

◆ delete_material()

void Slic3r::Model::delete_material ( t_model_material_id  material_id)
280{
281 ModelMaterialMap::iterator i = this->materials.find(material_id);
282 if (i != this->materials.end()) {
283 delete i->second;
284 this->materials.erase(i);
285 }
286}

References materials.

◆ delete_object() [1/3]

bool Slic3r::Model::delete_object ( ModelObject object)
241{
242 if (object != nullptr) {
243 size_t idx = 0;
244 for (ModelObject *model_object : objects) {
245 if (model_object == object) {
246 delete model_object;
247 objects.erase(objects.begin() + idx);
248 return true;
249 }
250 ++ idx;
251 }
252 }
253 return false;
254}

References objects.

◆ delete_object() [2/3]

bool Slic3r::Model::delete_object ( ObjectID  id)
257{
258 if (id.id != 0) {
259 size_t idx = 0;
260 for (ModelObject *model_object : objects) {
261 if (model_object->id() == id) {
262 delete model_object;
263 objects.erase(objects.begin() + idx);
264 return true;
265 }
266 ++ idx;
267 }
268 }
269 return false;
270}

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

+ Here is the call graph for this function:

◆ delete_object() [3/3]

void Slic3r::Model::delete_object ( size_t  idx)
234{
235 ModelObjectPtrs::iterator i = this->objects.begin() + idx;
236 delete *i;
237 this->objects.erase(i);
238}

References objects.

Referenced by Slic3r::_3MF_Importer::_handle_end_model(), Slic3r::_3MF_Importer::_handle_end_object(), Slic3r::GUI::Plater::cut(), Slic3r::GUI::ObjectList::delete_all_connectors_for_object(), Slic3r::GUI::Plater::priv::delete_object_from_model(), Slic3r::GUI::Plater::priv::remove(), and removed_objects_with_zero_volume().

+ Here is the caller graph for this function:

◆ duplicate_objects_grid()

void Slic3r::Model::duplicate_objects_grid ( size_t  x,
size_t  y,
coordf_t  dist 
)
391{
392 if (this->objects.size() > 1) throw "Grid duplication is not supported with multiple objects";
393 if (this->objects.empty()) throw "No objects!";
394
395 ModelObject* object = this->objects.front();
396 object->clear_instances();
397
398 Vec3d ext_size = object->bounding_box_exact().size() + dist * Vec3d::Ones();
399
400 for (size_t x_copy = 1; x_copy <= x; ++x_copy) {
401 for (size_t y_copy = 1; y_copy <= y; ++y_copy) {
402 ModelInstance* instance = object->add_instance();
403 instance->set_offset(Vec3d(ext_size(0) * (double)(x_copy - 1), ext_size(1) * (double)(y_copy - 1), 0.0));
404 }
405 }
406}
const Scalar & y
Definition MathFunctions.h:552
T dist(const boost::polygon::point_data< T > &p1, const boost::polygon::point_data< T > &p2)
Definition Geometry.cpp:280
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297

References objects, and Slic3r::ModelInstance::set_offset().

+ Here is the call 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_material()

ModelMaterial * Slic3r::Model::get_material ( t_model_material_id  material_id)
inline
1301 {
1302 ModelMaterialMap::iterator i = this->materials.find(material_id);
1303 return (i == this->materials.end()) ? nullptr : i->second;
1304 }

Referenced by add_material(), add_material(), and Slic3r::ModelVolume::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 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::_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(), 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<(), 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(), Slic3r::ModelMaterial::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().

◆ is_fdm_support_painted()

bool Slic3r::Model::is_fdm_support_painted ( ) const
608{
609 return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_fdm_support_painted(); });
610}

References objects.

Referenced by Slic3r::_3MF_Exporter::_add_model_file_to_archive().

+ Here is the caller graph for this function:

◆ is_mm_painted()

bool Slic3r::Model::is_mm_painted ( ) const
618{
619 return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_mm_painted(); });
620}

References objects.

Referenced by Slic3r::_3MF_Exporter::_add_model_file_to_archive().

+ Here is the caller graph for this function:

◆ is_seam_painted()

bool Slic3r::Model::is_seam_painted ( ) const
613{
614 return std::any_of(this->objects.cbegin(), this->objects.cend(), [](const ModelObject *mo) { return mo->is_seam_painted(); });
615}

References objects.

Referenced by Slic3r::_3MF_Exporter::_add_model_file_to_archive().

+ Here is the caller graph for this function:

◆ 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); }
ObjectID id() const
Definition ObjectID.hpp:55

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ looks_like_imperial_units()

bool Slic3r::Model::looks_like_imperial_units ( ) const
484{
485 if (this->objects.empty())
486 return false;
487
488 for (ModelObject* obj : this->objects)
489 if (obj->get_object_stl_stats().volume < volume_threshold_inches) {
490 if (!obj->is_cut())
491 return true;
492 bool all_cut_parts_look_like_imperial_units = true;
493 for (ModelObject* obj_other : this->objects) {
494 if (obj_other == obj)
495 continue;
496 if (obj_other->cut_id.is_equal(obj->cut_id) && obj_other->get_object_stl_stats().volume >= volume_threshold_inches) {
497 all_cut_parts_look_like_imperial_units = false;
498 break;
499 }
500 }
501 if (all_cut_parts_look_like_imperial_units)
502 return true;
503 }
504
505 return false;
506}

References objects, and Slic3r::volume_threshold_inches.

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

+ Here is the caller graph for this function:

◆ looks_like_multipart_object()

bool Slic3r::Model::looks_like_multipart_object ( ) const
409{
410 if (this->objects.size() <= 1)
411 return false;
412 double zmin = std::numeric_limits<double>::max();
413 for (const ModelObject *obj : this->objects) {
414 if (obj->volumes.size() > 1 || obj->config.keys().size() > 1)
415 return false;
416 for (const ModelVolume *vol : obj->volumes) {
417 double zmin_this = vol->mesh().bounding_box().min(2);
418 if (zmin == std::numeric_limits<double>::max())
419 zmin = zmin_this;
420 else if (std::abs(zmin - zmin_this) > EPSILON)
421 // The volumes don't share zmin.
422 return true;
423 }
424 }
425 return false;
426}

References EPSILON, and objects.

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

+ Here is the caller graph for this function:

◆ looks_like_saved_in_meters()

bool Slic3r::Model::looks_like_saved_in_meters ( ) const
524{
525 if (this->objects.size() == 0)
526 return false;
527
528 for (ModelObject* obj : this->objects)
529 if (obj->get_object_stl_stats().volume < volume_threshold_meters)
530 return true;
531
532 return false;
533}

References objects, and Slic3r::volume_threshold_meters.

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

+ Here is the caller graph for this function:

◆ max_z()

double Slic3r::Model::max_z ( ) const
345{
346 double z = 0;
347 for (ModelObject *o : this->objects)
348 z = std::max(z, o->max_z());
349 return z;
350}
double max_z() const
Definition Model.cpp:344
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() max(const half &a, const half &b)
Definition Half.h:516
STL namespace.

References objects.

Referenced by Slic3r::GUI::GLCanvas3D::reload_scene().

+ Here is the caller graph for this function:

◆ mesh()

TriangleMesh Slic3r::Model::mesh ( ) const
383{
384 TriangleMesh mesh;
385 for (const ModelObject *o : this->objects)
386 mesh.merge(o->mesh());
387 return mesh;
388}

References Slic3r::TriangleMesh::merge(), mesh(), and objects.

Referenced by add_object(), add_object(), Slic3r::GUI::generate_thumbnail_from_model(), Slic3r::GUI::GLModel::init_from_file(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::BedShapePanel::load_stl(), mesh(), Slic3r::store_obj(), and Slic3r::store_stl().

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

◆ operator=() [1/2]

Model & Slic3r::Model::operator= ( const Model rhs)
inline
1269{ this->assign_copy(rhs); assert(this->id().valid()); assert(this->id() == rhs.id()); return *this; }

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ operator=() [2/2]

Model & Slic3r::Model::operator= ( Model &&  rhs)
inline
1270{ this->assign_copy(std::move(rhs)); assert(this->id().valid()); assert(this->id() == rhs.id()); return *this; }

◆ print_info()

void Slic3r::Model::print_info ( ) const
inline
1337{ for (const ModelObject *o : this->objects) o->print_info(); }
void print_info() const
Definition Model.hpp:1337

References objects.

◆ propose_export_file_name_and_path() [1/2]

std::string Slic3r::Model::propose_export_file_name_and_path ( ) const
586{
587 std::string input_file;
588 for (const ModelObject *model_object : this->objects)
589 for (ModelInstance *model_instance : model_object->instances)
590 if (model_instance->is_printable()) {
591 input_file = model_object->get_export_filename();
592
593 if (!input_file.empty())
594 goto end;
595 // Other instances will produce the same name, skip them.
596 break;
597 }
598end:
599 return input_file;
600}
S::iterator end(S &sh, const PathTag &)
Definition geometry_traits.hpp:620

References objects.

Referenced by Slic3r::GUI::Plater::priv::get_export_file_path(), Slic3r::CLI::output_filepath(), Slic3r::PrintBase::output_filepath(), and propose_export_file_name_and_path().

+ Here is the caller graph for this function:

◆ propose_export_file_name_and_path() [2/2]

std::string Slic3r::Model::propose_export_file_name_and_path ( const std::string &  new_extension) const
603{
604 return boost::filesystem::path(this->propose_export_file_name_and_path()).replace_extension(new_extension).string();
605}
std::string propose_export_file_name_and_path() const
Definition Model.cpp:585

References propose_export_file_name_and_path().

+ Here is the call graph for this function:

◆ read_from_archive()

Model Slic3r::Model::read_from_archive ( const std::string &  input_file,
DynamicPrintConfig config,
ConfigSubstitutionContext config_substitutions,
LoadAttributes  options = LoadAttribute::AddDefaultInstances 
)
static
151{
152 assert(config != nullptr);
153 assert(config_substitutions != nullptr);
154
155 Model model;
156
157 bool result = false;
158 if (boost::algorithm::iends_with(input_file, ".3mf") || boost::algorithm::iends_with(input_file, ".zip"))
159 result = load_3mf(input_file.c_str(), *config, *config_substitutions, &model, options & LoadAttribute::CheckVersion);
160 else if (boost::algorithm::iends_with(input_file, ".zip.amf"))
161 result = load_amf(input_file.c_str(), config, config_substitutions, &model, options & LoadAttribute::CheckVersion);
162 else
163 throw Slic3r::RuntimeError("Unknown file format. Input file must have .3mf or .zip.amf extension.");
164
165 if (!result)
166 throw Slic3r::RuntimeError("Loading of a model file failed.");
167
168 for (ModelObject *o : model.objects) {
169// if (boost::algorithm::iends_with(input_file, ".zip.amf"))
170// {
171// // we remove the .zip part of the extension to avoid it be added to filenames when exporting
172// o->input_file = boost::ireplace_last_copy(input_file, ".zip.", ".");
173// }
174// else
175 o->input_file = input_file;
176 }
177
179 model.add_default_instances();
180
181 CustomGCode::update_custom_gcode_per_print_z_from_config(model.custom_gcode_per_print_z, config);
182 CustomGCode::check_mode_for_custom_gcode_per_print_z(model.custom_gcode_per_print_z);
183
184 handle_legacy_sla(*config);
185
186 return model;
187}
Model()
Definition Model.hpp:1262
void update_custom_gcode_per_print_z_from_config(Info &info, DynamicPrintConfig *config)
Definition CustomGCode.cpp:13
void check_mode_for_custom_gcode_per_print_z(Info &info)
Definition CustomGCode.cpp:38
void handle_legacy_sla(DynamicPrintConfig &config)
Definition PrintConfig.cpp:4389
bool load_3mf(const char *path, DynamicPrintConfig &config, ConfigSubstitutionContext &config_substitutions, Model *model, bool check_version)
Definition 3mf.cpp:3461
bool load_amf(const char *path, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, Model *model, bool check_version)
Definition AMF.cpp:1072

References add_default_instances(), AddDefaultInstances, Slic3r::CustomGCode::check_mode_for_custom_gcode_per_print_z(), CheckVersion, custom_gcode_per_print_z, Slic3r::handle_legacy_sla(), Slic3r::load_3mf(), Slic3r::load_amf(), objects, and Slic3r::CustomGCode::update_custom_gcode_per_print_z_from_config().

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

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

◆ read_from_file()

Model Slic3r::Model::read_from_file ( const std::string &  input_file,
DynamicPrintConfig config = nullptr,
ConfigSubstitutionContext config_substitutions = nullptr,
LoadAttributes  options = LoadAttribute::AddDefaultInstances 
)
static
105{
106 Model model;
107
108 DynamicPrintConfig temp_config;
109 ConfigSubstitutionContext temp_config_substitutions_context(ForwardCompatibilitySubstitutionRule::EnableSilent);
110 if (config == nullptr)
111 config = &temp_config;
112 if (config_substitutions == nullptr)
113 config_substitutions = &temp_config_substitutions_context;
114
115 bool result = false;
116 if (boost::algorithm::iends_with(input_file, ".stl"))
117 result = load_stl(input_file.c_str(), &model);
118 else if (boost::algorithm::iends_with(input_file, ".obj"))
119 result = load_obj(input_file.c_str(), &model);
120 else if (boost::algorithm::iends_with(input_file, ".step") || boost::algorithm::iends_with(input_file, ".stp"))
121 result = load_step(input_file.c_str(), &model);
122 else if (boost::algorithm::iends_with(input_file, ".amf") || boost::algorithm::iends_with(input_file, ".amf.xml"))
123 result = load_amf(input_file.c_str(), config, config_substitutions, &model, options & LoadAttribute::CheckVersion);
124 else if (boost::algorithm::iends_with(input_file, ".3mf") || boost::algorithm::iends_with(input_file, ".zip"))
125 //FIXME options & LoadAttribute::CheckVersion ?
126 result = load_3mf(input_file.c_str(), *config, *config_substitutions, &model, false);
127 else
128 throw Slic3r::RuntimeError("Unknown file format. Input file must have .stl, .obj, .amf(.xml), .prusa or .step/.stp extension.");
129
130 if (! result)
131 throw Slic3r::RuntimeError("Loading of a model file failed.");
132
133 if (model.objects.empty())
134 throw Slic3r::RuntimeError("The supplied file couldn't be read because it's empty");
135
136 for (ModelObject *o : model.objects)
137 o->input_file = input_file;
138
140 model.add_default_instances();
141
142 CustomGCode::update_custom_gcode_per_print_z_from_config(model.custom_gcode_per_print_z, config);
143 CustomGCode::check_mode_for_custom_gcode_per_print_z(model.custom_gcode_per_print_z);
144
145 sort_remove_duplicates(config_substitutions->substitutions);
146 return model;
147}
@ EnableSilent
Definition Config.hpp:223
bool load_step(const char *path, Model *model)
Definition STEP.cpp:79
void sort_remove_duplicates(std::vector< T > &vec)
Definition libslic3r.h:188
bool load_stl(const char *path, Model *model, const char *object_name_in)
Definition STL.cpp:17
bool load_obj(const char *path, TriangleMesh *meshptr)
Definition OBJ.cpp:20

References add_default_instances(), AddDefaultInstances, Slic3r::CustomGCode::check_mode_for_custom_gcode_per_print_z(), CheckVersion, custom_gcode_per_print_z, Slic3r::EnableSilent, Slic3r::load_3mf(), Slic3r::load_amf(), Slic3r::load_obj(), Slic3r::load_step(), Slic3r::load_stl(), objects, Slic3r::sort_remove_duplicates(), Slic3r::ConfigSubstitutionContext::substitutions, and Slic3r::CustomGCode::update_custom_gcode_per_print_z_from_config().

Referenced by Slic3r::GUI::generate_thumbnail_from_model(), Slic3r::GUI::GLModel::init_from_file(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::BedShapePanel::load_stl(), Slic3r::GUI::Plater::priv::reload_from_disk(), Slic3r::GUI::Plater::priv::replace_volume_with_stl(), and Slic3r::CLI::run().

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

◆ removed_objects_with_zero_volume()

int Slic3r::Model::removed_objects_with_zero_volume ( )
551{
552 if (objects.size() == 0)
553 return 0;
554
555 int removed = 0;
556 for (int i = int(objects.size()) - 1; i >= 0; i--)
557 if (objects[i]->get_object_stl_stats().volume < zero_volume) {
558 delete_object(size_t(i));
559 removed++;
560 }
561 return removed;
562}
void delete_object(size_t idx)
Definition Model.cpp:233
static constexpr const double zero_volume
Definition Model.cpp:548

References delete_object(), objects, and Slic3r::zero_volume.

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

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

◆ serialize()

template<class Archive >
void Slic3r::Model::serialize ( Archive &  ar)
inlineprivate
1358 {
1359 Internal::StaticSerializationWrapper<ModelWipeTower> wipe_tower_wrapper(wipe_tower);
1360 ar(materials, objects, wipe_tower_wrapper);
1361 }
ModelWipeTower wipe_tower
Definition Model.hpp:1256

References materials, objects, and wipe_tower.

◆ 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_new_unique_id()

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

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

Referenced by Slic3r::ModelVolume::ModelVolume(), assign_new_unique_ids_recursive(), Slic3r::ObjectBase::assign_new_unique_ids_recursive(), Slic3r::ModelObject::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:

◆ 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:

◆ translate()

void Slic3r::Model::translate ( coordf_t  x,
coordf_t  y,
coordf_t  z 
)
inline
1320{ for (ModelObject *o : this->objects) o->translate(x, y, z); }
void translate(coordf_t x, coordf_t y, coordf_t z)
Definition Model.hpp:1320

References objects.

◆ update_links_bottom_up_recursive()

void Slic3r::Model::update_links_bottom_up_recursive ( )
private
91{
92 for (std::pair<const t_model_material_id, ModelMaterial*> &kvp : this->materials)
93 kvp.second->set_model(this);
94 for (ModelObject *model_object : this->objects) {
95 model_object->set_model(this);
96 for (ModelInstance *model_instance : model_object->instances)
97 model_instance->set_model_object(model_object);
98 for (ModelVolume *model_volume : model_object->volumes)
99 model_volume->set_model_object(model_object);
100 }
101}

References materials, and objects.

Referenced by Slic3r::UndoRedo::StackImpl::load_snapshot().

+ Here is the caller graph for this function:

◆ update_print_volume_state()

unsigned int Slic3r::Model::update_print_volume_state ( const BuildVolume build_volume)
353{
354 unsigned int num_printable = 0;
355 for (ModelObject* model_object : this->objects)
356 num_printable += model_object->update_instances_print_volume_state(build_volume);
357 return num_printable;
358}

References objects.

Friends And Related Symbol Documentation

◆ cereal::access

friend class cereal::access
friend

◆ UndoRedo::StackImpl

friend class UndoRedo::StackImpl
friend

Member Data Documentation

◆ custom_gcode_per_print_z

◆ m_id

◆ materials

◆ objects

ModelObjectPtrs Slic3r::Model::objects

Referenced by Slic3r::GUI::GLGizmoCut3D::PartSelection::PartSelection(), Slic3r::GUI::PlaterAfterLoadAutoArrange::PlaterAfterLoadAutoArrange(), Slic3r::_3MF_Exporter::_add_cut_information_file_to_archive(), Slic3r::_3MF_Exporter::_add_layer_config_ranges_file_to_archive(), Slic3r::_3MF_Exporter::_add_layer_height_profile_file_to_archive(), Slic3r::_3MF_Exporter::_add_model_file_to_archive(), Slic3r::_3MF_Exporter::_add_sla_drain_holes_file_to_archive(), Slic3r::_3MF_Exporter::_add_sla_support_points_file_to_archive(), Slic3r::_3MF_Importer::_create_object_instance(), Slic3r::_3MF_Importer::_handle_end_model(), Slic3r::_3MF_Importer::_handle_start_object(), Slic3r::_3MF_Importer::_load_model_from_file(), Slic3r::GUI::Plater::priv::actualize_object_warnings(), Slic3r::GUI::Selection::add(), add_default_instances(), add_object(), add_object(), add_object(), add_object(), Slic3r::GUI::GLGizmoSimplify::add_simplify_suggestion_notification(), adjust_min_z(), Slic3r::GUI::MenuFactory::append_menu_item_edit_text(), Slic3r::Print::apply(), Slic3r::SLAPrint::apply(), priv::apply_camera_dir(), assign_new_unique_ids_recursive(), bounding_box_approx(), bounding_box_exact(), Slic3r::GUI::calc_surface_offset(), Slic3r::GUI::Plater::priv::can_arrange(), Slic3r::GUI::Plater::priv::can_decrease_instances(), Slic3r::GUI::MainFrame::can_delete_all(), Slic3r::GUI::Plater::priv::can_delete_all(), Slic3r::GUI::MainFrame::can_export_gcode(), Slic3r::GUI::MainFrame::can_export_gcode_sd(), Slic3r::GUI::MainFrame::can_export_model(), Slic3r::GUI::MainFrame::can_export_supports(), Slic3r::GUI::Plater::priv::can_fix_through_netfabb(), Slic3r::GUI::Plater::priv::can_reload_from_disk(), Slic3r::GUI::MainFrame::can_reslice(), Slic3r::GUI::MainFrame::can_select(), Slic3r::GUI::MainFrame::can_send_gcode(), Slic3r::GUI::Plater::priv::can_set_instance_to_object(), Slic3r::GUI::Plater::priv::can_simplify(), Slic3r::GUI::MainFrame::can_slice(), Slic3r::GUI::MainFrame::can_start_new_project(), center_instances_around_point(), Slic3r::GUI::Plater::changed_mesh(), Slic3r::GUI::Plater::changed_objects(), Slic3r::check_model_ids_equal(), Slic3r::check_model_ids_validity(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), Slic3r::GUI::Plater::clear_before_change_mesh(), Slic3r::GUI::ArrangeJob::clear_input(), clear_objects(), convert_from_imperial_units(), convert_from_meters(), convert_multipart_object(), Slic3r::GUI::Selection::copy_to_clipboard(), Slic3r::GUI::create_meshes(), Slic3r::GUI::GLGizmoEmboss::create_volume(), priv::create_volume(), Slic3r::GUI::Plater::cut(), Slic3r::GUI::GLGizmoFlatten::data_changed(), delete_object(), delete_object(), delete_object(), Slic3r::GUI::Plater::priv::delete_object_from_model(), Slic3r::GUI::GLCanvas3D::do_mirror(), Slic3r::GUI::GLCanvas3D::do_move(), Slic3r::GUI::GLCanvas3D::do_reset_skew(), Slic3r::GUI::GLCanvas3D::do_rotate(), Slic3r::GUI::GLCanvas3D::do_scale(), Slic3r::duplicate(), Slic3r::duplicate_objects(), duplicate_objects_grid(), Slic3r::AMFParserContext::endDocument(), Slic3r::AMFParserContext::endElement(), Slic3r::GUI::Selection::erase(), Slic3r::GUI::Plater::priv::export_gcode(), Slic3r::GUI::RotoptimizeJob::finalize(), Slic3r::GUI::FillBedJob::finalize(), Slic3r::GUI::generate_thumbnail_from_model(), Slic3r::get_arrange_poly(), Slic3r::get_arrange_polys(), Slic3r::GUI::Selection::get_bounding_box_in_reference_system(), Slic3r::GUI::GLGizmoCut3D::get_cut_matrix(), Slic3r::GUI::Plater::priv::get_export_file_path(), Slic3r::GUI::get_model_instance(), Slic3r::GUI::get_model_object(), Slic3r::GUI::get_model_volume(), Slic3r::GUI::Selection::Clipboard::get_object(), Slic3r::GUI::Selection::Clipboard::get_objects(), Slic3r::GUI::Plater::priv::get_selected_instance_idx(), Slic3r::GUI::Plater::priv::get_selected_object_idx(), Slic3r::GUI::get_selected_volume(), Slic3r::GUI::Plater::priv::get_selected_volume_idx(), Slic3r::GUI::get_volume(), Slic3r::GUI::get_volume_ids(), Slic3r::GUI::Selection::get_volume_idxs_from_object(), Slic3r::GUI::MainFrame::init_menubar_as_editor(), Slic3r::GUI::GLGizmoSimplify::init_model(), Slic3r::GUI::Selection::instances_changed(), Slic3r::GUI::Selection::is_any_connector(), Slic3r::GUI::Selection::is_any_cut_volume(), Slic3r::GUI::Selection::Clipboard::is_empty(), is_fdm_support_painted(), Slic3r::GUI::Selection::is_from_fully_selected_instance(), Slic3r::GUI::Selection::is_from_single_object(), is_mm_painted(), is_seam_painted(), Slic3r::GUI::Selection::is_single_full_instance(), Slic3r::GUI::Selection::is_single_text(), Slic3r::GUI::Plater::priv::layers_height_allowed(), Slic3r::load_3mf(), Slic3r::load_amf_archive(), Slic3r::load_amf_file(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::ObjectList::load_mesh_object(), Slic3r::GUI::Plater::priv::load_model_objects(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::GLCanvas3D::load_object(), Slic3r::load_step(), looks_like_imperial_units(), looks_like_multipart_object(), looks_like_saved_in_meters(), max_z(), Slic3r::GUI::ObjectList::merge(), mesh(), Slic3r::model_has_advanced_features(), Slic3r::model_has_multi_part_objects(), Slic3r::model_has_parameter_modifiers_in_objects(), Slic3r::GUI::GLGizmoCut3D::PartSelection::model_object(), Slic3r::model_object_list_equal(), Slic3r::model_object_list_extended(), Slic3r::GUI::object_contains_negative_volumes(), Slic3r::GUI::object_has_sla_drain_holes(), Slic3r::GUI::Plater::priv::object_list_changed(), Slic3r::GUI::GLGizmoEmboss::on_mouse(), Slic3r::GUI::GLCanvas3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::on_mouse_surface_drag(), Slic3r::GUI::GLGizmoEmboss::on_render(), Slic3r::GUI::GLGizmoHollow::on_render(), Slic3r::GUI::GLGizmoSimplify::on_render(), Slic3r::GUI::GLGizmoSlaSupports::on_render(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::CommonGizmosDataObjects::SelectionInfo::on_update(), Slic3r::GUI::Selection::paste_objects_from_clipboard(), Slic3r::GUI::Selection::paste_volumes_from_clipboard(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::FillBedJob::prepare(), Slic3r::GUI::ArrangeJob::prepare_all(), Slic3r::GUI::ArrangeJob::prepare_selected(), print_info(), Slic3r::GUI::RotoptimizeJob::process(), Slic3r::GUI::GLGizmoCut3D::process_contours(), Slic3r::GUI::processed_objects_idxs(), propose_export_file_name_and_path(), read_from_archive(), read_from_file(), Slic3r::GUI::Plater::priv::reload_all_from_disk(), Slic3r::GUI::Plater::priv::reload_from_disk(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::reloadable_volumes(), removed_objects_with_zero_volume(), Slic3r::GUI::GLCanvas3D::Labels::render(), Slic3r::GUI::Plater::priv::replace_volume_with_stl(), Slic3r::GUI::Plater::priv::replace_with_stl(), Slic3r::GUI::GLGizmoCut3D::reset_cut_by_contours(), Slic3r::GUI::Plater::reslice(), Slic3r::CLI::run(), Slic3r::GUI::GUI_App::save_mode(), Slic3r::GUI::GLCanvas3D::LayersEditing::select_object(), serialize(), Slic3r::GUI::Plater::priv::set_current_panel(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::sort_object_instances_by_model_order(), Slic3r::GUI::Plater::priv::split_object(), priv::start_create_volume_on_surface_job(), Slic3r::AMFParserContext::startElement(), Slic3r::store_amf(), Slic3r::GUI::synchronize_model_after_cut(), Slic3r::GUI::GLCanvas3D::toggle_model_objects_visibility(), Slic3r::GUI::GLCanvas3D::toggle_sla_auxiliaries_visibility(), translate(), Slic3r::GUI::GLGizmoMeasure::update_if_needed(), Slic3r::GUI::GLCanvas3D::update_instance_printable_state_for_object(), update_links_bottom_up_recursive(), Slic3r::PrintBase::update_object_placeholders(), update_print_volume_state(), Slic3r::GUI::GLCanvas3D::update_sequential_clearance(), Slic3r::GUI::Selection::update_type(), priv::update_volume(), Slic3r::GUI::verify_instances_rotation_synchronized(), and Slic3r::GUI::world_matrix_fixed().

◆ s_last_id

size_t Slic3r::ObjectBase::s_last_id = 0
staticprivateinherited

◆ wipe_tower


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