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

#include <src/libslic3r/Model.hpp>

+ Inheritance diagram for Slic3r::ModelInstance:
+ Collaboration diagram for Slic3r::ModelInstance:

Public Types

using Timestamp = uint64_t
 

Public Member Functions

ModelObjectget_object () const
 
const Geometry::Transformationget_transformation () const
 
void set_transformation (const Geometry::Transformation &transformation)
 
Vec3d get_offset () const
 
double get_offset (Axis axis) const
 
void set_offset (const Vec3d &offset)
 
void set_offset (Axis axis, double offset)
 
Vec3d get_rotation () const
 
double get_rotation (Axis axis) const
 
void set_rotation (const Vec3d &rotation)
 
void set_rotation (Axis axis, double rotation)
 
Vec3d get_scaling_factor () const
 
double get_scaling_factor (Axis axis) const
 
void set_scaling_factor (const Vec3d &scaling_factor)
 
void set_scaling_factor (Axis axis, double scaling_factor)
 
Vec3d get_mirror () const
 
double get_mirror (Axis axis) const
 
bool is_left_handed () const
 
void set_mirror (const Vec3d &mirror)
 
void set_mirror (Axis axis, double mirror)
 
void transform_mesh (TriangleMesh *mesh, bool dont_translate=false) const
 
BoundingBoxf3 transform_bounding_box (const BoundingBoxf3 &bbox, bool dont_translate=false) const
 
Vec3d transform_vector (const Vec3d &v, bool dont_translate=false) const
 
void transform_polygon (Polygon *polygon) const
 
const Transform3dget_matrix () const
 
Transform3d get_matrix_no_offset () const
 
bool is_printable () const
 
arrangement::ArrangePolygon get_arrange_polygon () const
 
void apply_arrange_result (const Vec2d &offs, double rotation)
 
ObjectID id () const
 
virtual Timestamp timestamp () const
 

Public Attributes

ModelInstanceEPrintVolumeState print_volume_state
 
bool printable { true }
 

Protected Member Functions

 ModelInstance (const ModelInstance &rhs)=default
 
void set_model_object (ModelObject *model_object)
 
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

 ModelInstance (ModelObject *object)
 
 ModelInstance (ModelObject *object, const ModelInstance &other)
 
 ModelInstance (ModelInstance &&rhs)=delete
 
ModelInstanceoperator= (const ModelInstance &rhs)=delete
 
ModelInstanceoperator= (ModelInstance &&rhs)=delete
 
 ModelInstance ()
 
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

Geometry::Transformation m_transformation
 
ModelObjectobject
 
ObjectID m_id
 

Static Private Attributes

static size_t s_last_id = 0
 

Friends

class Print
 
class SLAPrint
 
class Model
 
class ModelObject
 
class cereal::access
 
class UndoRedo::StackImpl
 

Detailed Description

Member Typedef Documentation

◆ Timestamp

Constructor & Destructor Documentation

◆ ModelInstance() [1/5]

Slic3r::ModelInstance::ModelInstance ( const ModelInstance rhs)
explicitprotecteddefault

◆ ModelInstance() [2/5]

Slic3r::ModelInstance::ModelInstance ( ModelObject object)
inlineexplicitprivate
1194: print_volume_state(ModelInstancePVS_Inside), object(object) { assert(this->id().valid()); }
ModelInstanceEPrintVolumeState print_volume_state
Definition Model.hpp:1126
ModelObject * object
Definition Model.hpp:1191
@ ModelInstancePVS_Inside
Definition Model.hpp:1111

◆ ModelInstance() [3/5]

Slic3r::ModelInstance::ModelInstance ( ModelObject object,
const ModelInstance other 
)
inlineexplicitprivate
1196 :
1197 m_transformation(other.m_transformation), print_volume_state(ModelInstancePVS_Inside), printable(other.printable), object(object) { assert(this->id().valid() && this->id() != other.id()); }
bool printable
Definition Model.hpp:1128
Geometry::Transformation m_transformation
Definition Model.hpp:1122

References Slic3r::ObjectBase::id().

+ Here is the call graph for this function:

◆ ModelInstance() [4/5]

Slic3r::ModelInstance::ModelInstance ( ModelInstance &&  rhs)
explicitprivatedelete

◆ ModelInstance() [5/5]

Slic3r::ModelInstance::ModelInstance ( )
inlineprivate
1206: ObjectBase(-1), object(nullptr) { assert(this->id().invalid()); }
ObjectBase()
Definition ObjectID.hpp:65

Member Function Documentation

◆ apply_arrange_result()

void Slic3r::ModelInstance::apply_arrange_result ( const Vec2d offs,
double  rotation 
)
2366{
2367 // write the transformation data into the model instance
2368 auto trafo = get_transformation().get_matrix();
2369 auto tr = Transform3d::Identity();
2370 tr.translate(to_3d(unscaled(offs), 0.));
2371 trafo = tr * Eigen::AngleAxisd(rotation, Vec3d::UnitZ()) * trafo;
2373
2374 this->object->invalidate_bounding_box();
2375}
void set_matrix(const Transform3d &transform)
Definition Geometry.hpp:441
const Transform3d & get_matrix() const
Definition Geometry.hpp:437
const Geometry::Transformation & get_transformation() const
Definition Model.hpp:1132
static EIGEN_DEVICE_FUNC const Transform Identity()
Returns an identity transformation.
Definition Transform.h:539
AngleAxis< double > AngleAxisd
Definition AngleAxis.h:160
Eigen::Matrix< typename Derived::Scalar, 3, 1, Eigen::DontAlign > to_3d(const Eigen::MatrixBase< Derived > &pt, const typename Derived::Scalar z)
Definition Point.hpp:127
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::ClipperLib::IntPoint &v) noexcept
Definition Arrange.cpp:55

References Slic3r::to_3d(), and Slic3r::unscaled().

Referenced by Slic3r::GUI::FillBedJob::prepare().

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

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_arrange_polygon()

arrangement::ArrangePolygon Slic3r::ModelInstance::get_arrange_polygon ( ) const
2346{
2347// static const double SIMPLIFY_TOLERANCE_MM = 0.1;
2348
2350
2351// if (!p.points.empty()) {
2352// Polygons pp{p};
2353// pp = p.simplify(scaled<double>(SIMPLIFY_TOLERANCE_MM));
2354// if (!pp.empty()) p = pp.front();
2355// }
2356
2357 arrangement::ArrangePolygon ret;
2358 ret.poly.contour = std::move(p);
2359 ret.translation = Vec2crd::Zero();
2360 ret.rotation = 0.;
2361
2362 return ret;
2363}
ModelObject * get_object() const
Definition Model.hpp:1130
const Transform3d & get_matrix() const
Definition Model.hpp:1169
Polygon convex_hull_2d(const Transform3d &trafo_instance) const
Definition Model.cpp:1058
Slic3r::Polygon Polygon
Definition Emboss.cpp:34

References Slic3r::ExPolygon::contour, Slic3r::arrangement::ArrangePolygon::poly, Slic3r::arrangement::ArrangePolygon::rotation, and Slic3r::arrangement::ArrangePolygon::translation.

◆ get_matrix()

const Transform3d & Slic3r::ModelInstance::get_matrix ( ) const
inline
1169{ return m_transformation.get_matrix(); }

References Slic3r::Geometry::Transformation::get_matrix(), and m_transformation.

Referenced by Slic3r::GUI::RaycastManager::actualize(), Slic3r::ModelObject::bake_xy_rotation_into_meshes(), Slic3r::GUI::on_mouse_surface_drag(), Slic3r::SlicingAdaptive::prepare(), Slic3r::Print::sequential_print_horizontal_clearance_valid(), Slic3r::SLAPrint::sla_trafo(), and Slic3r::GUI::update_arrangepoly_slaprint().

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

