Simple brim ears impl (#1779)

* First working brim ear impl, ported from SuperSlicer

* Make brim ears configurable

* Generate ears only if ear size > 0

* Fix `Polygon::convex_points` as well as brim ear max angle

* Fix another error in `Polygon::convex_points` and `Polygon::concave_points`

* Apply brim ears to inner brims as well

* tweak hide and disable condition a bit

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox 2023-08-13 22:29:45 +08:00 committed by GitHub
parent afe1030b58
commit f714e72faa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 136 additions and 18 deletions

View file

@ -56,6 +56,8 @@ static constexpr double EPSILON = 1e-4;
// int32_t fits an interval of (-2147.48mm, +2147.48mm)
// with int64_t we don't have to worry anymore about the size of the int.
static constexpr double SCALING_FACTOR = 0.000001;
// for creating circles (for brim_ear)
#define POLY_SIDES 24
static constexpr double PI = 3.141592653589793238;
// When extruding a closed loop, the loop is interrupted and shortened a bit to reduce the seam.
// SoftFever: replaced by seam_gap now