Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::GLVolumeCollection Class Reference

#include <src/slic3r/GUI/3DScene.hpp>

+ Collaboration diagram for Slic3r::GLVolumeCollection:

Classes

struct  PrintVolume
 
struct  Slope
 

Public Types

enum class  ERenderType : unsigned char { Opaque , Transparent , All }
 

Public Member Functions

 GLVolumeCollection ()
 
 ~GLVolumeCollection ()
 
std::vector< int > load_object (const ModelObject *model_object, int obj_idx, const std::vector< int > &instance_idxs)
 
int load_object_volume (const ModelObject *model_object, int obj_idx, int volume_idx, int instance_idx)
 
int load_wipe_tower_preview (float pos_x, float pos_y, float width, float depth, const std::vector< std::pair< float, float > > &z_and_depth_pairs, float height, float cone_angle, float rotation_angle, bool size_unknown, float brim_width)
 
void load_object_auxiliary (const SLAPrintObject *print_object, int obj_idx, const std::vector< std::pair< size_t, size_t > > &instances, SLAPrintObjectStep milestone, size_t timestamp)
 
GLVolumenew_toolpath_volume (const ColorRGBA &rgba)
 
GLVolumenew_nontoolpath_volume (const ColorRGBA &rgba)
 
void render (ERenderType type, bool disable_cullface, const Transform3d &view_matrix, const Transform3d &projection_matrix, std::function< bool(const GLVolume &)> filter_func=std::function< bool(const GLVolume &)>()) const
 
void clear ()
 
bool empty () const
 
void set_range (double low, double high)
 
void set_use_raycasters (bool value)
 
void set_print_volume (const PrintVolume &print_volume)
 
void set_z_range (float min_z, float max_z)
 
void set_clipping_plane (const std::array< double, 4 > &coeffs)
 
const std::array< float, 2 > & get_z_range () const
 
const std::array< double, 4 > & get_clipping_plane () const
 
void set_use_color_clip_plane (bool use)
 
void set_color_clip_plane (const Vec3d &cp_normal, double offset)
 
void set_color_clip_plane_colors (const std::array< ColorRGBA, 2 > &colors)
 
bool is_slope_active () const
 
void set_slope_active (bool active)
 
float get_slope_normal_z () const
 
void set_slope_normal_z (float normal_z)
 
void set_default_slope_normal_z ()
 
void set_show_sinking_contours (bool show)
 
void set_show_non_manifold_edges (bool show)
 
void reset_outside_state ()
 
void update_colors_by_extruder (const DynamicPrintConfig *config)
 
std::vector< double > get_current_print_zs (bool active_only) const
 
size_t cpu_memory_used () const
 
size_t gpu_memory_used () const
 
size_t total_memory_used () const
 
std::string log_memory_info () const
 

Public Attributes

GLVolumePtrs volumes
 

Private Member Functions

 GLVolumeCollection (const GLVolumeCollection &other)
 
GLVolumeCollectionoperator= (const GLVolumeCollection &)
 

Private Attributes

PrintVolume m_print_volume
 
std::array< float, 2 > m_z_range
 
std::array< double, 4 > m_clipping_plane
 
std::array< double, 4 > m_color_clip_plane
 
bool m_use_color_clip_plane { false }
 
std::array< ColorRGBA, 2 > m_color_clip_plane_colors { ColorRGBA::RED(), ColorRGBA::BLUE() }
 
Slope m_slope
 
bool m_show_sinking_contours { false }
 
bool m_show_non_manifold_edges { true }
 
bool m_use_raycasters { true }
 

Detailed Description


Class Documentation

◆ Slic3r::GLVolumeCollection::PrintVolume

struct Slic3r::GLVolumeCollection::PrintVolume
+ Collaboration diagram for Slic3r::GLVolumeCollection::PrintVolume:
Class Members
array< float, 4 > data
int type { 0 }
array< float, 2 > zs

◆ Slic3r::GLVolumeCollection::Slope

struct Slic3r::GLVolumeCollection::Slope
Class Members
bool active { false }
float normal_z

Member Enumeration Documentation

◆ ERenderType

Constructor & Destructor Documentation

◆ GLVolumeCollection() [1/2]

Slic3r::GLVolumeCollection::GLVolumeCollection ( )
inline
void set_default_slope_normal_z()
Definition 3DScene.hpp:449

References set_default_slope_normal_z().

+ Here is the call graph for this function:

◆ ~GLVolumeCollection()

Slic3r::GLVolumeCollection::~GLVolumeCollection ( )
inline
384{ clear(); }
void clear()
Definition 3DScene.hpp:422

References clear().

+ Here is the call graph for this function:

◆ GLVolumeCollection() [2/2]

Slic3r::GLVolumeCollection::GLVolumeCollection ( const GLVolumeCollection other)
private

Member Function Documentation

◆ clear()

void Slic3r::GLVolumeCollection::clear ( )
inline
422{ for (auto *v : volumes) delete v; volumes.clear(); }
GLVolumePtrs volumes
Definition 3DScene.hpp:381

References volumes.

Referenced by ~GLVolumeCollection(), Slic3r::GUI::GCodeViewer::reset(), Slic3r::GUI::GLCanvas3D::reset_volumes(), and Slic3r::GUI::GLGizmoSlaBase::update_volumes().

+ Here is the caller graph for this function:

◆ cpu_memory_used()

size_t Slic3r::GLVolumeCollection::cpu_memory_used ( ) const
931{
932 size_t memsize = sizeof(*this) + this->volumes.capacity() * sizeof(GLVolume);
933 for (const GLVolume *volume : this->volumes)
934 memsize += volume->cpu_memory_used();
935 return memsize;
936}
size_t cpu_memory_used() const
Definition 3DScene.cpp:930
IGL_INLINE void volume(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedT > &T, Eigen::PlainObjectBase< Derivedvol > &vol)
Definition volume.cpp:15

References volumes.

Referenced by log_memory_info(), and total_memory_used().

+ Here is the caller graph for this function:

◆ empty()

bool Slic3r::GLVolumeCollection::empty ( ) const
inline
424{ return volumes.empty(); }

References volumes.

