mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 00:55:54 +08:00
FIX: check bounds for fill->min_spacing causing fill_density<100 to abort (#4524)
* FIX: check bounds for fill->min_spacing causing fill_density<100 to abort * Added time-stamping to SVG files * Delete .gitignore * Revert "Added time-stamping to SVG files" This reverts commit 625ad15b50fc0b5acc3011cfb1dfdc826ba78a4e. * Set a sane default instead of aborting. * Don't return status If there's an exceptional condition, should use exceptions instead. * Changing to not return bool.
This commit is contained in:
parent
37ade98017
commit
f337fdcc62
@ -154,12 +154,13 @@ main(int argc, char **argv)
|
||||
boost::nowide::cout << "File exported to " << outfile << std::endl;
|
||||
} else if (cli_config.export_svg) {
|
||||
std::string outfile = cli_config.output.value;
|
||||
if (outfile.empty()) outfile = model.objects.front()->input_file + ".svg";
|
||||
|
||||
SLAPrint print(&model);
|
||||
print.config.apply(print_config, true);
|
||||
print.slice();
|
||||
print.write_svg(outfile);
|
||||
if (outfile.empty())
|
||||
outfile = model.objects.front()->input_file + ".svg";
|
||||
|
||||
SLAPrint print(&model); // initialize print with model
|
||||
print.config.apply(print_config, true); // apply configuration
|
||||
print.slice(); // slice file
|
||||
print.write_svg(outfile); // write SVG
|
||||
boost::nowide::cout << "SVG file exported to " << outfile << std::endl;
|
||||
} else if (cli_config.export_3mf) {
|
||||
std::string outfile = cli_config.output.value;
|
||||
|
@ -63,7 +63,11 @@ SLAPrint::slice()
|
||||
fill->min_spacing = this->config.get_abs_value("infill_extrusion_width", this->config.layer_height.value);
|
||||
fill->angle = Geometry::deg2rad(this->config.fill_angle.value);
|
||||
fill->density = this->config.fill_density.value/100;
|
||||
|
||||
|
||||
// Minimum spacing has a lower bound of > 0. Set to a sane default
|
||||
// if the user gets an invalid value here.
|
||||
fill->min_spacing = (fill->min_spacing <= 0 ? 0.5 : fill->min_spacing);
|
||||
|
||||
parallelize<size_t>(
|
||||
0,
|
||||
this->layers.size()-1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user