mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Adding validation code for support parameters (elevation)
This commit is contained in:
parent
f249155340
commit
cd2cccec5f
3 changed files with 21 additions and 2 deletions
|
@ -571,7 +571,24 @@ void swapXY(ExPolygon& expoly) {
|
|||
for(auto& p : expoly.contour.points) std::swap(p(X), p(Y));
|
||||
for(auto& h : expoly.holes) for(auto& p : h.points) std::swap(p(X), p(Y));
|
||||
}
|
||||
}
|
||||
|
||||
std::string SLAPrint::validate() const
|
||||
{
|
||||
for(SLAPrintObject * po : m_objects) {
|
||||
sla::SupportConfig cfg = make_support_cfg(po->config());
|
||||
|
||||
double pinhead_width =
|
||||
2 * cfg.head_front_radius_mm +
|
||||
cfg.head_width_mm +
|
||||
2 * cfg.head_back_radius_mm -
|
||||
cfg.head_penetration_mm;
|
||||
|
||||
if(pinhead_width > cfg.object_elevation_mm)
|
||||
return L("Elevetion is too low for object.");
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::vector<float> SLAPrint::calculate_heights(const BoundingBoxf3& bb3d,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue