OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
FilamentGroup.cpp File Reference
#include "FilamentGroup.hpp"
#include "FilamentGroupUtils.hpp"
#include "GCode/ToolOrderUtils.hpp"
#include "FlushVolPredictor.hpp"
#include "MultiNozzleUtils.hpp"
#include "PrintConfig.hpp"
#include "libslic3r.h"
#include <queue>
#include <cstdint>
#include <cstddef>
#include <optional>
#include <functional>
#include <map>
#include <algorithm>
#include <limits>
#include <cmath>
#include <memory>
#include <numeric>
#include <cstdlib>
#include <iterator>
#include <deque>
#include <random>
#include <cassert>
#include <set>
#include <sstream>
#include <boost/log/trivial.hpp>
#include <vector>
#include <utility>
#include <unordered_map>
#include <unordered_set>
#include <string>
Include dependency graph for FilamentGroup.cpp:

Go to the source code of this file.

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Functions

static void Slic3r::change_memoryed_heaps_to_arrays (MemoryedGroupHeap &heap, const int total_filament_num, const std::vector< unsigned int > &used_filaments, std::vector< std::vector< int > > &arrs)
static std::unordered_map< int, int > Slic3r::get_merged_filament_map (const std::unordered_map< int, std::vector< int > > &merged_filaments)
static uint64_t Slic3r::fnv_hash_nozzle (int volume_type, int is_right_extruder, int loaded_filament=-1)
static double Slic3r::evaluate_score (const double flush, const double time, const bool with_time=false)
static double Slic3r::calc_change_time_for_group (const std::vector< int > &filament_change_seq, const std::vector< int > &nozzle_change_seq, const std::vector< int > &logical_filaments, const std::vector< MultiNozzleUtils::NozzleInfo > &nozzle_list, const MultiNozzleUtils::FilamentChangeTimeParams &time_params, const std::vector< bool > &ams_preload_enabled, const std::vector< int > &group_of_filament)
static double Slic3r::full_evaluate (const std::vector< unsigned int > &used_filaments, const std::vector< int > &filament_nozzle_map, const FilamentGroupContext &ctx, std::optional< std::function< bool(int, std::vector< int > &)> > get_custom_seq=std::nullopt, int *out_flush=nullptr)
static long long Slic3r::estimate_dedup_enum_count (int k, int n, const FilamentGroupContext &ctx)
std::vector< int > Slic3r::select_best_group_for_ams (const std::vector< std::vector< int > > &filament_to_nozzles, const std::vector< MultiNozzleUtils::NozzleInfo > &nozzle_list, const std::vector< unsigned int > &used_filaments, const std::vector< FilamentGroupUtils::FilamentInfo > &used_filament_info, const std::vector< std::vector< MachineFilamentInfo > > &machine_filament_info_, const bool has_filament_switcher, const double color_threshold)
 Select the group that best fit the filaments in AMS.
std::vector< unsigned int > Slic3r::collect_sorted_used_filaments (const std::vector< std::vector< unsigned int > > &layer_filaments)
std::vector< int > Slic3r::calc_filament_group_for_match_multi_nozzle (const FilamentGroupContext &ctx)
std::vector< FilamentPlanRes > Slic3r::plan_filament_nozzle_mapping_and_order (const FilamentGroupContext &ctx)
std::vector< int > Slic3r::calc_filament_group_for_manual_multi_nozzle (const std::vector< int > &filament_map_manual, const FilamentGroupContext &ctx)

Variables

static constexpr long long Slic3r::ENUM_THRESHOLD = 10000
static constexpr long long Slic3r::ENUM_EARLY_EXIT = 10000000
constexpr uint32_t Slic3r::GOLDEN_RATIO_32 = 0x9e3779b9