ENH: improve sharp tail detection

1. When sharp tail region suddenly grows a lot, it means it connects to
   a well supported region and is no longer a sharp tail.
   Jira: STUDIO-1862
2. First layer of sharp tail can not be reducible (must have extrusion,
   i.e. won't disappear after slicing), otherwise thin spikes at the
   top of the object are also treated as sharp tails.
   Model: knight_seadra
3. Increase sharp_tail_max_support_height to 16mm
   Model: Crane_reversed

Jira: STUDIO-1859 (for this issue I don't what is the exact cause,
   but adding these three improvements solves the problem)

Change-Id: I3cd57b184d78dba8862ab3c214057ae78fe49d1f
(cherry picked from commit 9242c6a6d1f23f11ebc43a9049ce10229a15c60e)
This commit is contained in:
Arthur 2022-12-26 16:59:30 +08:00 committed by Lane.Wei
parent 4284d2ddb0
commit 38ce4b94f4
3 changed files with 23 additions and 7 deletions

View file

@ -149,6 +149,21 @@ public:
Point& operator-=(const Point& rhs) { this->x() -= rhs.x(); this->y() -= rhs.y(); return *this; }
Point& operator*=(const double &rhs) { this->x() = coord_t(this->x() * rhs); this->y() = coord_t(this->y() * rhs); return *this; }
Point operator*(const double &rhs) { return Point(this->x() * rhs, this->y() * rhs); }
bool both_comp(const Point &rhs, const std::string& op) {
if (op == ">")
return this->x() > rhs.x() && this->y() > rhs.y();
else if (op == "<")
return this->x() < rhs.x() && this->y() < rhs.y();
return false;
}
bool any_comp(const Point &rhs, const std::string &op)
{
if (op == ">")
return this->x() > rhs.x() || this->y() > rhs.y();
else if (op == "<")
return this->x() < rhs.x() || this->y() < rhs.y();
return false;
}
void rotate(double angle) { this->rotate(std::cos(angle), std::sin(angle)); }
void rotate(double cos_a, double sin_a) {