mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 14:55:08 -06:00
Fixing unit tests.
This commit is contained in:
parent
ceea9de8b8
commit
8e27e355c2
7 changed files with 30 additions and 75 deletions
|
@ -158,7 +158,6 @@ sub new {
|
|||
my $self = $class->_new(
|
||||
@args{qw(width height nozzle_diameter)},
|
||||
);
|
||||
$self->set_bridge($args{bridge} // 0);
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
@ -166,7 +165,7 @@ sub new_from_width {
|
|||
my ($class, %args) = @_;
|
||||
|
||||
return $class->_new_from_width(
|
||||
@args{qw(role width nozzle_diameter layer_height bridge_flow_ratio)},
|
||||
@args{qw(role width nozzle_diameter layer_height)},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,21 +8,13 @@
|
|||
%name{Slic3r::Flow} class Flow {
|
||||
~Flow();
|
||||
%name{_new} Flow(float width, float height, float nozzle_diameter);
|
||||
void set_height(float height)
|
||||
%code{% THIS->height = height; %};
|
||||
void set_bridge(bool bridge)
|
||||
%code{% THIS->bridge = bridge; %};
|
||||
Clone<Flow> clone()
|
||||
%code{% RETVAL = THIS; %};
|
||||
|
||||
float width()
|
||||
%code{% RETVAL = THIS->width; %};
|
||||
float height()
|
||||
%code{% RETVAL = THIS->height; %};
|
||||
float nozzle_diameter()
|
||||
%code{% RETVAL = THIS->nozzle_diameter; %};
|
||||
bool bridge()
|
||||
%code{% RETVAL = THIS->bridge; %};
|
||||
float width();
|
||||
float height();
|
||||
float nozzle_diameter();
|
||||
bool bridge();
|
||||
float spacing();
|
||||
float spacing_to(Flow* other)
|
||||
%code{% RETVAL = THIS->spacing(*other); %};
|
||||
|
@ -32,17 +24,16 @@
|
|||
%{
|
||||
|
||||
Flow*
|
||||
_new_from_width(CLASS, role, width, nozzle_diameter, height, bridge_flow_ratio)
|
||||
_new_from_width(CLASS, role, width, nozzle_diameter, height)
|
||||
char* CLASS;
|
||||
FlowRole role;
|
||||
std::string width;
|
||||
float nozzle_diameter;
|
||||
float height;
|
||||
float bridge_flow_ratio;
|
||||
CODE:
|
||||
ConfigOptionFloatOrPercent optwidth;
|
||||
optwidth.deserialize(width);
|
||||
RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height, bridge_flow_ratio));
|
||||
RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height));
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
Ref<ExtrusionEntityCollection> fills()
|
||||
%code%{ RETVAL = &THIS->fills; %};
|
||||
|
||||
Clone<Flow> flow(FlowRole role, bool bridge = false, double width = -1)
|
||||
%code%{ RETVAL = THIS->flow(role, bridge, width); %};
|
||||
Clone<Flow> flow(FlowRole role)
|
||||
%code%{ RETVAL = THIS->flow(role); %};
|
||||
void prepare_fill_surfaces();
|
||||
void make_perimeters(SurfaceCollection* slices, SurfaceCollection* fill_surfaces)
|
||||
%code%{ THIS->make_perimeters(*slices, fill_surfaces); %};
|
||||
|
|
|
@ -33,9 +33,6 @@ _constant()
|
|||
Ref<StaticPrintConfig> config()
|
||||
%code%{ RETVAL = &THIS->config(); %};
|
||||
Ref<Print> print();
|
||||
|
||||
Clone<Flow> flow(FlowRole role, double layer_height, bool bridge, bool first_layer, double width, PrintObject* object)
|
||||
%code%{ RETVAL = THIS->flow(role, layer_height, bridge, first_layer, width, *object); %};
|
||||
};
|
||||
|
||||
%name{Slic3r::Print::Object} class PrintObject {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue