Fix for issue SPE-901

This commit is contained in:
tamasmeszaros 2019-04-12 10:26:33 +02:00
parent 59758fea55
commit a55022ae2f

View File

@ -1572,10 +1572,8 @@ public:
auto hit = bridge_mesh_intersect(headjp, n, r); auto hit = bridge_mesh_intersect(headjp, n, r);
if(std::isinf(hit.distance())) ground_head_indices.emplace_back(i); if(std::isinf(hit.distance())) ground_head_indices.emplace_back(i);
else { else if(m_cfg.ground_facing_only) head.invalidate();
if(m_cfg.ground_facing_only) head.invalidate(); else m_iheads_onmodel.emplace_back(std::make_pair(i, hit));
m_iheads_onmodel.emplace_back(std::make_pair(i, hit));
}
} }
// We want to search for clusters of points that are far enough // We want to search for clusters of points that are far enough
@ -1872,7 +1870,7 @@ public:
} }
} }
void cascade_pillars() { void interconnect_pillars() {
// Now comes the algorithm that connects pillars with each other. // Now comes the algorithm that connects pillars with each other.
// Ideally every pillar should be connected with at least one of its // Ideally every pillar should be connected with at least one of its
// neighbors if that neighbor is within max_pillar_link_distance // neighbors if that neighbor is within max_pillar_link_distance
@ -2121,7 +2119,7 @@ bool SLASupportTree::generate(const std::vector<SupportPoint> &support_points,
std::bind(&Algorithm::routing_to_model, &alg), std::bind(&Algorithm::routing_to_model, &alg),
std::bind(&Algorithm::cascade_pillars, &alg), std::bind(&Algorithm::interconnect_pillars, &alg),
std::bind(&Algorithm::routing_headless, &alg), std::bind(&Algorithm::routing_headless, &alg),
@ -2150,16 +2148,16 @@ bool SLASupportTree::generate(const std::vector<SupportPoint> &support_points,
// Let's define a simple automaton that will run our program. // Let's define a simple automaton that will run our program.
auto progress = [&ctl, &pc] () { auto progress = [&ctl, &pc] () {
static const std::array<std::string, NUM_STEPS> stepstr { static const std::array<std::string, NUM_STEPS> stepstr {
L("Starting"), "Starting",
L("Filtering"), "Filtering",
L("Generate pinheads"), "Generate pinheads",
L("Classification"), "Classification",
L("Routing to ground"), "Routing to ground",
L("Routing supports to model surface"), "Routing supports to model surface",
L("Cascading pillars"), "Interconnecting pillars",
L("Processing small holes"), "Processing small holes",
L("Done"), "Done",
L("Abort") "Abort"
}; };
static const std::array<unsigned, NUM_STEPS> stepstate { static const std::array<unsigned, NUM_STEPS> stepstate {