Merge branch 'master' of https://github.com/prusa3d/Slic3r
This commit is contained in:
commit
58c136a9a3
3 changed files with 21 additions and 2 deletions
|
@ -1466,7 +1466,7 @@ public:
|
||||||
m_cfg.head_back_radius_mm,
|
m_cfg.head_back_radius_mm,
|
||||||
w);
|
w);
|
||||||
|
|
||||||
if(t <= w || (hp(Z) + nn(Z) * w) < m_result.ground_level) {
|
if(t <= w) {
|
||||||
|
|
||||||
// Let's try to optimize this angle, there might be a
|
// Let's try to optimize this angle, there might be a
|
||||||
// viable normal that doesn't collide with the model
|
// viable normal that doesn't collide with the model
|
||||||
|
@ -1509,7 +1509,7 @@ public:
|
||||||
// save the verified and corrected normal
|
// save the verified and corrected normal
|
||||||
m_support_nmls.row(fidx) = nn;
|
m_support_nmls.row(fidx) = nn;
|
||||||
|
|
||||||
if(t > w && (hp(Z) + nn(Z) * w) > m_result.ground_level) {
|
if(t > w) {
|
||||||
// mark the point for needing a head.
|
// mark the point for needing a head.
|
||||||
m_iheads.emplace_back(fidx);
|
m_iheads.emplace_back(fidx);
|
||||||
} else if( polar >= 3*PI/4 ) {
|
} else if( polar >= 3*PI/4 ) {
|
||||||
|
|
|
@ -571,7 +571,24 @@ void swapXY(ExPolygon& expoly) {
|
||||||
for(auto& p : expoly.contour.points) std::swap(p(X), p(Y));
|
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));
|
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,
|
std::vector<float> SLAPrint::calculate_heights(const BoundingBoxf3& bb3d,
|
||||||
|
|
|
@ -240,6 +240,8 @@ public:
|
||||||
|
|
||||||
const SLAPrintStatistics& print_statistics() const { return m_print_statistics; }
|
const SLAPrintStatistics& print_statistics() const { return m_print_statistics; }
|
||||||
|
|
||||||
|
std::string validate() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using SLAPrinter = FilePrinter<FilePrinterFormat::SLA_PNGZIP>;
|
using SLAPrinter = FilePrinter<FilePrinterFormat::SLA_PNGZIP>;
|
||||||
using SLAPrinterPtr = std::unique_ptr<SLAPrinter>;
|
using SLAPrinterPtr = std::unique_ptr<SLAPrinter>;
|
||||||
|
|
Loading…
Reference in a new issue