mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Account handle the z levels with and without the pad.
New method in support tree to query the needed elevation for the model and its supports.
This commit is contained in:
@@ -150,8 +150,8 @@ void SLAPrint::process()
|
||||
po.m_supportdata.reset(new SLAPrintObject::SupportData());
|
||||
po.m_supportdata->emesh = sla::to_eigenmesh(po.transformed_mesh());
|
||||
|
||||
// TODO: transform support points appropriately
|
||||
po.m_supportdata->support_points = sla::support_points(mo);
|
||||
po.m_supportdata->support_points =
|
||||
sla::to_point_set(po.transformed_support_points());
|
||||
}
|
||||
|
||||
// for(SLAPrintObject *po : pobjects) {
|
||||
@@ -454,4 +454,17 @@ const TriangleMesh &SLAPrintObject::transformed_mesh() const {
|
||||
return m_transformed_rmesh;
|
||||
}
|
||||
|
||||
std::vector<Vec3d> SLAPrintObject::transformed_support_points() const
|
||||
{
|
||||
assert(m_model_object != nullptr);
|
||||
auto& spts = m_model_object->sla_support_points;
|
||||
|
||||
// this could be cached as well
|
||||
std::vector<Vec3d> ret; ret.reserve(spts.size());
|
||||
|
||||
for(auto& sp : spts) ret.emplace_back( trafo() * Vec3d(sp.cast<double>()));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
Reference in New Issue
Block a user