Small supports now go through the pad to always reach the bed

They will not hang in the air if they end up in the gap between the "around object pad" and the object
This commit is contained in:
tamasmeszaros 2023-01-17 16:41:27 +01:00
parent 4620dd5a3d
commit d6fe5767e0

View File

@ -469,8 +469,10 @@ inline long build_ground_connection(SupportTreeBuilder &builder,
gp.z() = ground_level(sm);
double h = conn.path.back().pos.z() - gp.z();
if (conn.pillar_base->r_top < sm.cfg.head_back_radius_mm)
if (conn.pillar_base->r_top < sm.cfg.head_back_radius_mm) {
h += sm.pad_cfg.wall_thickness_mm;
gp.z() -= sm.pad_cfg.wall_thickness_mm;
}
// TODO: does not work yet
// if (conn.path.back().id < 0) {
@ -478,6 +480,7 @@ inline long build_ground_connection(SupportTreeBuilder &builder,
// long head_id = std::abs(conn.path.back().id);
// ret = builder.add_pillar(head_id, h);
// } else
ret = builder.add_pillar(gp, h, conn.path.back().r, conn.pillar_base->r_top);
if (conn.pillar_base->r_top >= sm.cfg.head_back_radius_mm)