Referenced by Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), Slic3r::GUI::GLCanvas3D::on_char(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::render(), Slic3r::GUI::GCodeViewer::render_shells(), and Slic3r::GUI::GLCanvas3D::reset_volumes().

+ Here is the caller graph for this function:

◆ get_clipping_plane()

const std::array< double, 4 > & Slic3r::GLVolumeCollection::get_clipping_plane ( ) const
inline
434{ return m_clipping_plane; }
std::array< double, 4 > m_clipping_plane
Definition 3DScene.hpp:360

References m_clipping_plane.

◆ get_current_print_zs()

std::vector< double > Slic3r::GLVolumeCollection::get_current_print_zs ( bool  active_only) const
904{
905 // Collect layer top positions of all volumes.
906 std::vector<double> print_zs;
907 for (GLVolume *vol : this->volumes)
908 {
909 if (!active_only || vol->is_active)
910 append(print_zs, vol->print_zs);
911 }
912 std::sort(print_zs.begin(), print_zs.end());
913
914 // Replace intervals of layers with similar top positions with their average value.
915 int n = int(print_zs.size());
916 int k = 0;
917 for (int i = 0; i < n;) {
918 int j = i + 1;
919 coordf_t zmax = print_zs[i] + EPSILON;
920 for (; j < n && print_zs[j] <= zmax; ++ j) ;
921 print_zs[k ++] = (j > i + 1) ? (0.5 * (print_zs[i] + print_zs[j - 1])) : print_zs[i];
922 i = j;
923 }
924 if (k < n)
925 print_zs.erase(print_zs.begin() + k, print_zs.end());
926
927 return print_zs;
928}
static constexpr double EPSILON
Definition libslic3r.h:51
double coordf_t
Definition libslic3r.h:45
void append(std::vector< T, Alloc > &dest, const std::vector< T, Alloc2 > &src)
Definition libslic3r.h:110

References Slic3r::append(), EPSILON, and volumes.

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

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

◆ get_slope_normal_z()

float Slic3r::GLVolumeCollection::get_slope_normal_z ( ) const
inline
447{ return m_slope.normal_z; }
float normal_z
Definition 3DScene.hpp:372
Slope m_slope
Definition 3DScene.hpp:375

References m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.

◆ get_z_range()

const std::array< float, 2 > & Slic3r::GLVolumeCollection::get_z_range ( ) const
inline
433{ return m_z_range; }
std::array< float, 2 > m_z_range
Definition 3DScene.hpp:357

References m_z_range.

◆ gpu_memory_used()

size_t Slic3r::GLVolumeCollection::gpu_memory_used ( ) const
939{
940 size_t memsize = 0;
941 for (const GLVolume *volume : this->volumes)
942 memsize += volume->gpu_memory_used();
943 return memsize;
944}
size_t gpu_memory_used() const
Definition 3DScene.cpp:938

References volumes.

Referenced by log_memory_info(), and total_memory_used().

+ Here is the caller graph for this function:

◆ is_slope_active()

bool Slic3r::GLVolumeCollection::is_slope_active ( ) const
inline
444{ return m_slope.active; }
bool active
Definition 3DScene.hpp:371

References Slic3r::GLVolumeCollection::Slope::active, and m_slope.

Referenced by Slic3r::GUI::GLCanvas3D::Slope::is_used().

+ Here is the caller graph for this function:

◆ load_object()

std::vector< int > Slic3r::GLVolumeCollection::load_object ( const ModelObject model_object,
int  obj_idx,
const std::vector< int > &  instance_idxs 
)
434{
435 std::vector<int> volumes_idx;
436 for (int volume_idx = 0; volume_idx < int(model_object->volumes.size()); ++volume_idx)
437 for (int instance_idx : instance_idxs)
438 volumes_idx.emplace_back(this->GLVolumeCollection::load_object_volume(model_object, obj_idx, volume_idx, instance_idx));
439 return volumes_idx;
440}
GLVolumeCollection()
Definition 3DScene.hpp:383
int load_object_volume(const ModelObject *model_object, int obj_idx, int volume_idx, int instance_idx)
Definition 3DScene.cpp:442

References Slic3r::ModelObject::volumes.

Referenced by Slic3r::GUI::GLCanvas3D::load_object(), and Slic3r::GUI::GCodeViewer::load_shells().

+ Here is the caller graph for this function:

◆ load_object_auxiliary()

void Slic3r::GLVolumeCollection::load_object_auxiliary ( const SLAPrintObject print_object,
int  obj_idx,
const std::vector< std::pair< size_t, size_t > > &  instances,
SLAPrintObjectStep  milestone,
size_t  timestamp 
)
596{
597 if (print_object->get_mesh_to_print() == nullptr)
598 return;
599 const Transform3d mesh_trafo_inv = print_object->trafo().inverse();
600
601 auto add_volume = [this, timestamp](int obj_idx, int inst_idx, const ModelInstance& model_instance, SLAPrintObjectStep step,
602 const TriangleMesh& mesh, const ColorRGBA& color, std::optional<const TriangleMesh> convex_hull = std::nullopt) {
603 if (mesh.empty())
604 return;
605
606 GLVolume& v = *this->volumes.emplace_back(new GLVolume(color));
607#if ENABLE_SMOOTH_NORMALS
608 v.model.init_from(mesh, true);
609#else
610 v.model.init_from(mesh);
611 v.model.set_color(color);
612 v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(std::make_shared<const TriangleMesh>(mesh));
613#endif // ENABLE_SMOOTH_NORMALS
614 v.composite_id = GLVolume::CompositeID(obj_idx, -int(step), inst_idx);
615 v.geometry_id = std::pair<size_t, size_t>(timestamp, model_instance.id().id);
616 if (convex_hull.has_value())
617 v.set_convex_hull(*convex_hull);
618 v.is_modifier = false;
619 v.shader_outside_printer_detection_enabled = (step == slaposSupportTree || step == slaposDrillHoles);
620 v.set_instance_transformation(model_instance.get_transformation());
621 };
622
623 if (milestone == SLAPrintObjectStep::slaposDrillHoles) {
624 if (print_object->get_parts_to_slice().size() > 1) {
625 // Get the mesh.
626 TriangleMesh backend_mesh;
627 std::shared_ptr<const indexed_triangle_set> preview_mesh_ptr = print_object->get_mesh_to_print();
628 if (preview_mesh_ptr != nullptr)
629 backend_mesh = TriangleMesh(*preview_mesh_ptr);
630 if (!backend_mesh.empty()) {
631 backend_mesh.transform(mesh_trafo_inv);
632 TriangleMesh convex_hull = backend_mesh.convex_hull_3d();
633 for (const std::pair<size_t, size_t>& instance_idx : instances) {
634 const ModelInstance& model_instance = *print_object->model_object()->instances[instance_idx.first];
635 add_volume(obj_idx, (int)instance_idx.first, model_instance, slaposDrillHoles, backend_mesh, GLVolume::MODEL_COLOR[0], convex_hull);
636 }
637 }
638 }
639 }
640
641 // Get the support mesh.
642 if (milestone == SLAPrintObjectStep::slaposSupportTree) {
643 TriangleMesh supports_mesh = print_object->support_mesh();
644 if (!supports_mesh.empty()) {
645 supports_mesh.transform(mesh_trafo_inv);
646 TriangleMesh convex_hull = supports_mesh.convex_hull_3d();
647 for (const std::pair<size_t, size_t>& instance_idx : instances) {
648 const ModelInstance& model_instance = *print_object->model_object()->instances[instance_idx.first];
649 add_volume(obj_idx, (int)instance_idx.first, model_instance, slaposSupportTree, supports_mesh, GLVolume::SLA_SUPPORT_COLOR, convex_hull);
650 }
651 }
652 }
653
654 // Get the pad mesh.
655 if (milestone == SLAPrintObjectStep::slaposPad) {
656 TriangleMesh pad_mesh = print_object->pad_mesh();
657 if (!pad_mesh.empty()) {
658 pad_mesh.transform(mesh_trafo_inv);
659 TriangleMesh convex_hull = pad_mesh.convex_hull_3d();
660 for (const std::pair<size_t, size_t>& instance_idx : instances) {
661 const ModelInstance& model_instance = *print_object->model_object()->instances[instance_idx.first];
662 add_volume(obj_idx, (int)instance_idx.first, model_instance, slaposPad, pad_mesh, GLVolume::SLA_PAD_COLOR, convex_hull);
663 }
664 }
665 }
666}
static const ColorRGBA SLA_SUPPORT_COLOR
Definition 3DScene.hpp:58
static const std::array< ColorRGBA, 4 > MODEL_COLOR
Definition 3DScene.hpp:61
static const ColorRGBA SLA_PAD_COLOR
Definition 3DScene.hpp:59
EIGEN_DEVICE_FUNC Transform inverse(TransformTraits traits=(TransformTraits) Mode) const
Definition Transform.h:1202
Eigen::Transform< double, 3, Eigen::Affine, Eigen::DontAlign > Transform3d
Definition Point.hpp:81
SLAPrintObjectStep
Definition SLAPrint.hpp:27
@ slaposPad
Definition SLAPrint.hpp:34
@ slaposDrillHoles
Definition SLAPrint.hpp:30
@ slaposSupportTree
Definition SLAPrint.hpp:33
IGL_INLINE void convex_hull(const Eigen::MatrixBase< DerivedV > &V, Eigen::PlainObjectBase< DerivedW > &W, Eigen::PlainObjectBase< DerivedG > &G)
Definition convex_hull.cpp:21
Coord step(const Coord &crd, Dir d)
Definition MarchingSquares.hpp:137

References Slic3r::GLVolume::composite_id, Slic3r::TriangleMesh::convex_hull_3d(), Slic3r::TriangleMesh::empty(), Slic3r::GLVolume::geometry_id, Slic3r::SLAPrintObject::get_mesh_to_print(), Slic3r::SLAPrintObject::get_parts_to_slice(), Slic3r::GUI::GLModel::init_from(), Slic3r::ModelObject::instances, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::inverse(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::GLVolume::MODEL_COLOR, Slic3r::PrintObjectBase::model_object(), Slic3r::SLAPrintObject::pad_mesh(), Slic3r::GUI::GLModel::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_instance_transformation(), Slic3r::GLVolume::SLA_PAD_COLOR, Slic3r::GLVolume::SLA_SUPPORT_COLOR, Slic3r::slaposDrillHoles, Slic3r::slaposPad, Slic3r::slaposSupportTree, Slic3r::SLAPrintObject::support_mesh(), Slic3r::SLAPrintObject::trafo(), Slic3r::TriangleMesh::transform(), and volumes.

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

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

◆ load_object_volume()

int Slic3r::GLVolumeCollection::load_object_volume ( const ModelObject model_object,
int  obj_idx,
int  volume_idx,
int  instance_idx 
)
447{
448 const ModelVolume *model_volume = model_object->volumes[volume_idx];
449 const int extruder_id = model_volume->extruder_id();
450 const ModelInstance *instance = model_object->instances[instance_idx];
451 std::shared_ptr<const TriangleMesh> mesh = model_volume->mesh_ptr();
452 this->volumes.emplace_back(new GLVolume());
453 GLVolume& v = *this->volumes.back();
454 v.set_color(color_from_model_volume(*model_volume));
455 // apply printable value from the instance
456 v.printable = instance->printable;
457#if ENABLE_SMOOTH_NORMALS
458 v.model.init_from(*mesh, true);
460 v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(mesh);
461#else
462 v.model.init_from(*mesh);
464 v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(mesh);
465#endif // ENABLE_SMOOTH_NORMALS
466 v.composite_id = GLVolume::CompositeID(obj_idx, volume_idx, instance_idx);
467 if (model_volume->is_model_part()) {
468 // GLVolume will reference a convex hull from model_volume!
469 v.set_convex_hull(model_volume->get_convex_hull_shared_ptr());
470 if (extruder_id != -1)
471 v.extruder_id = extruder_id;
472 }
473 v.is_modifier = !model_volume->is_model_part();
474 v.shader_outside_printer_detection_enabled = model_volume->is_model_part();
475 v.set_instance_transformation(instance->get_transformation());
476 v.set_volume_transformation(model_volume->get_transformation());
477
478 return int(this->volumes.size() - 1);
479}
bool m_use_raycasters
Definition 3DScene.hpp:378
ColorRGBA color_from_model_volume(const ModelVolume &model_volume)
Definition 3DScene.cpp:277

References Slic3r::color_from_model_volume(), Slic3r::GLVolume::composite_id, Slic3r::ModelVolume::extruder_id(), Slic3r::GLVolume::extruder_id, Slic3r::ModelVolume::get_convex_hull_shared_ptr(), Slic3r::ModelVolume::get_transformation(), Slic3r::ModelInstance::get_transformation(), Slic3r::GUI::GLModel::init_from(), Slic3r::ModelObject::instances, Slic3r::ModelVolume::is_model_part(), m_use_raycasters, Slic3r::ModelVolume::mesh_ptr(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::ModelInstance::printable, Slic3r::GLVolume::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_instance_transformation(), Slic3r::GLVolume::set_volume_transformation(), Slic3r::ModelObject::volumes, and volumes.

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

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

◆ load_wipe_tower_preview()

int Slic3r::GLVolumeCollection::load_wipe_tower_preview ( float  pos_x,
float  pos_y,
float  width,
float  depth,
const std::vector< std::pair< float, float > > &  z_and_depth_pairs,
float  height,
float  cone_angle,
float  rotation_angle,
bool  size_unknown,
float  brim_width 
)
490{
491 if (height == 0.0f)
492 height = 0.1f;
493
494 static const float brim_height = 0.2f;
495// const float scaled_brim_height = brim_height / height;
496
497 TriangleMesh mesh;
498 ColorRGBA color = ColorRGBA::DARK_YELLOW();
499
500 // In case we don't know precise dimensions of the wipe tower yet, we'll draw
501 // the box with different color with one side jagged:
502 if (size_unknown) {
503 color.r(0.9f);
504 color.g(0.6f);
505
506 // Too narrow tower would interfere with the teeth. The estimate is not precise anyway.
507 depth = std::max(depth, 10.f);
508 float min_width = 30.f;
509
510 // We'll now create the box with jagged edge. y-coordinates of the pre-generated model
511 // are shifted so that the front edge has y=0 and centerline of the back edge has y=depth:
512 float out_points_idx[][3] = { { 0, -depth, 0 }, { 0, 0, 0 }, { 38.453f, 0, 0 }, { 61.547f, 0, 0 }, { 100.0f, 0, 0 }, { 100.0f, -depth, 0 }, { 55.7735f, -10.0f, 0 }, { 44.2265f, 10.0f, 0 },
513 { 38.453f, 0, 1 }, { 0, 0, 1 }, { 0, -depth, 1 }, { 100.0f, -depth, 1 }, { 100.0f, 0, 1 }, { 61.547f, 0, 1 }, { 55.7735f, -10.0f, 1 }, { 44.2265f, 10.0f, 1 } };
514 static constexpr const int out_facets_idx[][3] = {
515 { 0, 1, 2 }, { 3, 4, 5 }, { 6, 5, 0 }, { 3, 5, 6 }, { 6, 2, 7 }, { 6, 0, 2 }, { 8, 9, 10 }, { 11, 12, 13 }, { 10, 11, 14 }, { 14, 11, 13 }, { 15, 8, 14 },
516 { 8, 10, 14 }, { 3, 12, 4 }, { 3, 13, 12 }, { 6, 13, 3 }, { 6, 14, 13 }, { 7, 14, 6 }, { 7, 15, 14 }, { 2, 15, 7 }, { 2, 8, 15 }, { 1, 8, 2 }, { 1, 9, 8 },
517 { 0, 9, 1 }, { 0, 10, 9 }, { 5, 10, 0 }, { 5, 11, 10 }, { 4, 11, 5 }, { 4, 12, 11 } };
519 for (int i = 0; i < 16; ++i)
520 its.vertices.emplace_back(out_points_idx[i][0] / (100.f / min_width), out_points_idx[i][1] + depth, out_points_idx[i][2]);
521 its.indices.reserve(28);
522 for (const int* face : out_facets_idx)
523 its.indices.emplace_back(face);
524 TriangleMesh tooth_mesh(std::move(its));
525
526 // We have the mesh ready. It has one tooth and width of min_width. We will now
527 // append several of these together until we are close to the required width
528 // of the block. Than we can scale it precisely.
529 size_t n = std::max(1, int(width / min_width)); // How many shall be merged?
530 for (size_t i = 0; i < n; ++i) {
531 mesh.merge(tooth_mesh);
532 tooth_mesh.translate(min_width, 0.f, 0.f);
533 }
534
535 mesh.scale(Vec3f(width / (n * min_width), 1.f, height)); // Scaling to proper width
536 }
537 else {
538 for (size_t i=1; i<z_and_depth_pairs.size(); ++i) {
539 TriangleMesh m = make_cube(width, z_and_depth_pairs[i-1].second, z_and_depth_pairs[i].first-z_and_depth_pairs[i-1].first);
540 m.translate(0.f, -z_and_depth_pairs[i-1].second/2.f + z_and_depth_pairs[0].second/2.f, z_and_depth_pairs[i-1].first);
541 mesh.merge(m);
542 }
543 }
544
545 // We'll make another mesh to show the brim (fixed layer height):
546 TriangleMesh brim_mesh = make_cube(width + 2.f * brim_width, depth + 2.f * brim_width, 0.2f);
547 brim_mesh.translate(-brim_width, -brim_width, 0.f);
548 mesh.merge(brim_mesh);
549
550 // Now the stabilization cone and its base.
551 const auto [R, scale_x] = WipeTower::get_wipe_tower_cone_base(width, height, depth, cone_angle);
552 if (R > 0.) {
553 TriangleMesh cone_mesh(its_make_cone(R, height));
554 cone_mesh.scale(Vec3f(1.f/scale_x, 1.f, 1.f));
555
556 TriangleMesh disk_mesh(its_make_cylinder(R, brim_height));
557 disk_mesh.scale(Vec3f(1. / scale_x, 1., 1.)); // Now it matches the base, which may be elliptic.
558 disk_mesh.scale(Vec3f(1.f + scale_x*brim_width/R, 1.f + brim_width/R, 1.f)); // Scale so the brim is not deformed.
559 cone_mesh.merge(disk_mesh);
560 cone_mesh.translate(width / 2., depth / 2., 0.);
561 mesh.merge(cone_mesh);
562 }
563
564
565 volumes.emplace_back(new GLVolume(color));
566 GLVolume& v = *volumes.back();
567#if ENABLE_OPENGL_ES
568 if (out_mesh != nullptr)
569 *out_mesh = mesh;
570#endif // ENABLE_OPENGL_ES
571 v.model.init_from(mesh);
572 v.model.set_color(color);
573 v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(std::make_shared<const TriangleMesh>(mesh));
574 v.set_convex_hull(mesh.convex_hull_3d());
575 v.set_volume_offset(Vec3d(pos_x, pos_y, 0.0));
576 v.set_volume_rotation(Vec3d(0., 0., (M_PI / 180.) * rotation_angle));
577 v.composite_id = GLVolume::CompositeID(INT_MAX, 0, 0);
578 v.geometry_id.first = 0;
579 v.geometry_id.second = wipe_tower_instance_id().id;
580 v.is_wipe_tower = true;
581 v.shader_outside_printer_detection_enabled = !size_unknown;
582 return int(volumes.size() - 1);
583}
#define M_PI
Definition ExtrusionSimulator.cpp:20
static const ColorRGBA DARK_YELLOW()
Definition Color.hpp:121
size_t id
Definition ObjectID.hpp:37
static std::pair< double, double > get_wipe_tower_cone_base(double width, double height, double depth, double angle_deg)
Definition WipeTower.cpp:1332
coord_t height(const BoundingBox &box)
Definition Arrange.cpp:540
ObjectID wipe_tower_instance_id()
Definition ObjectID.cpp:14
TriangleMesh make_cube(double x, double y, double z)
Definition TriangleMesh.hpp:328
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:49
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:52
indexed_triangle_set its_make_cone(double r, double h, double fa)
Definition TriangleMesh.cpp:1042
indexed_triangle_set its_make_cylinder(double r, double h, double fa)
Definition TriangleMesh.cpp:955
Definition stl.h:157
std::vector< stl_vertex > vertices
Definition stl.h:165
std::vector< stl_triangle_vertex_indices > indices
Definition stl.h:164

References Slic3r::GLVolume::composite_id, Slic3r::TriangleMesh::convex_hull_3d(), Slic3r::ColorRGBA::DARK_YELLOW(), Slic3r::ColorRGBA::g(), Slic3r::GLVolume::geometry_id, Slic3r::WipeTower::get_wipe_tower_cone_base(), Slic3r::ObjectID::id, indexed_triangle_set::indices, Slic3r::GUI::GLModel::init_from(), Slic3r::its_make_cone(), Slic3r::its_make_cylinder(), M_PI, Slic3r::make_cube(), Slic3r::TriangleMesh::merge(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::ColorRGBA::r(), Slic3r::TriangleMesh::scale(), Slic3r::GUI::GLModel::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_volume_offset(), Slic3r::GLVolume::set_volume_rotation(), Slic3r::TriangleMesh::translate(), indexed_triangle_set::vertices, and Slic3r::wipe_tower_instance_id().

Referenced by Slic3r::GUI::GCodeViewer::load_shells(), and Slic3r::GUI::GLCanvas3D::reload_scene().

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

◆ log_memory_info()

std::string Slic3r::GLVolumeCollection::log_memory_info ( ) const
947{
948 return " (GLVolumeCollection RAM: " + format_memsize_MB(this->cpu_memory_used()) + " GPU: " + format_memsize_MB(this->gpu_memory_used()) + " Both: " + format_memsize_MB(this->gpu_memory_used()) + ")";
949}
std::string format_memsize_MB(size_t n)
Definition utils.cpp:1044

References cpu_memory_used(), Slic3r::format_memsize_MB(), and gpu_memory_used().

+ Here is the call graph for this function:

◆ new_nontoolpath_volume()

GLVolume * Slic3r::GLVolumeCollection::new_nontoolpath_volume ( const ColorRGBA rgba)
676{
677 GLVolume* out = new GLVolume(rgba);
678 out->is_extrusion_path = false;
679 this->volumes.emplace_back(out);
680 return out;
681}

References volumes.

Referenced by new_toolpath_volume().

+ Here is the caller graph for this function:

◆ new_toolpath_volume()

GLVolume * Slic3r::GLVolumeCollection::new_toolpath_volume ( const ColorRGBA rgba)
669{
670 GLVolume* out = new_nontoolpath_volume(rgba);
671 out->is_extrusion_path = true;
672 return out;
673}
GLVolume * new_nontoolpath_volume(const ColorRGBA &rgba)
Definition 3DScene.cpp:675

References new_nontoolpath_volume().

+ Here is the call graph for this function:

◆ operator=()

GLVolumeCollection & Slic3r::GLVolumeCollection::operator= ( const GLVolumeCollection )
private

◆ render()

void Slic3r::GLVolumeCollection::render ( GLVolumeCollection::ERenderType  type,
bool  disable_cullface,
const Transform3d view_matrix,
const Transform3d projection_matrix,
std::function< bool(const GLVolume &)>  filter_func = std::function<bool(const GLVolume&)>() 
) const
718{
719 GLVolumeWithIdAndZList to_render = volumes_to_render(volumes, type, view_matrix, filter_func);
720 if (to_render.empty())
721 return;
722
723 GLShaderProgram* shader = GUI::wxGetApp().get_current_shader();
724 if (shader == nullptr)
725 return;
726
727 GLShaderProgram* sink_shader = GUI::wxGetApp().get_shader("flat");
728#if ENABLE_GL_CORE_PROFILE
729 GLShaderProgram* edges_shader = GUI::OpenGLManager::get_gl_info().is_core_profile() ? GUI::wxGetApp().get_shader("dashed_thick_lines") : GUI::wxGetApp().get_shader("flat");
730#else
731 GLShaderProgram* edges_shader = GUI::wxGetApp().get_shader("flat");
732#endif // ENABLE_GL_CORE_PROFILE
733
734 if (type == ERenderType::Transparent) {
735 glsafe(::glEnable(GL_BLEND));
736 glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
737 glsafe(::glDepthMask(false));
738 }
739
740 glsafe(::glCullFace(GL_BACK));
741 if (disable_cullface)
742 glsafe(::glDisable(GL_CULL_FACE));
743
744 for (GLVolumeWithIdAndZ& volume : to_render) {
745 const Transform3d& world_matrix = volume.first->world_matrix();
746 volume.first->set_render_color(true);
747
748 // render sinking contours of non-hovered volumes
749 shader->stop_using();
750 if (sink_shader != nullptr) {
751 sink_shader->start_using();
753 if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
754 volume.first->hover == GLVolume::HS_None && !volume.first->force_sinking_contours) {
755 volume.first->render_sinking_contours();
756 }
757 }
758 sink_shader->stop_using();
759 }
760 shader->start_using();
761
762 shader->set_uniform("z_range", m_z_range);
763 shader->set_uniform("clipping_plane", m_clipping_plane);
764 shader->set_uniform("use_color_clip_plane", m_use_color_clip_plane);
765 shader->set_uniform("color_clip_plane", m_color_clip_plane);
766 shader->set_uniform("uniform_color_clip_plane_1", m_color_clip_plane_colors[0]);
767 shader->set_uniform("uniform_color_clip_plane_2", m_color_clip_plane_colors[1]);
768 shader->set_uniform("print_volume.type", static_cast<int>(m_print_volume.type));
769 shader->set_uniform("print_volume.xy_data", m_print_volume.data);
770 shader->set_uniform("print_volume.z_data", m_print_volume.zs);
771 shader->set_uniform("volume_world_matrix", world_matrix);
772 shader->set_uniform("slope.actived", m_slope.active && !volume.first->is_modifier && !volume.first->is_wipe_tower);
773 shader->set_uniform("slope.volume_world_normal_matrix", static_cast<Matrix3f>(world_matrix.matrix().block(0, 0, 3, 3).inverse().transpose().cast<float>()));
774 shader->set_uniform("slope.normal_z", m_slope.normal_z);
775
776#if ENABLE_ENVIRONMENT_MAP
777 unsigned int environment_texture_id = GUI::wxGetApp().plater()->get_environment_texture_id();
778 bool use_environment_texture = environment_texture_id > 0 && GUI::wxGetApp().app_config->get_bool("use_environment_map");
779 shader->set_uniform("use_environment_tex", use_environment_texture);
780 if (use_environment_texture)
781 glsafe(::glBindTexture(GL_TEXTURE_2D, environment_texture_id));
782#endif // ENABLE_ENVIRONMENT_MAP
783 glcheck();
784
785 volume.first->model.set_color(volume.first->render_color);
786 const Transform3d model_matrix = world_matrix;
787 shader->set_uniform("view_model_matrix", view_matrix * model_matrix);
788 shader->set_uniform("projection_matrix", projection_matrix);
789 const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * model_matrix.matrix().block(0, 0, 3, 3).inverse().transpose();
790 shader->set_uniform("view_normal_matrix", view_normal_matrix);
791 volume.first->render();
792
793#if ENABLE_ENVIRONMENT_MAP
794 if (use_environment_texture)
795 glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
796#endif // ENABLE_ENVIRONMENT_MAP
797
798 glsafe(::glBindBuffer(GL_ARRAY_BUFFER, 0));
799 glsafe(::glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0));
800 }
801
803 shader->stop_using();
804 if (sink_shader != nullptr) {
805 sink_shader->start_using();
806 for (GLVolumeWithIdAndZ& volume : to_render) {
807 // render sinking contours of hovered/displaced volumes
808 if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
809 (volume.first->hover != GLVolume::HS_None || volume.first->force_sinking_contours)) {
810 glsafe(::glDepthFunc(GL_ALWAYS));
811 volume.first->render_sinking_contours();
812 glsafe(::glDepthFunc(GL_LESS));
813 }
814 }
815 sink_shader->start_using();
816 }
817 shader->start_using();
818 }
819
820 shader->stop_using();
821 if (edges_shader != nullptr) {
822 edges_shader->start_using();
823 if (m_show_non_manifold_edges && GUI::wxGetApp().app_config->get_bool("non_manifold_edges")) {
824 for (GLVolumeWithIdAndZ& volume : to_render) {
825 volume.first->render_non_manifold_edges();
826 }
827 }
828 edges_shader->stop_using();
829 }
830 shader->start_using();
831
832 if (disable_cullface)
833 glsafe(::glEnable(GL_CULL_FACE));
834
835 if (type == ERenderType::Transparent) {
836 glsafe(::glDisable(GL_BLEND));
837 glsafe(::glDepthMask(true));
838 }
839}
#define glcheck()
Definition 3DScene.hpp:26
#define glsafe(cmd)
Definition 3DScene.hpp:25
PrintVolume m_print_volume
Definition 3DScene.hpp:354
std::array< double, 4 > m_color_clip_plane
Definition 3DScene.hpp:364
bool m_show_sinking_contours
Definition 3DScene.hpp:376
std::array< ColorRGBA, 2 > m_color_clip_plane_colors
Definition 3DScene.hpp:366
int type
Definition 3DScene.hpp:342
bool m_use_color_clip_plane
Definition 3DScene.hpp:365
std::array< float, 2 > zs
Definition 3DScene.hpp:350
bool m_show_non_manifold_edges
Definition 3DScene.hpp:377
std::array< float, 4 > data
Definition 3DScene.hpp:348
@ HS_None
Definition 3DScene.hpp:65
bool is_core_profile() const
Definition OpenGLManager.hpp:52
static const GLInfo & get_gl_info()
Definition OpenGLManager.hpp:141
std::pair< GLVolume *, std::pair< unsigned int, double > > GLVolumeWithIdAndZ
Definition 3DScene.hpp:326
GLVolumeWithIdAndZList volumes_to_render(const GLVolumePtrs &volumes, GLVolumeCollection::ERenderType type, const Transform3d &view_matrix, std::function< bool(const GLVolume &)> filter_func)
Definition 3DScene.cpp:683
Eigen::Matrix< double, 3, 3, Eigen::DontAlign > Matrix3d
Definition Point.hpp:71
Eigen::Matrix< float, 3, 3, Eigen::DontAlign > Matrix3f
Definition Point.hpp:70
std::vector< GLVolumeWithIdAndZ > GLVolumeWithIdAndZList
Definition 3DScene.hpp:327

