mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
New slicing algorithm based on a topological approach rather than numeric. It should be much more robust
This commit is contained in:
parent
de88144649
commit
a9e7204fc6
6 changed files with 339 additions and 271 deletions
|
@ -56,17 +56,8 @@ sub new_from_mesh {
|
|||
y_length => $size[Y],
|
||||
);
|
||||
|
||||
$mesh->make_edge_table;
|
||||
|
||||
# process facets
|
||||
for (my $i = 0; $i <= $#{$mesh->facets}; $i++) {
|
||||
my $facet = $mesh->facets->[$i];
|
||||
|
||||
# transform vertex coordinates
|
||||
my ($normal, @vertices) = @$facet;
|
||||
$mesh->slice_facet($print, $i, $normal, @vertices);
|
||||
}
|
||||
|
||||
$mesh->slice_facet($print, $_) for 0..$#{$mesh->facets};
|
||||
die "Invalid input file\n" if !@{$print->layers};
|
||||
|
||||
# remove last layer if empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue