mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 19:52:39 -07:00
22 lines
229 B
Perl
Executable File
22 lines
229 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
my $z = 0;
|
|
|
|
for (<>) {
|
|
if (/Z(\d+(\.\d+)?)/) {
|
|
$z = $1;
|
|
print;
|
|
}
|
|
else {
|
|
if (!/Z/ && /X/ && /Y/ && $z > 0) {
|
|
s/\s*([\r\n\;\(].*)//gs;
|
|
print "$_ Z$z $1";
|
|
}
|
|
else {
|
|
print;
|
|
}
|
|
}
|
|
}
|