References Slic3r::GLVolumeCollection::Slope::active, Slic3r::GLVolumeCollection::PrintVolume::data, Slic3r::GUI::OpenGLManager::get_gl_info(), glcheck, glsafe, Slic3r::GLVolume::HS_None, Slic3r::GUI::OpenGLManager::GLInfo::is_core_profile(), m_clipping_plane, m_color_clip_plane, m_color_clip_plane_colors, m_print_volume, m_show_non_manifold_edges, m_show_sinking_contours, m_slope, m_use_color_clip_plane, m_z_range, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::matrix(), Slic3r::GLVolumeCollection::Slope::normal_z, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), Transparent, Slic3r::GLVolumeCollection::PrintVolume::type, volumes, Slic3r::volumes_to_render(), and Slic3r::GLVolumeCollection::PrintVolume::zs.

Referenced by Slic3r::GUI::GCodeViewer::render_shells(), and Slic3r::GUI::GLGizmoSlaBase::render_volumes().

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

◆ reset_outside_state()

void Slic3r::GLVolumeCollection::reset_outside_state ( )
842{
843 for (GLVolume* volume : this->volumes) {
844 if (volume != nullptr)
845 volume->is_outside = false;
846 }
847}

References volumes.

◆ set_clipping_plane()

void Slic3r::GLVolumeCollection::set_clipping_plane ( const std::array< double, 4 > &  coeffs)
inline
431{ m_clipping_plane = coeffs; }

References m_clipping_plane.

Referenced by Slic3r::GUI::GLGizmoSlaBase::render_volumes().

+ Here is the caller graph for this function:

◆ set_color_clip_plane()

void Slic3r::GLVolumeCollection::set_color_clip_plane ( const Vec3d cp_normal,
double  offset 
)
inline
437 {
438 for (int i = 0; i < 3; ++i)
439 m_color_clip_plane[i] = -cp_normal[i];
441 }
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, ClipperLib::JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:416

References m_color_clip_plane, and Slic3r::offset().

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

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

◆ set_color_clip_plane_colors()

void Slic3r::GLVolumeCollection::set_color_clip_plane_colors ( const std::array< ColorRGBA, 2 > &  colors)
inline
442{ m_color_clip_plane_colors = colors; }

References m_color_clip_plane_colors.

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

+ Here is the caller graph for this function:

◆ set_default_slope_normal_z()

void Slic3r::GLVolumeCollection::set_default_slope_normal_z ( )
inline
449{ m_slope.normal_z = -::cos(Geometry::deg2rad(90.0f - 45.0f)); }
EIGEN_DEVICE_FUNC const CosReturnType cos() const
Definition ArrayCwiseUnaryOps.h:202
constexpr T deg2rad(const T angle)
Definition Geometry.hpp:289

References cos(), Slic3r::Geometry::deg2rad(), m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.

Referenced by GLVolumeCollection().

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

◆ set_print_volume()

void Slic3r::GLVolumeCollection::set_print_volume ( const PrintVolume print_volume)
inline
428{ m_print_volume = print_volume; }

References m_print_volume.

◆ set_range()

void Slic3r::GLVolumeCollection::set_range ( double  low,
double  high 
)
inline
425{ for (GLVolume* vol : this->volumes) vol->set_range(low, high); }
void set_range(double low, double high)
Definition 3DScene.hpp:425

References volumes.

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

+ Here is the caller graph for this function:

◆ set_show_non_manifold_edges()

void Slic3r::GLVolumeCollection::set_show_non_manifold_edges ( bool  show)
inline

◆ set_show_sinking_contours()

void Slic3r::GLVolumeCollection::set_show_sinking_contours ( bool  show)
inline

◆ set_slope_active()

void Slic3r::GLVolumeCollection::set_slope_active ( bool  active)
inline
445{ m_slope.active = active; }

References Slic3r::GLVolumeCollection::Slope::active, and m_slope.

Referenced by Slic3r::GUI::GLCanvas3D::Slope::use().

+ Here is the caller graph for this function:

◆ set_slope_normal_z()

void Slic3r::GLVolumeCollection::set_slope_normal_z ( float  normal_z)
inline
448{ m_slope.normal_z = normal_z; }

