New extrusion math
This commit is contained in:
parent
ea88cad8e3
commit
55f2247cd9
4 changed files with 13 additions and 10 deletions
|
@ -87,10 +87,9 @@ sub extrude {
|
|||
# calculate how much filament to drive into the extruder
|
||||
# to get the desired amount of extruded plastic
|
||||
my $e = $line->a->distance_to($line->b) * $Slic3r::resolution
|
||||
* $Slic3r::flow_width
|
||||
* $Slic3r::layer_height
|
||||
/ (($Slic3r::filament_diameter ** 2) * PI)
|
||||
/ $Slic3r::filament_packing_density;
|
||||
* (($Slic3r::nozzle_diameter**2) / ($Slic3r::filament_diameter ** 2))
|
||||
* $Slic3r::thickness_ratio
|
||||
* $Slic3r::filament_packing_density;
|
||||
|
||||
$gcode .= $self->G1($line->b, undef, $e, $description);
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ sub export_gcode {
|
|||
# write start commands to file
|
||||
# TODO: this must be customizable by user
|
||||
print $fh "G28 ; home all axes\n";
|
||||
printf $fh "M109 S%d ; wait for temperature to be reached\n", $Slic3r::temperature;
|
||||
printf $fh "M104 S%d ; wait for temperature to be reached\n", $Slic3r::temperature;
|
||||
print $fh "G90 ; use absolute coordinates\n";
|
||||
print $fh "G21 ; set units to millimeters\n";
|
||||
if ($Slic3r::use_relative_e_distances) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue