slic3r.pl 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. #!/usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. BEGIN {
  5. use FindBin;
  6. use lib "$FindBin::Bin/lib";
  7. use local::lib '--no-create', "$FindBin::Bin/local-lib";
  8. }
  9. use File::Basename qw(basename);
  10. use Getopt::Long qw(:config no_auto_abbrev);
  11. use List::Util qw(first);
  12. #use POSIX qw(setlocale LC_NUMERIC);
  13. use Slic3r;
  14. use Slic3r::Geometry qw(deg2rad);
  15. use Time::HiRes qw(gettimeofday tv_interval);
  16. $|++;
  17. binmode STDOUT, ':utf8';
  18. # Convert all parameters from the local code page to utf8 on Windows.
  19. @ARGV = map Slic3r::decode_path($_), @ARGV if $^O eq 'MSWin32';
  20. our %opt = ();
  21. my %cli_options = ();
  22. {
  23. my %options = (
  24. 'help' => sub { usage() },
  25. 'version' => sub { print "$Slic3r::VERSION\n"; exit 0 },
  26. 'debug' => \$Slic3r::debug,
  27. 'gui' => \$opt{gui},
  28. 'no-gui' => \$opt{no_gui},
  29. 'o|output=s' => \$opt{output},
  30. 'save=s' => \$opt{save},
  31. 'load=s@' => \$opt{load},
  32. 'autosave=s' => \$opt{autosave},
  33. 'ignore-nonexistent-config' => \$opt{ignore_nonexistent_config},
  34. 'no-controller' => \$opt{no_controller},
  35. 'no-plater' => \$opt{no_plater},
  36. 'gui-mode=s' => \$opt{obsolete_ignore_this_option_gui_mode},
  37. 'datadir=s' => \$opt{datadir},
  38. 'export-svg' => \$opt{export_svg},
  39. 'merge|m' => \$opt{merge},
  40. 'repair' => \$opt{repair},
  41. 'cut=f' => \$opt{cut},
  42. 'split' => \$opt{split},
  43. 'info' => \$opt{info},
  44. 'scale=f' => \$opt{scale},
  45. 'rotate=f' => \$opt{rotate},
  46. 'duplicate=i' => \$opt{duplicate},
  47. 'duplicate-grid=s' => \$opt{duplicate_grid},
  48. 'print-center=s' => \$opt{print_center},
  49. 'dont-arrange' => \$opt{dont_arrange},
  50. );
  51. foreach my $opt_key (keys %{$Slic3r::Config::Options}) {
  52. my $cli = $Slic3r::Config::Options->{$opt_key}->{cli} or next;
  53. # allow both the dash-separated option name and the full opt_key
  54. $options{ "$opt_key|$cli" } = \$cli_options{$opt_key};
  55. }
  56. @ARGV = grep !/^-psn_\d/, @ARGV if $^O eq 'darwin';
  57. GetOptions(%options) or usage(1);
  58. }
  59. # load configuration files
  60. my @external_configs = ();
  61. if ($opt{load}) {
  62. foreach my $configfile (@{$opt{load}}) {
  63. if (-e $configfile) {
  64. push @external_configs, Slic3r::Config::load($configfile);
  65. } elsif (-e "$FindBin::Bin/$configfile") {
  66. printf STDERR "Loading $FindBin::Bin/$configfile\n";
  67. push @external_configs, Slic3r::Config::load("$FindBin::Bin/$configfile");
  68. } else {
  69. $opt{ignore_nonexistent_config} or die "Cannot find specified configuration file ($configfile).\n";
  70. }
  71. }
  72. }
  73. # process command line options
  74. my $cli_config = Slic3r::Config->new;
  75. foreach my $c (@external_configs, Slic3r::Config->new_from_cli(%cli_options)) {
  76. $c->normalize; # expand shortcuts before applying, otherwise destination values would be already filled with defaults
  77. $cli_config->apply($c);
  78. }
  79. # save configuration
  80. if ($opt{save}) {
  81. if (@{$cli_config->get_keys} > 0) {
  82. $cli_config->save($opt{save});
  83. } else {
  84. Slic3r::Config::new_from_defaults->save($opt{save});
  85. }
  86. }
  87. # apply command line config on top of default config
  88. my $config = Slic3r::Config::new_from_defaults;
  89. $config->apply($cli_config);
  90. # launch GUI
  91. my $gui;
  92. if ((!@ARGV || $opt{gui}) && !$opt{no_gui} && !$opt{save} && eval "require Slic3r::GUI; 1") {
  93. {
  94. no warnings 'once';
  95. $Slic3r::GUI::datadir = Slic3r::decode_path($opt{datadir} // '');
  96. $Slic3r::GUI::no_controller = $opt{no_controller};
  97. $Slic3r::GUI::no_plater = $opt{no_plater};
  98. $Slic3r::GUI::autosave = $opt{autosave};
  99. }
  100. $gui = Slic3r::GUI->new;
  101. #setlocale(LC_NUMERIC, 'C');
  102. $gui->{mainframe}->load_config_file($_) for @{$opt{load}};
  103. $gui->{mainframe}->load_config($cli_config);
  104. my @input_files = @ARGV;
  105. $gui->{mainframe}{plater}->load_files(\@input_files) unless $opt{no_plater};
  106. $gui->MainLoop;
  107. exit;
  108. }
  109. die $@ if $@ && $opt{gui};
  110. if (@ARGV) { # slicing from command line
  111. $config->validate;
  112. if ($opt{repair}) {
  113. foreach my $file (@ARGV) {
  114. die "Repair is currently supported only on STL files\n"
  115. if $file !~ /\.[sS][tT][lL]$/;
  116. my $output_file = $file;
  117. $output_file =~ s/\.([sS][tT][lL])$/_fixed.obj/;
  118. my $tmesh = Slic3r::TriangleMesh->new;
  119. $tmesh->ReadSTLFile($file);
  120. $tmesh->repair;
  121. $tmesh->WriteOBJFile($output_file);
  122. }
  123. exit;
  124. }
  125. if ($opt{cut}) {
  126. foreach my $file (@ARGV) {
  127. my $model = Slic3r::Model->read_from_file($file);
  128. my $mesh = $model->mesh;
  129. $mesh->translate(0, 0, -$mesh->bounding_box->z_min);
  130. my $upper = Slic3r::TriangleMesh->new;
  131. my $lower = Slic3r::TriangleMesh->new;
  132. $mesh->cut($opt{cut}, $upper, $lower);
  133. $upper->repair;
  134. $lower->repair;
  135. $upper->write_ascii("${file}_upper.stl")
  136. if $upper->facets_count > 0;
  137. $lower->write_ascii("${file}_lower.stl")
  138. if $lower->facets_count > 0;
  139. }
  140. exit;
  141. }
  142. if ($opt{split}) {
  143. foreach my $file (@ARGV) {
  144. my $model = Slic3r::Model->read_from_file($file);
  145. my $mesh = $model->mesh;
  146. $mesh->repair;
  147. my $part_count = 0;
  148. foreach my $new_mesh (@{$mesh->split}) {
  149. my $output_file = sprintf '%s_%02d.stl', $file, ++$part_count;
  150. printf "Writing to %s\n", basename($output_file);
  151. $new_mesh->write_binary($output_file);
  152. }
  153. }
  154. exit;
  155. }
  156. while (my $input_file = shift @ARGV) {
  157. my $model;
  158. if ($opt{merge}) {
  159. my @models = map Slic3r::Model->read_from_file($_), $input_file, (splice @ARGV, 0);
  160. $model = Slic3r::Model->merge(@models);
  161. } else {
  162. $model = Slic3r::Model->read_from_file($input_file);
  163. }
  164. if ($opt{info}) {
  165. $model->print_info;
  166. next;
  167. }
  168. if (defined $opt{duplicate_grid}) {
  169. $opt{duplicate_grid} = [ split /[,x]/, $opt{duplicate_grid}, 2 ];
  170. }
  171. if (defined $opt{print_center}) {
  172. $opt{print_center} = Slic3r::Pointf->new(split /[,x]/, $opt{print_center}, 2);
  173. }
  174. my $sprint = Slic3r::Print::Simple->new(
  175. scale => $opt{scale} // 1,
  176. rotate => deg2rad($opt{rotate} // 0),
  177. duplicate => $opt{duplicate} // 1,
  178. duplicate_grid => $opt{duplicate_grid} // [1,1],
  179. print_center => $opt{print_center} // Slic3r::Pointf->new(100,100),
  180. dont_arrange => $opt{dont_arrange} // 0,
  181. status_cb => sub {
  182. my ($percent, $message) = @_;
  183. printf "=> %s\n", $message;
  184. },
  185. output_file => $opt{output},
  186. );
  187. # This is delegated to C++ PrintObject::apply_config().
  188. $sprint->apply_config($config);
  189. $sprint->set_model($model);
  190. # Do the apply_config once again to validate the layer height profiles at all the newly added PrintObjects.
  191. $sprint->apply_config($config);
  192. if ($opt{export_svg}) {
  193. $sprint->export_svg;
  194. } else {
  195. my $t0 = [gettimeofday];
  196. # The following call may die if the output_filename_format template substitution fails,
  197. # if the file cannot be written into, or if the post processing scripts cannot be executed.
  198. $sprint->export_gcode;
  199. # output some statistics
  200. {
  201. my $duration = tv_interval($t0);
  202. printf "Done. Process took %d minutes and %.3f seconds\n",
  203. int($duration/60), ($duration - int($duration/60)*60); # % truncates to integer
  204. }
  205. printf "Filament required: %.1fmm (%.1fcm3)\n",
  206. $sprint->total_used_filament, $sprint->total_extruded_volume/1000;
  207. }
  208. }
  209. } else {
  210. usage(1) unless $opt{save};
  211. }
  212. sub usage {
  213. my ($exit_code) = @_;
  214. my $config = Slic3r::Config::new_from_defaults->as_hash;
  215. print <<"EOF";
  216. Slic3r $Slic3r::VERSION is a STL-to-GCODE translator for RepRap 3D printers
  217. written by Alessandro Ranellucci <aar\@cpan.org> - http://slic3r.org/
  218. Usage: slic3r.pl [ OPTIONS ] [ file.stl ] [ file2.stl ] ...
  219. --help Output this usage screen and exit
  220. --version Output the version of Slic3r and exit
  221. --save <file> Save configuration to the specified file
  222. --load <file> Load configuration from the specified file. It can be used
  223. more than once to load options from multiple files.
  224. -o, --output <file> File to output gcode to (by default, the file will be saved
  225. into the same directory as the input file using the
  226. --output-filename-format to generate the filename.) If a
  227. directory is specified for this option, the output will
  228. be saved under that directory, and the filename will be
  229. generated by --output-filename-format.
  230. Non-slicing actions (no G-code will be generated):
  231. --repair Repair given STL files and save them as <name>_fixed.obj
  232. --cut <z> Cut given input files at given Z (relative) and export
  233. them as <name>_upper.stl and <name>_lower.stl
  234. --split Split the shells contained in given STL file into several STL files
  235. --info Output information about the supplied file(s) and exit
  236. -j, --threads <num> Number of threads to use (1+, default: $config->{threads})
  237. GUI options:
  238. --gui Forces the GUI launch instead of command line slicing (if you
  239. supply a model file, it will be loaded into the plater)
  240. --no-plater Disable the plater tab
  241. --no-gui Forces the command line slicing instead of gui.
  242. This takes precedence over --gui if both are present.
  243. --autosave <file> Automatically export current configuration to the specified file
  244. Output options:
  245. --output-filename-format
  246. Output file name format; all config options enclosed in brackets
  247. will be replaced by their values, as well as [input_filename_base]
  248. and [input_filename] (default: $config->{output_filename_format})
  249. --post-process Generated G-code will be processed with the supplied script;
  250. call this more than once to process through multiple scripts.
  251. --export-svg Export a SVG file containing slices instead of G-code.
  252. -m, --merge If multiple files are supplied, they will be composed into a single
  253. print rather than processed individually.
  254. Printer options:
  255. --nozzle-diameter Diameter of nozzle in mm (default: $config->{nozzle_diameter}->[0])
  256. --print-center Coordinates in mm of the point to center the print around
  257. (default: 100,100)
  258. --z-offset Additional height in mm to add to vertical coordinates
  259. (+/-, default: $config->{z_offset})
  260. --gcode-flavor The type of G-code to generate (reprap/teacup/repetier/makerware/sailfish/mach3/machinekit/smoothie/no-extrusion,
  261. default: $config->{gcode_flavor})
  262. --use-relative-e-distances Enable this to get relative E values (default: no)
  263. --use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
  264. --use-volumetric-e Express E in cubic millimeters and prepend M200 (default: no)
  265. --set-and-wait-temperatures Use M190 instead of M140 for temperature changes past the first (default: no)
  266. --gcode-comments Make G-code verbose by adding comments (default: no)
  267. Filament options:
  268. --filament-diameter Diameter in mm of your raw filament (default: $config->{filament_diameter}->[0])
  269. --extrusion-multiplier
  270. Change this to alter the amount of plastic extruded. There should be
  271. very little need to change this value, which is only useful to
  272. compensate for filament packing (default: $config->{extrusion_multiplier}->[0])
  273. --temperature Extrusion temperature in degree Celsius, set 0 to disable (default: $config->{temperature}->[0])
  274. --first-layer-temperature Extrusion temperature for the first layer, in degree Celsius,
  275. set 0 to disable (default: same as --temperature)
  276. --bed-temperature Heated bed temperature in degree Celsius, set 0 to disable (default: $config->{bed_temperature}[0])
  277. --first-layer-bed-temperature Heated bed temperature for the first layer, in degree Celsius,
  278. set 0 to disable (default: same as --bed-temperature)
  279. Speed options:
  280. --travel-speed Speed of non-print moves in mm/s (default: $config->{travel_speed})
  281. --perimeter-speed Speed of print moves for perimeters in mm/s (default: $config->{perimeter_speed})
  282. --small-perimeter-speed
  283. Speed of print moves for small perimeters in mm/s or % over perimeter speed
  284. (default: $config->{small_perimeter_speed})
  285. --external-perimeter-speed
  286. Speed of print moves for the external perimeter in mm/s or % over perimeter speed
  287. (default: $config->{external_perimeter_speed})
  288. --infill-speed Speed of print moves in mm/s (default: $config->{infill_speed})
  289. --solid-infill-speed Speed of print moves for solid surfaces in mm/s or % over infill speed
  290. (default: $config->{solid_infill_speed})
  291. --top-solid-infill-speed Speed of print moves for top surfaces in mm/s or % over solid infill speed
  292. (default: $config->{top_solid_infill_speed})
  293. --support-material-speed
  294. Speed of support material print moves in mm/s (default: $config->{support_material_speed})
  295. --support-material-interface-speed
  296. Speed of support material interface print moves in mm/s or % over support material
  297. speed (default: $config->{support_material_interface_speed})
  298. --bridge-speed Speed of bridge print moves in mm/s (default: $config->{bridge_speed})
  299. --gap-fill-speed Speed of gap fill print moves in mm/s (default: $config->{gap_fill_speed})
  300. --first-layer-speed Speed of print moves for bottom layer, expressed either as an absolute
  301. value or as a percentage over normal speeds (default: $config->{first_layer_speed})
  302. Acceleration options:
  303. --perimeter-acceleration
  304. Overrides firmware's default acceleration for perimeters. (mm/s^2, set zero
  305. to disable; default: $config->{perimeter_acceleration})
  306. --infill-acceleration
  307. Overrides firmware's default acceleration for infill. (mm/s^2, set zero
  308. to disable; default: $config->{infill_acceleration})
  309. --bridge-acceleration
  310. Overrides firmware's default acceleration for bridges. (mm/s^2, set zero
  311. to disable; default: $config->{bridge_acceleration})
  312. --first-layer-acceleration
  313. Overrides firmware's default acceleration for first layer. (mm/s^2, set zero
  314. to disable; default: $config->{first_layer_acceleration})
  315. --default-acceleration
  316. Acceleration will be reset to this value after the specific settings above
  317. have been applied. (mm/s^2, set zero to disable; default: $config->{default_acceleration})
  318. Accuracy options:
  319. --layer-height Layer height in mm (default: $config->{layer_height})
  320. --first-layer-height Layer height for first layer (mm or %, default: $config->{first_layer_height})
  321. --infill-every-layers
  322. Infill every N layers (default: $config->{infill_every_layers})
  323. --solid-infill-every-layers
  324. Force a solid layer every N layers (default: $config->{solid_infill_every_layers})
  325. Print options:
  326. --perimeters Number of perimeters/horizontal skins (range: 0+, default: $config->{perimeters})
  327. --top-solid-layers Number of solid layers to do for top surfaces (range: 0+, default: $config->{top_solid_layers})
  328. --bottom-solid-layers Number of solid layers to do for bottom surfaces (range: 0+, default: $config->{bottom_solid_layers})
  329. --solid-layers Shortcut for setting the two options above at once
  330. --fill-density Infill density (range: 0%-100%, default: $config->{fill_density}%)
  331. --fill-angle Infill angle in degrees (range: 0-90, default: $config->{fill_angle})
  332. --fill-pattern Pattern to use to fill non-solid layers (default: $config->{fill_pattern})
  333. --top-fill-pattern Pattern to use to fill solid layers (default: $config->{top_fill_pattern})
  334. --bottom-fill-pattern Pattern to use to fill solid layers (default: $config->{bottom_fill_pattern})
  335. --start-gcode Load initial G-code from the supplied file. This will overwrite
  336. the default command (home all axes [G28]).
  337. --end-gcode Load final G-code from the supplied file. This will overwrite
  338. the default commands (turn off temperature [M104 S0],
  339. home X axis [G28 X], disable motors [M84]).
  340. --before-layer-gcode Load before-layer-change G-code from the supplied file (default: nothing).
  341. --layer-gcode Load layer-change G-code from the supplied file (default: nothing).
  342. --toolchange-gcode Load tool-change G-code from the supplied file (default: nothing).
  343. --seam-position Position of loop starting points (random/nearest/aligned, default: $config->{seam_position}).
  344. --external-perimeters-first Reverse perimeter order. (default: no)
  345. --spiral-vase Experimental option to raise Z gradually when printing single-walled vases
  346. (default: no)
  347. --only-retract-when-crossing-perimeters
  348. Disable retraction when travelling between infill paths inside the same island.
  349. (default: no)
  350. --solid-infill-below-area
  351. Force solid infill when a region has a smaller area than this threshold
  352. (mm^2, default: $config->{solid_infill_below_area})
  353. --infill-only-where-needed
  354. Only infill under ceilings (default: no)
  355. --infill-first Make infill before perimeters (default: no)
  356. Quality options (slower slicing):
  357. --extra-perimeters Add more perimeters when needed (default: yes)
  358. --one-top-perimeter Only draw 1 perimeter for the top layers (default: yes)
  359. --ensure-vertical-shell-thickness Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top+bottom solid layers). (default: no)
  360. --avoid-crossing-perimeters Optimize travel moves so that no perimeters are crossed (default: no)
  361. --thin-walls Detect single-width walls (default: yes)
  362. --overhangs Experimental option to use bridge flow, speed and fan for overhangs
  363. (default: yes)
  364. Support material options:
  365. --support-material Generate support material for overhangs
  366. --support-material-threshold
  367. Overhang threshold angle (range: 0-90, set 0 for automatic detection,
  368. default: $config->{support_material_threshold})
  369. --support-material-pattern
  370. Pattern to use for support material (default: $config->{support_material_pattern})
  371. --support-material-with-sheath
  372. Add a sheath (a single perimeter line) around the base support.
  373. This makes the support more reliable, but also more difficult to remove. (default: yes)
  374. --support-material-spacing
  375. Spacing between pattern lines (mm, default: $config->{support_material_spacing})
  376. --support-material-angle
  377. Support material angle in degrees (range: 0-90, default: $config->{support_material_angle})
  378. --support-material-contact-distance
  379. Vertical distance between object and support material (0+, default: $config->{support_material_contact_distance})
  380. --support-material-xy-spacing
  381. "XY separation between an object and its support. If expressed as percentage (for example 50%),
  382. it will be calculated over external perimeter width (default: half of exteral perimeter width)
  383. --support-material-interface-layers
  384. Number of perpendicular layers between support material and object (0+, default: $config->{support_material_interface_layers})
  385. --support-material-interface-spacing
  386. Spacing between interface pattern lines (mm, set 0 to get a solid layer, default: $config->{support_material_interface_spacing})
  387. --raft-layers Number of layers to raise the printed objects by (range: 0+, default: $config->{raft_layers})
  388. --support-material-enforce-layers
  389. Enforce support material on the specified number of layers from bottom,
  390. regardless of --support-material and threshold (0+, default: $config->{support_material_enforce_layers})
  391. --support-material-buildplate-only
  392. Only create support if it lies on a build plate. Don't create support on a print. (default: no)
  393. --dont-support-bridges
  394. Experimental option for preventing support material from being generated under bridged areas (default: yes)
  395. Retraction options:
  396. --retract-length Length of retraction in mm when pausing extrusion (default: $config->{retract_length}[0])
  397. --retract-speed Speed for retraction in mm/s (default: $config->{retract_speed}[0])
  398. --deretract-speed Speed for deretraction (loading of filament after a retract) in mm/s (default: $config->{retract_speed}[0])
  399. --retract-restart-extra
  400. Additional amount of filament in mm to push after
  401. compensating retraction (default: $config->{retract_restart_extra}[0])
  402. --retract-before-travel
  403. Only retract before travel moves of this length in mm (default: $config->{retract_before_travel}[0])
  404. --retract-lift Lift Z by the given distance in mm when retracting (default: $config->{retract_lift}[0])
  405. --retract-lift-above Only lift Z when above the specified height (default: $config->{retract_lift_above}[0])
  406. --retract-lift-below Only lift Z when below the specified height (default: $config->{retract_lift_below}[0])
  407. --retract-layer-change
  408. Enforce a retraction before each Z move (default: no)
  409. --wipe Wipe the nozzle while doing a retraction (default: no)
  410. Retraction options for multi-extruder setups:
  411. --retract-length-toolchange
  412. Length of retraction in mm when disabling tool (default: $config->{retract_length_toolchange}[0])
  413. --retract-restart-extra-toolchange
  414. Additional amount of filament in mm to push after
  415. switching tool (default: $config->{retract_restart_extra_toolchange}[0])
  416. Cooling options:
  417. --cooling Enable fan and cooling control
  418. --min-fan-speed Minimum fan speed (default: $config->{min_fan_speed}[0]%)
  419. --max-fan-speed Maximum fan speed (default: $config->{max_fan_speed}[0]%)
  420. --bridge-fan-speed Fan speed to use when bridging (default: $config->{bridge_fan_speed}[0]%)
  421. --fan-below-layer-time Enable fan if layer print time is below this approximate number
  422. of seconds (default: $config->{fan_below_layer_time}[0])
  423. --slowdown-below-layer-time Slow down if layer print time is below this approximate number
  424. of seconds (default: $config->{slowdown_below_layer_time}[0])
  425. --min-print-speed Minimum print speed (mm/s, default: $config->{min_print_speed}[0])
  426. --disable-fan-first-layers Disable fan for the first N layers (default: $config->{disable_fan_first_layers}[0])
  427. --fan-always-on Keep fan always on at min fan speed, even for layers that don't need
  428. cooling
  429. Skirt options:
  430. --skirts Number of skirts to draw (0+, default: $config->{skirts})
  431. --skirt-distance Distance in mm between innermost skirt and object
  432. (default: $config->{skirt_distance})
  433. --skirt-height Height of skirts to draw (expressed in layers, 0+, default: $config->{skirt_height})
  434. --min-skirt-length Generate no less than the number of loops required to consume this length
  435. of filament on the first layer, for each extruder (mm, 0+, default: $config->{min_skirt_length})
  436. --brim-width Width of the brim that will get added to each object to help adhesion
  437. (mm, default: $config->{brim_width})
  438. Transform options:
  439. --scale Factor for scaling input object (default: 1)
  440. --rotate Rotation angle in degrees (0-360, default: 0)
  441. --duplicate Number of items with auto-arrange (1+, default: 1)
  442. --duplicate-grid Number of items with grid arrangement (default: 1,1)
  443. --duplicate-distance Distance in mm between copies (default: $config->{duplicate_distance})
  444. --dont-arrange Don't arrange the objects on the build plate. The model coordinates
  445. define the absolute positions on the build plate.
  446. The option --print-center will be ignored.
  447. --clip_multipart_objects
  448. When printing multi-material objects, this settings will make slic3r to clip the overlapping
  449. object parts one by the other (2nd part will be clipped by the 1st, 3rd part will be clipped
  450. by the 1st and 2nd etc). (default: $config->{clip_multipart_objects})";
  451. --elefant-foot-compensation
  452. Shrink the first layer by the configured value to compensate for the 1st layer squish
  453. aka an Elefant Foot effect (mm, default: $config->{elefant_foot_compensation})
  454. --xy-size-compensation
  455. Grow/shrink objects by the configured absolute distance (mm, default: $config->{xy_size_compensation})
  456. Sequential printing options:
  457. --complete-objects When printing multiple objects and/or copies, complete each one before
  458. starting the next one; watch out for extruder collisions (default: no)
  459. --extruder-clearance-radius Radius in mm above which extruder won't collide with anything
  460. (default: $config->{extruder_clearance_radius})
  461. --extruder-clearance-height Maximum vertical extruder depth; i.e. vertical distance from
  462. extruder tip and carriage bottom (default: $config->{extruder_clearance_height})
  463. Miscellaneous options:
  464. --notes Notes to be added as comments to the output file
  465. --resolution Minimum detail resolution (mm, set zero for full resolution, default: $config->{resolution})
  466. Flow options (advanced):
  467. --extrusion-width Set extrusion width manually; it accepts either an absolute value in mm
  468. (like 0.65) or a percentage over layer height (like 200%)
  469. --first-layer-extrusion-width
  470. Set a different extrusion width for first layer
  471. --perimeter-extrusion-width
  472. Set a different extrusion width for perimeters
  473. --external-perimeter-extrusion-width
  474. Set a different extrusion width for external perimeters
  475. --infill-extrusion-width
  476. Set a different extrusion width for infill
  477. --solid-infill-extrusion-width
  478. Set a different extrusion width for solid infill
  479. --top-infill-extrusion-width
  480. Set a different extrusion width for top infill
  481. --support-material-extrusion-width
  482. Set a different extrusion width for support material
  483. --infill-overlap Overlap between infill and perimeters (default: $config->{infill_overlap})
  484. --bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: $config->{bridge_flow_ratio})
  485. --over-bridge-flow-ratio Multiplier for extrusion when solid-filling over a bridge (> 0, default: $config->{over_bridge_flow_ratio})
  486. Multiple extruder options:
  487. --extruder-offset Offset of each extruder, if firmware doesn't handle the displacement
  488. (can be specified multiple times, default: 0x0)
  489. --perimeter-extruder
  490. Extruder to use for perimeters and brim (1+, default: $config->{perimeter_extruder})
  491. --infill-extruder Extruder to use for infill (1+, default: $config->{infill_extruder})
  492. --solid-infill-extruder Extruder to use for solid infill (1+, default: $config->{solid_infill_extruder})
  493. --support-material-extruder
  494. Extruder to use for support material, raft and skirt
  495. (1+, 0 to use the current extruder to minimize tool changes, default: $config->{support_material_extruder})
  496. --support-material-interface-extruder
  497. Extruder to use for support material interface
  498. (1+, 0 to use the current extruder to minimize tool changes, default: $config->{support_material_interface_extruder})
  499. --ooze-prevention Drop temperature and park extruders outside a full skirt for automatic wiping
  500. (default: no)
  501. --standby-temperature-delta
  502. Temperature difference to be applied when an extruder is not active and
  503. --ooze-prevention is enabled (default: $config->{standby_temperature_delta})
  504. EOF
  505. exit ($exit_code || 0);
  506. }
  507. __END__