mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-17 01:43:13 +08:00
Added comments for load_full_print_config()
+ Set default value for printer_technology + Fixed a warning in this function
This commit is contained in:
parent
fa7d20a44d
commit
9c72f2bb8b
@ -432,7 +432,7 @@ std::string load_full_print_config(const std::string& print_preset_name,
|
|||||||
const std::vector<std::string>& material_preset_names_in,
|
const std::vector<std::string>& material_preset_names_in,
|
||||||
const std::string& printer_preset_name,
|
const std::string& printer_preset_name,
|
||||||
DynamicPrintConfig& config,
|
DynamicPrintConfig& config,
|
||||||
PrinterTechnology printer_technology)
|
PrinterTechnology printer_technology /*= ptUnknown*/)
|
||||||
{
|
{
|
||||||
// check entered profile names
|
// check entered profile names
|
||||||
|
|
||||||
@ -495,7 +495,7 @@ std::string load_full_print_config(const std::string& print_preset_name,
|
|||||||
|
|
||||||
if (printer_technology == ptFFF) {
|
if (printer_technology == ptFFF) {
|
||||||
const int extruders_count = int(static_cast<const ConfigOptionFloats*>(printer_preset->config.option("nozzle_diameter"))->values.size());
|
const int extruders_count = int(static_cast<const ConfigOptionFloats*>(printer_preset->config.option("nozzle_diameter"))->values.size());
|
||||||
if (extruders_count > material_preset_names.size()) {
|
if (extruders_count > int(material_preset_names.size())) {
|
||||||
BOOST_LOG_TRIVIAL(warning) << "Note: Less than needed filament profiles were entered. Missed filament profiles will be filled with first material.";
|
BOOST_LOG_TRIVIAL(warning) << "Note: Less than needed filament profiles were entered. Missed filament profiles will be filled with first material.";
|
||||||
material_preset_names.reserve(extruders_count);
|
material_preset_names.reserve(extruders_count);
|
||||||
for (int i = extruders_count - material_preset_names.size(); i > 0; i--)
|
for (int i = extruders_count - material_preset_names.size(); i > 0; i--)
|
||||||
|
@ -15,12 +15,14 @@ class DynamicPrintConfig;
|
|||||||
bool load_full_print_config(const std::string& print_preset, const std::string& filament_preset, const std::string& printer_preset, DynamicPrintConfig& out_config);
|
bool load_full_print_config(const std::string& print_preset, const std::string& filament_preset, const std::string& printer_preset, DynamicPrintConfig& out_config);
|
||||||
|
|
||||||
// Load full print config into config
|
// Load full print config into config
|
||||||
// Return error/warning string if any exists
|
// Return value is always error string if any exists
|
||||||
|
// Note, that all appearing warnings are added into BOOST_LOG
|
||||||
|
// When printer_technology is set, then it will be compared with printer technology of the printer_profile and return the error, when they aren't the same
|
||||||
std::string load_full_print_config( const std::string& print_preset_name,
|
std::string load_full_print_config( const std::string& print_preset_name,
|
||||||
const std::vector<std::string>& material_preset_names,
|
const std::vector<std::string>& material_preset_names,
|
||||||
const std::string& printer_preset_name,
|
const std::string& printer_preset_name,
|
||||||
DynamicPrintConfig& config,
|
DynamicPrintConfig& config,
|
||||||
PrinterTechnology printer_technology);
|
PrinterTechnology printer_technology = ptUnknown);
|
||||||
|
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
Loading…
x
Reference in New Issue
Block a user