mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: add tpu check before slicing
jira: none Change-Id: I7d4f053e67f4a4aa22ef990d597d28cb894c4195 (cherry picked from commit 60cdf3b6551a8c18c10db0a746e1b15b764eda66)
This commit is contained in:
@@ -1675,6 +1675,29 @@ std::vector<int> PartPlate::get_used_extruders()
|
||||
return std::vector(used_extruders_set.begin(), used_extruders_set.end());
|
||||
}
|
||||
|
||||
bool PartPlate::check_tpu_printable_status(const DynamicPrintConfig *config, const std::vector<int> &tpu_filaments)
|
||||
{
|
||||
bool tpu_valid = true;
|
||||
|
||||
if (!tpu_filaments.empty()) {
|
||||
if (tpu_filaments.size() > 1)
|
||||
tpu_valid = false;
|
||||
else if (get_filament_map_mode() == FilamentMapMode::fmmManual) {
|
||||
if (config->has("master_extruder_id")) {
|
||||
int tpu_filament_id = *tpu_filaments.begin();
|
||||
std::vector<int> filament_map = get_filament_maps();
|
||||
int extruder_id = filament_map[tpu_filament_id];
|
||||
|
||||
int master_extruder_id = config->opt_int("master_extruder_id"); // base 1
|
||||
if (master_extruder_id != extruder_id)
|
||||
tpu_valid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tpu_valid;
|
||||
}
|
||||
|
||||
Vec3d PartPlate::estimate_wipe_tower_size(const DynamicPrintConfig & config, const double w, const double d, int plate_extruder_size, bool use_global_objects) const
|
||||
{
|
||||
Vec3d wipe_tower_size;
|
||||
|
||||
Reference in New Issue
Block a user