◆ get_matrix_no_offset()

Transform3d Slic3r::ModelInstance::get_matrix_no_offset ( ) const
inline
Transform3d get_matrix_no_offset() const
Definition Geometry.cpp:612

References Slic3r::Geometry::Transformation::get_matrix_no_offset(), and m_transformation.

Referenced by Slic3r::ModelObject::get_instance_max_z(), Slic3r::ModelObject::get_instance_min_z(), and Slic3r::GUI::GLGizmoFdmSupports::select_facets_by_angle().

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

◆ get_mirror() [1/2]

Vec3d Slic3r::ModelInstance::get_mirror ( ) const
inline
1153{ return m_transformation.get_mirror(); }
Vec3d get_mirror() const
Definition Geometry.cpp:522

References Slic3r::Geometry::Transformation::get_mirror(), and m_transformation.

+ Here is the call graph for this function:

◆ get_mirror() [2/2]

double Slic3r::ModelInstance::get_mirror ( Axis  axis) const
inline
1154{ return m_transformation.get_mirror(axis); }

References Slic3r::Geometry::Transformation::get_mirror(), and m_transformation.

+ Here is the call graph for this function:

◆ get_object()

ModelObject * Slic3r::ModelInstance::get_object ( ) const
inline
1130{ return this->object; }

References object.

Referenced by Slic3r::GUI::RaycastManager::actualize(), and Slic3r::GUI::get_arrange_poly().

+ Here is the caller graph for this function:

◆ get_offset() [1/2]

Vec3d Slic3r::ModelInstance::get_offset ( ) const
inline
1135{ return m_transformation.get_offset(); }
Vec3d get_offset() const
Definition Geometry.hpp:387

References Slic3r::Geometry::Transformation::get_offset(), and m_transformation.

Referenced by Slic3r::GUI::GLGizmoCut3D::check_and_update_connectors_state(), Slic3r::duplicate(), Slic3r::ModelObject::get_instance_max_z(), Slic3r::ModelObject::get_instance_min_z(), Slic3r::GUI::Plater::increase_instances(), Slic3r::GUI::GLGizmoCut3D::render_connectors(), Slic3r::Print::sequential_print_horizontal_clearance_valid(), Slic3r::SLAPrint::sla_trafo(), Slic3r::ModelObject::translate_instance(), and Slic3r::GUI::GLGizmoCut3D::unproject_on_cut_plane().

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

◆ get_offset() [2/2]

double Slic3r::ModelInstance::get_offset ( Axis  axis) const
inline
1136{ return m_transformation.get_offset(axis); }

References Slic3r::Geometry::Transformation::get_offset(), and m_transformation.

+ Here is the call graph for this function:

◆ get_rotation() [1/2]

Vec3d Slic3r::ModelInstance::get_rotation ( ) const
inline
1141{ return m_transformation.get_rotation(); }
Vec3d get_rotation() const
Definition Geometry.cpp:454

References Slic3r::Geometry::Transformation::get_rotation(), and m_transformation.

+ Here is the call graph for this function:

◆ get_rotation() [2/2]

double Slic3r::ModelInstance::get_rotation ( Axis  axis) const
inline
1142{ return m_transformation.get_rotation(axis); }

References Slic3r::Geometry::Transformation::get_rotation(), and m_transformation.

+ Here is the call graph for this function:

◆ get_scaling_factor() [1/2]

Vec3d Slic3r::ModelInstance::get_scaling_factor ( ) const
inline
Vec3d get_scaling_factor() const
Definition Geometry.cpp:486

References Slic3r::Geometry::Transformation::get_scaling_factor(), and m_transformation.

Referenced by Slic3r::GUI::Plater::priv::load_model_objects(), and Slic3r::PrintBase::update_object_placeholders().

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

◆ get_scaling_factor() [2/2]

double Slic3r::ModelInstance::get_scaling_factor ( Axis  axis) const
inline
1148{ return m_transformation.get_scaling_factor(axis); }

References Slic3r::Geometry::Transformation::get_scaling_factor(), and m_transformation.

+ Here is the call graph for this function:

◆ get_transformation()

◆ id()

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

References Slic3r::ObjectBase::m_id.

Referenced by Slic3r::Model::Model(), 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(), 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(), 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_left_handed()

bool Slic3r::ModelInstance::is_left_handed ( ) const
inline
1155{ return m_transformation.is_left_handed(); }
bool is_left_handed() const
Definition Geometry.hpp:421

References Slic3r::Geometry::Transformation::is_left_handed(), and m_transformation.

Referenced by Slic3r::SlicingAdaptive::prepare(), and Slic3r::SLAPrint::sla_trafo().

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

◆ is_printable()

bool Slic3r::ModelInstance::is_printable ( ) const
inline

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ serialize()

template<class Archive >
void Slic3r::ModelInstance::serialize ( Archive &  ar)
inlineprivate

◆ 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_mirror() [1/2]

void Slic3r::ModelInstance::set_mirror ( Axis  axis,
double  mirror 
)
inline
1158{ m_transformation.set_mirror(axis, mirror); }
void set_mirror(const Vec3d &mirror)
Definition Geometry.cpp:537

References m_transformation, and Slic3r::Geometry::Transformation::set_mirror().

+ Here is the call graph for this function:

◆ set_mirror() [2/2]

void Slic3r::ModelInstance::set_mirror ( const Vec3d mirror)
inline
1157{ m_transformation.set_mirror(mirror); }

References m_transformation, and Slic3r::Geometry::Transformation::set_mirror().

Referenced by Slic3r::ModelObject::bake_xy_rotation_into_meshes(), and Slic3r::AMFParserContext::endDocument().

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

◆ set_model_object()

void Slic3r::ModelInstance::set_model_object ( ModelObject model_object)
inlineprotected
1187{ object = model_object; }

◆ 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(), Slic3r::Model::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:

◆ set_offset() [1/2]

void Slic3r::ModelInstance::set_offset ( Axis  axis,
double  offset 
)
inline
void set_offset(const Vec3d &offset)
Definition Geometry.hpp:392
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, ClipperLib::JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:416

References m_transformation, Slic3r::offset(), and Slic3r::Geometry::Transformation::set_offset().

+ Here is the call graph for this function:

◆ set_offset() [2/2]

void Slic3r::ModelInstance::set_offset ( const Vec3d offset)
inline

References m_transformation, Slic3r::offset(), and Slic3r::Geometry::Transformation::set_offset().

Referenced by Slic3r::_3MF_Importer::_load_model_from_file(), Slic3r::duplicate(), Slic3r::Model::duplicate_objects_grid(), Slic3r::AMFParserContext::endDocument(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::priv::load_model_objects(), and Slic3r::ModelObject::translate_instance().

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

◆ set_rotation() [1/2]

void Slic3r::ModelInstance::set_rotation ( Axis  axis,
double  rotation 
)
inline
1145{ m_transformation.set_rotation(axis, rotation); }
void set_rotation(const Vec3d &rotation)
Definition Geometry.cpp:464

References m_transformation, and Slic3r::Geometry::Transformation::set_rotation().

+ Here is the call graph for this function:

◆ set_rotation() [2/2]

void Slic3r::ModelInstance::set_rotation ( const Vec3d rotation)
inline
1144{ m_transformation.set_rotation(rotation); }

References m_transformation, and Slic3r::Geometry::Transformation::set_rotation().

Referenced by Slic3r::ModelObject::bake_xy_rotation_into_meshes(), and Slic3r::AMFParserContext::endDocument().

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

◆ set_scaling_factor() [1/2]

void Slic3r::ModelInstance::set_scaling_factor ( Axis  axis,
double  scaling_factor 
)
inline
1151{ m_transformation.set_scaling_factor(axis, scaling_factor); }
void set_scaling_factor(const Vec3d &scaling_factor)
Definition Geometry.cpp:501

References m_transformation, and Slic3r::Geometry::Transformation::set_scaling_factor().

+ Here is the call graph for this function:

◆ set_scaling_factor() [2/2]

void Slic3r::ModelInstance::set_scaling_factor ( const Vec3d scaling_factor)
inline
1150{ m_transformation.set_scaling_factor(scaling_factor); }

References m_transformation, and Slic3r::Geometry::Transformation::set_scaling_factor().

Referenced by Slic3r::ModelObject::bake_xy_rotation_into_meshes(), Slic3r::AMFParserContext::endDocument(), and Slic3r::GUI::Plater::priv::load_model_objects().

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

◆ set_transformation()

void Slic3r::ModelInstance::set_transformation ( const Geometry::Transformation transformation)
inline
1133{ m_transformation = transformation; }

References m_transformation.

Referenced by Slic3r::_3MF_Importer::_apply_transform(), and Slic3r::ModelObject::add_instance().

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

◆ transform_bounding_box()

BoundingBoxf3 Slic3r::ModelInstance::transform_bounding_box ( const BoundingBoxf3 bbox,
bool  dont_translate = false 
) const
2328{
2329 return bbox.transformed(dont_translate ? get_matrix_no_offset() : get_matrix());
2330}
Transform3d get_matrix_no_offset() const
Definition Model.hpp:1170

References Slic3r::BoundingBoxf3::transformed().

+ Here is the call graph for this function:

◆ transform_mesh()

void Slic3r::ModelInstance::transform_mesh ( TriangleMesh mesh,
bool  dont_translate = false 
) const
2323{
2324 mesh->transform(dont_translate ? get_matrix_no_offset() : get_matrix());
2325}

References Slic3r::TriangleMesh::transform().

+ Here is the call graph for this function:

◆ transform_polygon()

void Slic3r::ModelInstance::transform_polygon ( Polygon polygon) const
2338{
2339 // CHECK_ME -> Is the following correct or it should take in account all three rotations ?
2340 polygon->rotate(get_rotation(Z)); // rotate around polygon origin
2341 // CHECK_ME -> Is the following correct ?
2342 polygon->scale(get_scaling_factor(X), get_scaling_factor(Y)); // scale around polygon origin
2343}
Vec3d get_rotation() const
Definition Model.hpp:1141
Vec3d get_scaling_factor() const
Definition Model.hpp:1147
@ Y
Definition libslic3r.h:99
@ Z
Definition libslic3r.h:100
@ X
Definition libslic3r.h:98

References Slic3r::MultiPoint::rotate(), Slic3r::MultiPoint::scale(), Slic3r::X, Slic3r::Y, and Slic3r::Z.

+ Here is the call graph for this function:

◆ transform_vector()

Vec3d Slic3r::ModelInstance::transform_vector ( const Vec3d v,
bool  dont_translate = false 
) const
2333{
2334 return dont_translate ? get_matrix_no_offset() * v : get_matrix() * v;
2335}

Friends And Related Symbol Documentation

◆ cereal::access

friend class cereal::access
friend

◆ Model

friend class Model
friend

◆ ModelObject

friend class ModelObject
friend

◆ Print

friend class Print
friend

◆ SLAPrint

friend class SLAPrint
friend

◆ UndoRedo::StackImpl

friend class UndoRedo::StackImpl
friend

Member Data Documentation

◆ m_id

◆ m_transformation

◆ object

ModelObject* Slic3r::ModelInstance::object
private

Referenced by get_object().

◆ print_volume_state

ModelInstanceEPrintVolumeState Slic3r::ModelInstance::print_volume_state

Referenced by is_printable(), and serialize().

◆ printable

◆ s_last_id

size_t Slic3r::ObjectBase::s_last_id = 0
staticprivateinherited

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