Multi-Extrusion-post-processing-scripts-for-Slic3r icon indicating copy to clipboard operation
Multi-Extrusion-post-processing-scripts-for-Slic3r copied to clipboard

Wrong travel values

Open HoraK-FDF opened this issue 7 years ago • 2 comments

Hi,

wipe_towers_v02.pl generates wrong travel values for me i don't know if it depends on a special version i use the version visible in the top line of the files in the attached zip. The values are huge like "G1 X-555 Y855 E70345.1856 F3000". The way i can maximum travel is X180xY180 so i took that as values for the bedWidth/bedDepth or should take the real size of the bed (x=210.40 y=200.50)? The second extruder can reach 16mm over 180 on the X-axis so using the real bed values seems wrong. Maybe is it better to call bedWidth/bedDepth XMax/YMax or so then if it refers to the travel maximum. To print to the maximum possible bed X size a new parameter like extruder_offset would be needed and error messages or so if the towers are placed somewhere outside the range of the extruder in my case the offset is 32 so the ranges are for extruder1 0 till 180-16 and for extruder2 0+32 till 180+16.

test-dual-extruder_cubes-pillars-script.zip

HoraK-FDF avatar Feb 06 '18 23:02 HoraK-FDF

I have tested it with Slic3r 1.2.9 there it works flawlessly maybe the whole problem is on the Slic3r side.

HoraK-FDF avatar Feb 07 '18 19:02 HoraK-FDF

After i changed some values in slic3r 1.2.9 i got the bug again so i searched a bit and found out that the script don't handles values for "Default extrusion width" in percent so i changed:

if($_[0]=~/extrusionWidth=(\d*\.?\d*)/){
	# Use the specified extrusion width, unless it is set to the "automatic" value of 0 (Slic3r default),
	# in which case the pre-initialized value of $nozzleDiameter will be used
	unless ( $1 eq "0" ) {
	    $extrusionWidth=$1*1.0;
	}
}

to

if($_[0]=~/extrusionWidth=(\d*\.?\d*)%/){
	# slic3r provides a value in percent so calculate the value
	$extrusionWidth=$nozzleDiameter/100*$1;
}elsif($_[0]=~/extrusionWidth=(\d*\.?\d*)/){
	# Use the specified extrusion width, unless it is set to the "automatic" value of 0 (Slic3r default),
	# in which case the pre-initialized value of $nozzleDiameter will be used
	unless ( $1 eq "0" ) {
	    $extrusionWidth=$1*1.0;
	}
}

in sub readParams

HoraK-FDF avatar Feb 07 '18 23:02 HoraK-FDF