This commit is contained in:
bubnikv 2019-04-12 11:02:21 +02:00
commit 360e741462
2 changed files with 16 additions and 17 deletions

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 {

View File

@ -3224,7 +3224,8 @@ void TabSLAMaterial::build()
optgroup = page->new_optgroup(_(L("Corrections"))); optgroup = page->new_optgroup(_(L("Corrections")));
optgroup->label_width = 19 * m_em_unit;//190; optgroup->label_width = 19 * m_em_unit;//190;
std::vector<std::string> corrections = {"material_correction"}; std::vector<std::string> corrections = {"material_correction"};
std::vector<std::string> axes{ "X", "Y", "Z" }; // std::vector<std::string> axes{ "X", "Y", "Z" };
std::vector<std::string> axes{ "XY", "Z" };
for (auto& opt_key : corrections) { for (auto& opt_key : corrections) {
auto line = Line{ m_config->def()->get(opt_key)->full_label, "" }; auto line = Line{ m_config->def()->get(opt_key)->full_label, "" };
int id = 0; int id = 0;