References m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.

Referenced by Slic3r::GUI::GLCanvas3D::Slope::set_normal_angle().

+ Here is the caller graph for this function:

◆ set_use_color_clip_plane()

void Slic3r::GLVolumeCollection::set_use_color_clip_plane ( bool  use)
inline
436{ m_use_color_clip_plane = use; }

References m_use_color_clip_plane.

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

+ Here is the caller graph for this function:

◆ set_use_raycasters()

void Slic3r::GLVolumeCollection::set_use_raycasters ( bool  value)
inline
427{ m_use_raycasters = value; }

References m_use_raycasters.

Referenced by Slic3r::GUI::GCodeViewer::GCodeViewer().

+ Here is the caller graph for this function:

◆ set_z_range()

void Slic3r::GLVolumeCollection::set_z_range ( float  min_z,
float  max_z 
)
inline
430{ m_z_range[0] = min_z; m_z_range[1] = max_z; }

References m_z_range.

◆ total_memory_used()

size_t Slic3r::GLVolumeCollection::total_memory_used ( ) const
inline
464{ return this->cpu_memory_used() + this->gpu_memory_used(); }

References cpu_memory_used(), and gpu_memory_used().

+ Here is the call graph for this function:

◆ update_colors_by_extruder()

void Slic3r::GLVolumeCollection::update_colors_by_extruder ( const DynamicPrintConfig config)
850{
851 using ColorItem = std::pair<std::string, ColorRGB>;
852 std::vector<ColorItem> colors;
853
854 if (static_cast<PrinterTechnology>(config->opt_int("printer_technology")) == ptSLA) {
855 const std::string& txt_color = config->opt_string("material_colour").empty() ?
856 print_config_def.get("material_colour")->get_default_value<ConfigOptionString>()->value :
857 config->opt_string("material_colour");
858 ColorRGB rgb;
859 if (decode_color(txt_color, rgb))
860 colors.push_back({ txt_color, rgb });
861 }
862 else {
863 const ConfigOptionStrings* extruders_opt = dynamic_cast<const ConfigOptionStrings*>(config->option("extruder_colour"));
864 if (extruders_opt == nullptr)
865 return;
866
867 const ConfigOptionStrings* filamemts_opt = dynamic_cast<const ConfigOptionStrings*>(config->option("filament_colour"));
868 if (filamemts_opt == nullptr)
869 return;
870
871 size_t colors_count = std::max(extruders_opt->values.size(), filamemts_opt->values.size());
872 if (colors_count == 0)
873 return;
874 colors.resize(colors_count);
875
876 for (unsigned int i = 0; i < colors_count; ++i) {
877 const std::string& ext_color = config->opt_string("extruder_colour", i);
878 ColorRGB rgb;
879 if (decode_color(ext_color, rgb))
880 colors[i] = { ext_color, rgb };
881 else {
882 const std::string& fil_color = config->opt_string("filament_colour", i);
883 if (decode_color(fil_color, rgb))
884 colors[i] = { fil_color, rgb };
885 }
886 }
887 }
888
889 for (GLVolume* volume : volumes) {
890 if (volume == nullptr || volume->is_modifier || volume->is_wipe_tower || volume->is_sla_pad() || volume->is_sla_support())
891 continue;
892
893 int extruder_id = volume->extruder_id - 1;
894 if (extruder_id < 0 || (int)colors.size() <= extruder_id)
895 extruder_id = 0;
896
897 const ColorItem& color = colors[extruder_id];
898 if (!color.first.empty())
899 volume->color = to_rgba(color.second, volume->color.a());
900 }
901}
const ConfigOptionDef * get(const t_config_option_key &opt_key) const
Definition Config.hpp:2069
const T * get_default_value() const
Definition Config.hpp:1828
ColorRGBA to_rgba(const ColorRGB &other_rgb)
Definition Color.cpp:379
bool decode_color(const std::string &color_in, ColorRGB &color_out)
Definition Color.cpp:311
PrinterTechnology
Definition Config.hpp:205
@ ptSLA
Definition Config.hpp:209
const PrintConfigDef print_config_def
Definition PrintConfig.cpp:4288

References Slic3r::decode_color(), Slic3r::ConfigDef::get(), Slic3r::ConfigOptionDef::get_default_value(), Slic3r::ConfigBase::opt_int(), Slic3r::ConfigBase::opt_string(), Slic3r::ConfigBase::option(), Slic3r::print_config_def, Slic3r::ptSLA, Slic3r::to_rgba(), Slic3r::ConfigOptionVector< T >::values, and volumes.

Referenced by Slic3r::GUI::GCodeViewer::update_shells_color_by_extruder(), and Slic3r::GUI::GLCanvas3D::update_volumes_colors_by_extruder().

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

Member Data Documentation

◆ m_clipping_plane

std::array<double, 4> Slic3r::GLVolumeCollection::m_clipping_plane
private

◆ m_color_clip_plane

std::array<double, 4> Slic3r::GLVolumeCollection::m_color_clip_plane
private

Referenced by render(), and set_color_clip_plane().

◆ m_color_clip_plane_colors

std::array<ColorRGBA, 2> Slic3r::GLVolumeCollection::m_color_clip_plane_colors { ColorRGBA::RED(), ColorRGBA::BLUE() }
private

◆ m_print_volume

PrintVolume Slic3r::GLVolumeCollection::m_print_volume
private

Referenced by render(), and set_print_volume().

◆ m_show_non_manifold_edges

bool Slic3r::GLVolumeCollection::m_show_non_manifold_edges { true }
private

◆ m_show_sinking_contours

bool Slic3r::GLVolumeCollection::m_show_sinking_contours { false }
private

◆ m_slope

◆ m_use_color_clip_plane

bool Slic3r::GLVolumeCollection::m_use_color_clip_plane { false }
private

Referenced by render(), and set_use_color_clip_plane().

◆ m_use_raycasters

bool Slic3r::GLVolumeCollection::m_use_raycasters { true }
private

◆ m_z_range

std::array<float, 2> Slic3r::GLVolumeCollection::m_z_range
private

Referenced by get_z_range(), render(), and set_z_range().

◆ volumes

GLVolumePtrs Slic3r::GLVolumeCollection::volumes

Referenced by Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLCanvas3D::_picking_pass(), Slic3r::GUI::GLCanvas3D::_rectangular_selection_picking_pass(), Slic3r::GUI::GLCanvas3D::_render_thumbnail_internal(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), clear(), cpu_memory_used(), Slic3r::GUI::create_meshes(), Slic3r::GUI::GLCanvas3D::detect_sla_view_type(), 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(), empty(), Slic3r::GUI::GLCanvas3D::ensure_on_bed(), Slic3r::GUI::generate_thumbnail_from_model(), get_current_print_zs(), Slic3r::GUI::get_first_hovered_gl_volume(), Slic3r::GUI::get_selected_gl_volume(), Slic3r::GUI::GLCanvas3D::get_volumes_count(), Slic3r::GUI::GLCanvas3D::get_wipe_tower_info(), gpu_memory_used(), Slic3r::GUI::GLCanvas3D::is_object_sinking(), load_object_auxiliary(), load_object_volume(), Slic3r::GUI::GCodeViewer::load_shells(), new_nontoolpath_volume(), Slic3r::GUI::GLCanvas3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::on_mouse_surface_drag(), Slic3r::GUI::GLGizmoSlaBase::register_volume_raycasters_for_picking(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::Labels::render(), render(), Slic3r::GUI::GLGizmoSlaBase::render_volumes(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), reset_outside_state(), set_range(), Slic3r::GUI::GLCanvas3D::set_sla_view_type(), Slic3r::GUI::GLCanvas3D::set_sla_view_type(), Slic3r::GUI::GLCanvas3D::toggle_model_objects_visibility(), Slic3r::GUI::GLCanvas3D::toggle_sla_auxiliaries_visibility(), Slic3r::GUI::GLGizmoSlaBase::unproject_on_mesh(), update_colors_by_extruder(), Slic3r::GUI::GLCanvas3D::update_instance_printable_state_for_object(), Slic3r::GUI::GLCanvas3D::update_sequential_clearance(), Slic3r::GUI::GLGizmoSlaBase::update_volumes(), and Slic3r::GUI::GLCanvas3D::volumes_bounding_box().


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