void PrimeTower::generatePaths3(SliceDataStorage& storage)
{
        
    int n_patterns = 2; // alternating patterns between layers
    int infill_overlap = 60; // so that it can't be zero; EDIT: wtf?
    int extra_infill_shift = 0;
    
    generateGroundpoly(storage);
    
    int64_t z = 0; // (TODO) because the prime tower stores the paths for each extruder for once instead of generating each layer, we don't know the z position
    
    for (int extruder = 0; extruder < extruder_count; extruder++)
    {
        int line_width = storage.meshgroup->getExtruderTrain(extruder)->getSettingInMicrons("prime_tower_line_width");
        patterns_per_extruder.emplace_back(n_patterns);
        std::vector<Polygons>& patterns = patterns_per_extruder.back();
        for (int pattern_idx = 0; pattern_idx < n_patterns; pattern_idx++)
        {
            Polygons result_polygons; // should remain empty, since we generate lines pattern!
            int outline_offset = -line_width/2;
            int line_distance = line_width;
            double fill_angle = 45 + pattern_idx * 90;
            Polygons& result_lines = patterns[pattern_idx];
            Infill infill_comp(EFillMethod::LINES, ground_poly, outline_offset, line_width, line_distance, infill_overlap, fill_angle, z, extra_infill_shift);
            infill_comp.generate(result_polygons, result_lines);
        }
    }
}
PrimeTower::PrimeTower(const SliceDataStorage& storage)
: is_hollow(false)
, wipe_from_middle(false)
{
    enabled = storage.getSettingBoolean("prime_tower_enable")
           && storage.getSettingInMicrons("prime_tower_wall_thickness") > 10
           && storage.getSettingInMicrons("prime_tower_size") > 10;
    if (enabled)
    {
        generateGroundpoly(storage);
    }
}
void PrimeTower::generatePaths3(SliceDataStorage& storage)
{

    int n_patterns = 2; // alternating patterns between layers
    double infill_overlap = 15; // so that it can't be zero

    generateGroundpoly(storage);

    for (int extruder = 0; extruder < extruder_count; extruder++)
    {
        int line_width = storage.meshgroup->getExtruderTrain(extruder)->getSettingInMicrons("prime_tower_line_width");
        patterns_per_extruder.emplace_back(n_patterns);
        std::vector<Polygons>& patterns = patterns_per_extruder.back();
        for (int pattern_idx = 0; pattern_idx < n_patterns; pattern_idx++)
        {
            generateLineInfill(ground_poly, -line_width/2, patterns[pattern_idx], line_width, line_width, infill_overlap, 45 + pattern_idx*90);
        }
    }
}