mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-23 00:29:26 -07:00
New extrusion math
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user