OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::SLAPrintObject::SliceRecord Class Reference

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

Collaboration diagram for Slic3r::SLAPrintObject::SliceRecord:

Public Member Functions

 SliceRecord (coord_t key, float slicez, float height)
coord_t print_level () const
float slice_level () const
float layer_height () const
bool is_valid () const
const SLAPrintObject * print_obj () const
void set_model_slice_idx (const SLAPrintObject &po, size_t id)
void set_support_slice_idx (const SLAPrintObject &po, size_t id)
const ExPolygons & get_slice (SliceOrigin o) const
size_t get_slice_idx (SliceOrigin o) const

Static Public Attributes

static const size_t NONE = size_t(-1)
static const SliceRecord EMPTY

Private Attributes

coord_t m_print_z = 0
float m_slice_z = 0.f
float m_height = 0.f
size_t m_model_slices_idx = NONE
size_t m_support_slices_idx = NONE
const SLAPrintObject * m_po = nullptr

Detailed Description

Constructor & Destructor Documentation

◆ SliceRecord()

Slic3r::SLAPrintObject::SliceRecord::SliceRecord ( coord_t key,
float slicez,
float height )
inline
154 :
155 m_print_z(key), m_slice_z(slicez), m_height(height) {}
coord_t m_print_z
Definition SLAPrint.hpp:144
float m_height
Definition SLAPrint.hpp:146
float m_slice_z
Definition SLAPrint.hpp:145

References m_height, m_print_z, and m_slice_z.

Member Function Documentation

◆ get_slice()

const ExPolygons & Slic3r::SliceRecord::get_slice ( SliceOrigin o) const
1118{
1119 size_t idx = o == soModel ? m_model_slices_idx : m_support_slices_idx;
1120
1121 if(m_po == nullptr) return EMPTY_SLICE;
1122
1123 const std::vector<ExPolygons>& v = o == soModel? m_po->get_model_slices() :
1124 m_po->get_support_slices();
1125
1126 return idx >= v.size() ? EMPTY_SLICE : v[idx];
1127}
size_t m_support_slices_idx
Definition SLAPrint.hpp:149
const SLAPrintObject * m_po
Definition SLAPrint.hpp:150
size_t m_model_slices_idx
Definition SLAPrint.hpp:148
const ExPolygons EMPTY_SLICE
Definition SLAPrint.cpp:1099
@ soModel
Definition SLAPrint.hpp:63

References m_model_slices_idx, m_po, m_support_slices_idx, and Slic3r::soModel.

Referenced by Slic3r::GUI::GLCanvas3D::_render_sla_slices(), and Slic3r::get_all_polygons().

Here is the caller graph for this function:

◆ get_slice_idx()

size_t Slic3r::SLAPrintObject::SliceRecord::get_slice_idx ( SliceOrigin o) const
inline

◆ is_valid()

bool Slic3r::SLAPrintObject::SliceRecord::is_valid ( ) const
inline
166{ return m_po && ! std::isnan(m_slice_z); }

References m_po, and m_slice_z.

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

Here is the caller graph for this function:

◆ layer_height()

float Slic3r::SLAPrintObject::SliceRecord::layer_height ( ) const
inline
164{ return m_height; }

References m_height.

◆ print_level()

coord_t Slic3r::SLAPrintObject::SliceRecord::print_level ( ) const
inline
158{ return m_print_z; }

References m_print_z.

Referenced by Slic3r::SLAPrintObject::level().

Here is the caller graph for this function:

◆ print_obj()

const SLAPrintObject * Slic3r::SLAPrintObject::SliceRecord::print_obj ( ) const
inline
168{ return m_po; }

References Slic3r::SLAPrintObject::SLAPrintObject(), and m_po.

Referenced by Slic3r::get_all_polygons().

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

◆ set_model_slice_idx()

void Slic3r::SLAPrintObject::SliceRecord::set_model_slice_idx ( const SLAPrintObject & po,
size_t id )
inline
171 {
172 m_po = &po; m_model_slices_idx = id;
173 }

References Slic3r::SLAPrintObject::SLAPrintObject(), Slic3r::PrintObjectBaseWithState< SLAPrint, SLAPrintObjectStep, slaposCount >::id(), m_model_slices_idx, and m_po.

Here is the call graph for this function:

◆ set_support_slice_idx()

void Slic3r::SLAPrintObject::SliceRecord::set_support_slice_idx ( const SLAPrintObject & po,
size_t id )
inline
175 {
177 }

References Slic3r::SLAPrintObject::SLAPrintObject(), Slic3r::PrintObjectBaseWithState< SLAPrint, SLAPrintObjectStep, slaposCount >::id(), m_po, and m_support_slices_idx.

Here is the call graph for this function:

◆ slice_level()

float Slic3r::SLAPrintObject::SliceRecord::slice_level ( ) const
inline
161{ return m_slice_z; }

References m_slice_z.

Referenced by Slic3r::SLAPrintObject::level().

Here is the caller graph for this function:

Member Data Documentation

◆ EMPTY

◆ m_height

float Slic3r::SLAPrintObject::SliceRecord::m_height = 0.f
private

Referenced by SliceRecord(), and layer_height().

◆ m_model_slices_idx

size_t Slic3r::SLAPrintObject::SliceRecord::m_model_slices_idx = NONE
private

◆ m_po

const SLAPrintObject* Slic3r::SLAPrintObject::SliceRecord::m_po = nullptr
private

◆ m_print_z

coord_t Slic3r::SLAPrintObject::SliceRecord::m_print_z = 0
private

Referenced by SliceRecord(), and print_level().

◆ m_slice_z

float Slic3r::SLAPrintObject::SliceRecord::m_slice_z = 0.f
private

Referenced by SliceRecord(), is_valid(), and slice_level().

◆ m_support_slices_idx

size_t Slic3r::SLAPrintObject::SliceRecord::m_support_slices_idx = NONE
private

◆ NONE

const size_t Slic3r::SLAPrintObject::SliceRecord::NONE = size_t(-1)
static

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