Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions wipe_towers_v01.pl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/perl -i
# WIPE TOWERS v01
# PERL POSTPROCESSOR FOR ADDING WIPE TOWERS TO SLIC3R
# YUNOMAKE.COM
# (c) Moritz Walter 2015

#!/usr/bin/perl -i
use strict;
use warnings;
use Math::Round;
Expand Down Expand Up @@ -93,23 +93,23 @@

my $bypass=0;

for(my $i=0;$i<$extruders;$i++){
$linesByExtruder[$i]=();
$gcodeX[$i]=0;
$gcodeY[$i]=0;
$gcodeE[$i]=0;
$gcodeRetraction[$i]=0;
}

##########
# MAIN LOOP
##########

while (<>) {
if($start==0){
readParams($_);
evaluateLine($_);
print;
readParams($_);
for(my $i=0;$i<$extruders;$i++){
$linesByExtruder[$i]=();
$gcodeX[$i]=0;
$gcodeY[$i]=0;
$gcodeE[$i]=0;
$gcodeRetraction[$i]=0;
}
evaluateLine($_);
print;
}elsif($end==1){
print; # just print out everything after the end code marker
}elsif (/^T(\d)/){
Expand Down Expand Up @@ -779,4 +779,4 @@ sub readParams{ # collecting params
if($_[0]=~/extrusionFeedrate=(\d*\.?\d*)/){
$extrusionFeedrate=$1*60.0;
}
}
}