New slicing algorithm based on a topological approach rather than numeric. It should be much more robust

This commit is contained in:
Alessandro Ranellucci 2012-02-18 20:36:14 +01:00
parent de88144649
commit a9e7204fc6
6 changed files with 339 additions and 271 deletions

View file

@ -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