mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
Incomplete work for porting BoundingBox to XS
This commit is contained in:
parent
3e93a14912
commit
9c0a6a79d3
17 changed files with 421 additions and 18 deletions
|
|
@ -33,14 +33,6 @@ sub new_from_bb {
|
|||
]);
|
||||
}
|
||||
|
||||
# 3D
|
||||
sub new_from_points_3D {
|
||||
my $class = shift;
|
||||
my ($points) = @_;
|
||||
|
||||
return $class->new(extents => [ Slic3r::Geometry::bounding_box_3D($points) ]);
|
||||
}
|
||||
|
||||
sub merge {
|
||||
my $class = shift;
|
||||
my (@bounding_boxes) = @_;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ sub set_material {
|
|||
my $self = shift;
|
||||
my ($material_id, $attributes) = @_;
|
||||
|
||||
return $self->materials->{$material_id} = Slic3r::Model::Region->new(
|
||||
return $self->materials->{$material_id} = Slic3r::Model::Material->new(
|
||||
model => $self,
|
||||
attributes => $attributes || {},
|
||||
);
|
||||
|
|
@ -319,7 +319,7 @@ sub get_material_name {
|
|||
return $name;
|
||||
}
|
||||
|
||||
package Slic3r::Model::Region;
|
||||
package Slic3r::Model::Material;
|
||||
use Moo;
|
||||
|
||||
has 'model' => (is => 'ro', weak_ref => 1, required => 1);
|
||||
|
|
|
|||
|
|
@ -24,9 +24,4 @@ sub facets_count {
|
|||
return $self->stats->{number_of_facets};
|
||||
}
|
||||
|
||||
sub bounding_box {
|
||||
my $self = shift;
|
||||
return Slic3r::Geometry::BoundingBox->new_from_bb($self->bb3);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue