mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 12:19:03 +08:00
Separate methods to get the sliced polygons.
This commit is contained in:
parent
4c007a410c
commit
ef5807e36b
@ -438,6 +438,24 @@ SLAPrintObject::SLAPrintObject(SLAPrint *print, ModelObject *model_object):
|
||||
|
||||
SLAPrintObject::~SLAPrintObject() {}
|
||||
|
||||
double SLAPrintObject::get_elevation() const {
|
||||
return m_supportdata && m_supportdata->support_tree_ptr?
|
||||
m_supportdata->support_tree_ptr->get_elevation() :
|
||||
0;
|
||||
}
|
||||
|
||||
const std::vector<ExPolygons> &SLAPrintObject::get_support_slices() const
|
||||
{
|
||||
if(!m_supportdata) return {};
|
||||
|
||||
return m_supportdata->support_slices;
|
||||
}
|
||||
|
||||
const std::vector<ExPolygons> &SLAPrintObject::get_model_slices() const
|
||||
{
|
||||
return m_model_slices;
|
||||
}
|
||||
|
||||
TriangleMesh SLAPrintObject::support_mesh() const
|
||||
{
|
||||
TriangleMesh trm;
|
||||
|
@ -62,6 +62,15 @@ public:
|
||||
|
||||
std::vector<Vec3d> transformed_support_points() const;
|
||||
|
||||
// Get the needed Z elevation for the model geometry if supports should be
|
||||
// displayed. This Z offset should also be applied to the support
|
||||
// geometries. Note that this is not the same as the value stored in config
|
||||
// as the pad height also needs to be considered.
|
||||
double get_elevation() const;
|
||||
|
||||
const std::vector<ExPolygons>& get_support_slices() const;
|
||||
const std::vector<ExPolygons>& get_model_slices() const;
|
||||
|
||||
// I refuse to grantee copying (Tamas)
|
||||
SLAPrintObject(const SLAPrintObject&) = delete;
|
||||
SLAPrintObject& operator=(const SLAPrintObject&) = delete;
|
||||
|
Loading…
x
Reference in New Issue
Block a user