mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 23:15:54 +08:00
Merge branch 'tm_arrange_fixes'
This commit is contained in:
commit
455c2d08ad
@ -17,7 +17,9 @@ struct GravityKernel {
|
||||
std::optional<Vec2crd> item_sink;
|
||||
Vec2d active_sink;
|
||||
|
||||
GravityKernel(Vec2crd gravity_center) : sink{gravity_center} {}
|
||||
GravityKernel(Vec2crd gravity_center) :
|
||||
sink{gravity_center}, active_sink{unscaled(gravity_center)} {}
|
||||
|
||||
GravityKernel() = default;
|
||||
|
||||
template<class ArrItem>
|
||||
|
@ -202,10 +202,10 @@ static void check_nfp(const std::string & outfile_prefix,
|
||||
ExPolygons bed_negative = diff_ex(bedrect, bedpoly);
|
||||
ExPolygons orb_ex_r = to_expolygons(orbiter);
|
||||
ExPolygons orb_ex_r_ch = {ExPolygon(Geometry::convex_hull(orb_ex_r))};
|
||||
auto orb_ex_offs_pos_r = offset_ex(orb_ex_r, SCALED_EPSILON);
|
||||
auto orb_ex_offs_neg_r = offset_ex(orb_ex_r, -SCALED_EPSILON);
|
||||
auto orb_ex_offs_pos_r_ch = offset_ex(orb_ex_r_ch, SCALED_EPSILON);
|
||||
auto orb_ex_offs_neg_r_ch = offset_ex(orb_ex_r_ch, -SCALED_EPSILON);
|
||||
auto orb_ex_offs_pos_r = offset_ex(orb_ex_r, scaled<float>(EPSILON));
|
||||
auto orb_ex_offs_neg_r = offset_ex(orb_ex_r, -scaled<float>(EPSILON));
|
||||
auto orb_ex_offs_pos_r_ch = offset_ex(orb_ex_r_ch, scaled<float>(EPSILON));
|
||||
auto orb_ex_offs_neg_r_ch = offset_ex(orb_ex_r_ch, -scaled<float>(EPSILON));
|
||||
|
||||
auto bedpoly_offs = offset_ex(bedpoly, SCALED_EPSILON);
|
||||
|
||||
|
@ -738,8 +738,8 @@ bool is_collision_free(const Slic3r::Range<It> &item_range)
|
||||
|
||||
bool collision_free = true;
|
||||
foreach_combo(item_range, [&collision_free](auto &itm1, auto &itm2) {
|
||||
auto outline1 = offset(arr2::fixed_outline(itm1), -SCALED_EPSILON);
|
||||
auto outline2 = offset(arr2::fixed_outline(itm2), -SCALED_EPSILON);
|
||||
auto outline1 = offset(arr2::fixed_outline(itm1), -scaled<float>(EPSILON));
|
||||
auto outline2 = offset(arr2::fixed_outline(itm2), -scaled<float>(EPSILON));
|
||||
|
||||
auto inters = intersection(outline1, outline2);
|
||||
collision_free = collision_free && inters.empty();
|
||||
|
Loading…
x
Reference in New Issue
Block a user