mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
ENH: add a new support style "Tree Organic"
Add a new suport style "Tree Organic" from Prusa, as organic support is faster and seems more strong in some cases. Thanks to Prusa. Feature detection including sharp tail, small overhang, long cantilever, are still kept. Known issue: first layer support path may go outside build plate. Jira: STUDIO-2358 Github: #2420 Change-Id: I4cec149bf4fa9eb733ae720ac1a7f65098e3b951 (cherry picked from commit d977bc5d3b4609f4fec0aa68152a33cacf184c4a)
This commit is contained in:
parent
b6995d8fb3
commit
ad9fa81b01
27 changed files with 7474 additions and 674 deletions
|
@ -664,4 +664,23 @@ bool contains(const Polygons &polygons, const Point &p, bool border_result)
|
|||
}
|
||||
return (poly_count_inside % 2) == 1;
|
||||
}
|
||||
|
||||
Polygon make_circle(double radius, double error)
|
||||
{
|
||||
double angle = 2. * acos(1. - error / radius);
|
||||
size_t num_segments = size_t(ceil(2. * M_PI / angle));
|
||||
return make_circle_num_segments(radius, num_segments);
|
||||
}
|
||||
|
||||
Polygon make_circle_num_segments(double radius, size_t num_segments)
|
||||
{
|
||||
Polygon out;
|
||||
out.points.reserve(num_segments);
|
||||
double angle_inc = 2.0 * M_PI / num_segments;
|
||||
for (size_t i = 0; i < num_segments; ++ i) {
|
||||
const double angle = angle_inc * i;
|
||||
out.points.emplace_back(coord_t(cos(angle) * radius), coord_t(sin(angle) * radius));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue