mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Large refactoring. Cleaner logic, smaller memory footprint.
This commit is contained in:
parent
13ef24b5eb
commit
8598b66b0a
6 changed files with 178 additions and 247 deletions
|
@ -52,9 +52,13 @@ sub cast_from_expolygon {
|
|||
# static method to group surfaces having same surface_type and bridge_angle
|
||||
sub group {
|
||||
my $class = shift;
|
||||
my $params = ref $_[0] eq 'HASH' ? shift(@_) : {};
|
||||
my (@surfaces) = @_;
|
||||
|
||||
my $unique_type = sub { $_[0]->surface_type . "_" . ($_[0]->bridge_angle || '') };
|
||||
my $unique_type = sub {
|
||||
($params->{merge_solid} && $_[0]->surface_type =~ /top|bottom|solid/
|
||||
? 'solid' : $_[0]->surface_type) . "_" . ($_[0]->bridge_angle || '');
|
||||
};
|
||||
my @unique_types = ();
|
||||
foreach my $surface (@surfaces) {
|
||||
my $type = $unique_type->($surface);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue