mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-10 03:41:50 +08:00
Fix broken caching of pillar routes
This commit is contained in:
parent
add0f89728
commit
f72984f18e
@ -231,6 +231,8 @@ bool BranchingTreeBuilder::add_ground_bridge(const branchingtree::Node &from,
|
|||||||
namespace bgi = boost::geometry::index;
|
namespace bgi = boost::geometry::index;
|
||||||
|
|
||||||
auto it = m_gnd_connections.find(from.id);
|
auto it = m_gnd_connections.find(from.id);
|
||||||
|
const GroundConnection *connptr = nullptr;
|
||||||
|
|
||||||
if (it == m_gnd_connections.end()) {
|
if (it == m_gnd_connections.end()) {
|
||||||
sla::Junction j{from.pos.cast<double>(), get_radius(from)};
|
sla::Junction j{from.pos.cast<double>(), get_radius(from)};
|
||||||
Vec3d init_dir = (to.pos - from.pos).cast<double>().normalized();
|
Vec3d init_dir = (to.pos - from.pos).cast<double>().normalized();
|
||||||
@ -241,15 +243,14 @@ bool BranchingTreeBuilder::add_ground_bridge(const branchingtree::Node &from,
|
|||||||
// Remember that this node was tested if can go to ground, don't
|
// Remember that this node was tested if can go to ground, don't
|
||||||
// test it with any other destination ground point because
|
// test it with any other destination ground point because
|
||||||
// it is unlikely that search_ground_route would find a better solution
|
// it is unlikely that search_ground_route would find a better solution
|
||||||
m_gnd_connections[from.id] = conn;
|
connptr = &(m_gnd_connections[from.id] = conn);
|
||||||
|
} else {
|
||||||
|
connptr = &(it->second);
|
||||||
|
}
|
||||||
|
|
||||||
if (conn) {
|
if (connptr && *connptr) {
|
||||||
m_pillars.emplace_back(from);
|
m_pillars.emplace_back(from);
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret) {
|
|
||||||
build_subtree(from.id);
|
build_subtree(from.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user