mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-06-21 17:03:01 +08:00
16 lines
283 B
Perl
16 lines
283 B
Perl
#!/usr/bin/perl -i
|
|
#
|
|
# Remove all toolchange commands (and T# arguments) from gcode.
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
# read stdin and any/all files passed as parameters one line at a time
|
|
while (<>) {
|
|
if (not /^T[0-9]/) {
|
|
s/\s*(T[0-9])//;
|
|
print;
|
|
} else {
|
|
}
|
|
}
|