mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Ported is_solid() and is_bridge() to XS. Also ported (but not used yet) group() to SurfaceCollection::group()
This commit is contained in:
@@ -7,12 +7,6 @@ our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(S_TYPE_TOP S_TYPE_BOTTOM S_TYPE_INTERNAL S_TYPE_INTERNALSOLID S_TYPE_INTERNALBRIDGE S_TYPE_INTERNALVOID);
|
||||
our %EXPORT_TAGS = (types => \@EXPORT_OK);
|
||||
|
||||
# delegate handles
|
||||
sub contains_point { $_[0]->expolygon->contains_point }
|
||||
sub lines { $_[0]->expolygon->lines }
|
||||
sub contour { $_[0]->expolygon->contour }
|
||||
sub holes { $_[0]->expolygon->holes }
|
||||
|
||||
# static method to group surfaces having same surface_type, bridge_angle and thickness*
|
||||
sub group {
|
||||
my $class = shift;
|
||||
@@ -43,20 +37,4 @@ sub p {
|
||||
return @{$self->polygons};
|
||||
}
|
||||
|
||||
sub is_solid {
|
||||
my $self = shift;
|
||||
my $type = $self->surface_type;
|
||||
# S_TYPE_INTERNALBRIDGE is not solid because we can't merge it with other solid types
|
||||
return $type == S_TYPE_TOP
|
||||
|| $type == S_TYPE_BOTTOM
|
||||
|| $type == S_TYPE_INTERNALSOLID;
|
||||
}
|
||||
|
||||
sub is_bridge {
|
||||
my $self = shift;
|
||||
my $type = $self->surface_type;
|
||||
return $type == S_TYPE_BOTTOM
|
||||
|| $type == S_TYPE_INTERNALBRIDGE;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user