mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge remote-tracking branch 'origin/tm_fix_commandline'
This commit is contained in:
commit
c4c2cf4ead
2 changed files with 21 additions and 7 deletions
|
@ -162,9 +162,25 @@ int CLI::run(int argc, char **argv)
|
||||||
|
|
||||||
// Initialize full print configs for both the FFF and SLA technologies.
|
// Initialize full print configs for both the FFF and SLA technologies.
|
||||||
FullPrintConfig fff_print_config;
|
FullPrintConfig fff_print_config;
|
||||||
// SLAFullPrintConfig sla_print_config;
|
SLAFullPrintConfig sla_print_config;
|
||||||
|
|
||||||
|
// Synchronize the default parameters and the ones received on the command line.
|
||||||
|
if (printer_technology == ptFFF) {
|
||||||
fff_print_config.apply(m_print_config, true);
|
fff_print_config.apply(m_print_config, true);
|
||||||
// sla_print_config.apply(m_print_config, true);
|
m_print_config.apply(fff_print_config, true);
|
||||||
|
} else if (printer_technology == ptSLA) {
|
||||||
|
// The default value has to be different from the one in fff mode.
|
||||||
|
sla_print_config.output_filename_format.value = "[input_filename_base].sl1";
|
||||||
|
|
||||||
|
// The default bed shape should reflect the default display parameters
|
||||||
|
// and not the fff defaults.
|
||||||
|
double w = sla_print_config.display_width.getFloat();
|
||||||
|
double h = sla_print_config.display_height.getFloat();
|
||||||
|
sla_print_config.bed_shape.values = { Vec2d(0, 0), Vec2d(w, 0), Vec2d(w, h), Vec2d(0, h) };
|
||||||
|
|
||||||
|
sla_print_config.apply(m_print_config, true);
|
||||||
|
m_print_config.apply(sla_print_config, true);
|
||||||
|
}
|
||||||
|
|
||||||
// Loop through transform options.
|
// Loop through transform options.
|
||||||
bool user_center_specified = false;
|
bool user_center_specified = false;
|
||||||
|
|
|
@ -597,9 +597,7 @@ void SLAPrint::finalize()
|
||||||
std::string SLAPrint::output_filename(const std::string &filename_base) const
|
std::string SLAPrint::output_filename(const std::string &filename_base) const
|
||||||
{
|
{
|
||||||
DynamicConfig config = this->finished() ? this->print_statistics().config() : this->print_statistics().placeholders();
|
DynamicConfig config = this->finished() ? this->print_statistics().config() : this->print_statistics().placeholders();
|
||||||
// we need to remove the extension from the format string or the following call to PrintBase::output_filename() won't be able to change it to ".sl1"
|
return this->PrintBase::output_filename(m_print_config.output_filename_format.value, ".sl1", filename_base, &config);
|
||||||
std::string format = boost::filesystem::path(m_print_config.output_filename_format.value).replace_extension("").string();
|
|
||||||
return this->PrintBase::output_filename(format, ".sl1", filename_base, &config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SLAPrint::validate() const
|
std::string SLAPrint::validate() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue