mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Improvement of AdaptiveFill:
1) Merging of collinear infill lines separated by a thin gap created by trimming with the boundary polygon. 2) Sorting of the T-joints separately to the left / right of the common line. 3) Trimming self intersections of the anchor lines. 4) Dropping of very short segments, not anchoring short segments.
This commit is contained in:
parent
517477f0dd
commit
89df9c1038
3 changed files with 383 additions and 127 deletions
|
@ -24,7 +24,7 @@ namespace line_alg {
|
|||
template<class L, class T, int N>
|
||||
double distance_to_squared(const L &line, const Vec<N, T> &point)
|
||||
{
|
||||
const Vec<N, double> v = line.vector().template cast<double>();
|
||||
const Vec<N, double> v = (line.b - line.a).template cast<double>();
|
||||
const Vec<N, double> va = (point - line.a).template cast<double>();
|
||||
const double l2 = v.squaredNorm(); // avoid a sqrt
|
||||
if (l2 == 0.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue