mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 06:29:00 +08:00
Fix for SPE-2674 1/2
issue in file SPE-2674_mini13-armor-runner-v8.3mf
This commit is contained in:
parent
eec3b8e7d6
commit
409900a4c9
@ -2048,13 +2048,13 @@ coord_t get_longest_distance(const IslandPartChanges& changes, Position* center
|
||||
return farest_from_change;
|
||||
|
||||
const NodeDistance *prev_node_distance = farest_distnace;
|
||||
const NodeDistance *node_distance = nullptr;
|
||||
const NodeDistance *node_distance = prev_node_distance;
|
||||
// iterate over longest path to find center(half distance)
|
||||
while (prev_node_distance->shortest_distances[change_index].distance > half_distance) {
|
||||
while (prev_node_distance->shortest_distances[change_index].distance >= half_distance) {
|
||||
node_distance = prev_node_distance;
|
||||
size_t prev_index = node_distance->shortest_distances[change_index].prev_node_distance_index;
|
||||
// case with center on change neighbor is already handled, so prev_index should be valid
|
||||
assert(prev_index != no_index);
|
||||
assert(prev_index != no_index && prev_index<node_distances.size());
|
||||
prev_node_distance = &node_distances[prev_index];
|
||||
}
|
||||
|
||||
@ -2144,7 +2144,7 @@ std::pair<size_t, std::vector<size_t>> merge_negihbor(IslandParts &island_parts,
|
||||
}
|
||||
}
|
||||
|
||||
return std::make_pair(index, remove_indices);
|
||||
return std::make_pair(modified_index, remove_indices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
5
tests/data/sla_islands/SPE-2674.svg
Normal file
5
tests/data/sla_islands/SPE-2674.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 22 KiB |
@ -389,6 +389,7 @@ ExPolygons createTestIslands(double size)
|
||||
ExPolygon(PolygonUtils::create_equilateral_triangle(scale_(18.6))),
|
||||
create_cylinder_bottom_slice(),
|
||||
load_svg(dir + "lm_issue.svg"), // change from thick to thin and vice versa on circle
|
||||
load_svg(dir + "SPE-2674.svg"), // center of longest path lay inside of the VD node
|
||||
|
||||
// still problem
|
||||
// three support points
|
||||
|
Loading…
x
Reference in New Issue
Block a user