Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering

This commit is contained in:
Enrico Turri 2019-01-22 08:32:05 +01:00
commit f44510c272
10 changed files with 63 additions and 48 deletions

View file

@ -319,6 +319,9 @@ public:
// Extruder ID is only valid for FFF. Returns -1 for SLA or if the extruder ID is not applicable (support volumes).
int extruder_id() const;
void set_splittable(const int val) { m_is_splittable = val; }
int is_splittable() const { return m_is_splittable; }
// Split this volume, append the result to the object owning this volume.
// Return the number of volumes created from this one.
// This is useful to assign different materials to different volumes of an object.
@ -391,6 +394,12 @@ private:
TriangleMesh m_convex_hull;
Geometry::Transformation m_transformation;
// flag to optimize the checking if the volume is splittable
// -1 -> is unknown value (before first cheking)
// 0 -> is not splittable
// 1 -> is splittable
int m_is_splittable {-1};
ModelVolume(ModelObject *object, const TriangleMesh &mesh) : mesh(mesh), m_type(MODEL_PART), object(object)
{
if (mesh.stl.stats.number_of_facets > 1)