mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-11-25 21:46:30 +01:00
Large refactoring. Cleaner logic, smaller memory footprint.
This commit is contained in:
1 parent
13ef24b5eb
commit
8598b66b0a
6 files changed
+178
-247
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user