mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Generate GCODE
This commit is contained in:
@@ -14,8 +14,7 @@ sub parse_file {
|
||||
my $self = shift;
|
||||
my ($file) = @_;
|
||||
|
||||
my $print = Slic3r::Print->new;
|
||||
|
||||
# open STL file
|
||||
my $stl = CAD::Format::STL->new->load($file);
|
||||
|
||||
# we only want to work with positive coordinates, so let's
|
||||
@@ -31,6 +30,12 @@ sub parse_file {
|
||||
}
|
||||
}
|
||||
|
||||
# initialize print job
|
||||
my $print = Slic3r::Print->new(
|
||||
x_length => ($extents[X][MAX] - $extents[X][MIN]) / $Slic3r::resolution,
|
||||
y_length => ($extents[Y][MAX] - $extents[Y][MIN]) / $Slic3r::resolution,
|
||||
);
|
||||
|
||||
# calculate the displacements needed to
|
||||
# have lowest value for each axis at coordinate 0
|
||||
my @shift = map 0 - $extents[$_][MIN], X,Y,Z;
|
||||
|
||||
Reference in New Issue
Block a user