mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 20:26:00 +08:00
Fix tree struts piercing model body
Free path between the anchor and the last bridge was not verified
This commit is contained in:
parent
7705ecd5aa
commit
4c3ba3f6bf
@ -175,19 +175,22 @@ bool BranchingTreeBuilder::add_mesh_bridge(const branchingtree::Node &from,
|
|||||||
fromj,
|
fromj,
|
||||||
to.pos.cast<double>());
|
to.pos.cast<double>());
|
||||||
|
|
||||||
sla::Junction toj = {anchor->junction_point(), anchor->r_back_mm};
|
|
||||||
|
|
||||||
if (anchor) {
|
if (anchor) {
|
||||||
auto hit1 = beam_mesh_hit(ex_tbb, m_sm.emesh,
|
sla::Junction toj = {anchor->junction_point(), anchor->r_back_mm};
|
||||||
Beam{{fromj.pos, fromj.r}, {toj.pos, toj.r}},
|
|
||||||
m_sm.cfg.safety_distance_mm);
|
auto hit = beam_mesh_hit(ex_tbb, m_sm.emesh,
|
||||||
if (hit1.distance() >= distance(fromj.pos, toj.pos)) {
|
Beam{{fromj.pos, fromj.r}, {toj.pos, toj.r}}, 0.);
|
||||||
|
|
||||||
|
if (hit.distance() > distance(fromj.pos, toj.pos)) {
|
||||||
m_builder.add_diffbridge(fromj.pos, toj.pos, fromj.r, toj.r);
|
m_builder.add_diffbridge(fromj.pos, toj.pos, fromj.r, toj.r);
|
||||||
|
|
||||||
if (!m_sm.cfg.ground_facing_only) { // Easter egg, to omit the anchors
|
if (!m_sm.cfg.ground_facing_only) { // Easter egg, to omit the anchors
|
||||||
m_builder.add_anchor(*anchor);
|
m_builder.add_anchor(*anchor);
|
||||||
}
|
}
|
||||||
|
|
||||||
build_subtree(from.id);
|
build_subtree(from.id);
|
||||||
|
} else {
|
||||||
|
anchor.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user