Esempio n. 1
0
void GCodePlanner::forceNewPathStart()
{
    paths.push_back(GCodePath());
    GCodePath* ret = &paths[paths.size()-1];
    ret->retract = false;
    ret->config = &travelConfig;
    ret->extruder = currentExtruder;
}
Esempio n. 2
0
GCodePath* GCodePlanner::getLatestPathWithConfig(GCodePathConfig* config)
{
    if (paths.size() > 0 && paths[paths.size()-1].config == config)
        return &paths[paths.size()-1];
    paths.push_back(GCodePath());
    GCodePath* ret = &paths[paths.size()-1];
    ret->retract = false;
    ret->config = config;
    ret->extruder = currentExtruder;
    return ret;
}
Esempio n. 3
0
GCodePath* GCodePlanner::getLatestPathWithConfig(GCodePathConfig* config, float flow)
{
    if (paths.size() > 0 && paths[paths.size()-1].config == config && !paths[paths.size()-1].done && paths[paths.size()-1].flow == flow)
        return &paths[paths.size()-1];
    paths.push_back(GCodePath());
    GCodePath* ret = &paths[paths.size()-1];
    ret->retract = false;
    ret->config = config;
    ret->extruder = currentExtruder;
    ret->done = false;
    ret->flow = flow;
    if (config != &travelConfig)
    {
        last_retraction_config = config->retraction_config;
    }
    return ret;
}