2014-01-05 12:16:13 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <myinit.h>
|
2014-08-03 17:42:29 +00:00
|
|
|
#include "libslic3r/Flow.hpp"
|
2014-01-05 12:16:13 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::Flow} class Flow {
|
|
|
|
~Flow();
|
2014-06-11 23:00:13 +00:00
|
|
|
%name{_new} Flow(float width, float height, float nozzle_diameter);
|
|
|
|
void set_height(float height)
|
|
|
|
%code{% THIS->height = height; %};
|
2014-01-05 12:16:13 +00:00
|
|
|
void set_bridge(bool bridge)
|
|
|
|
%code{% THIS->bridge = bridge; %};
|
2014-04-27 17:18:53 +00:00
|
|
|
Clone<Flow> clone()
|
|
|
|
%code{% RETVAL = THIS; %};
|
2014-01-05 12:16:13 +00:00
|
|
|
|
|
|
|
float width()
|
|
|
|
%code{% RETVAL = THIS->width; %};
|
2014-06-11 23:00:13 +00:00
|
|
|
float height()
|
|
|
|
%code{% RETVAL = THIS->height; %};
|
2014-01-05 12:16:13 +00:00
|
|
|
float nozzle_diameter()
|
|
|
|
%code{% RETVAL = THIS->nozzle_diameter; %};
|
|
|
|
bool bridge()
|
|
|
|
%code{% RETVAL = THIS->bridge; %};
|
2014-06-11 23:00:13 +00:00
|
|
|
float spacing();
|
2014-06-12 07:15:40 +00:00
|
|
|
float spacing_to(Flow* other)
|
|
|
|
%code{% RETVAL = THIS->spacing(*other); %};
|
2014-06-11 23:00:13 +00:00
|
|
|
long scaled_width();
|
|
|
|
long scaled_spacing();
|
|
|
|
double mm3_per_mm();
|
2014-01-05 12:16:13 +00:00
|
|
|
%{
|
|
|
|
|
|
|
|
Flow*
|
|
|
|
_new_from_width(CLASS, role, width, nozzle_diameter, height, bridge_flow_ratio)
|
|
|
|
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));
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
Flow*
|
|
|
|
_new_from_spacing(CLASS, spacing, nozzle_diameter, height, bridge)
|
|
|
|
char* CLASS;
|
|
|
|
float spacing;
|
|
|
|
float nozzle_diameter;
|
|
|
|
float height;
|
|
|
|
bool bridge;
|
|
|
|
CODE:
|
|
|
|
RETVAL = new Flow(Flow::new_from_spacing(spacing, nozzle_diameter, height, bridge));
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
%}
|
|
|
|
};
|
|
|
|
|
|
|
|
%package{Slic3r::Flow};
|
|
|
|
%{
|
|
|
|
|
|
|
|
IV
|
|
|
|
_constant()
|
|
|
|
ALIAS:
|
2014-06-09 19:14:48 +00:00
|
|
|
FLOW_ROLE_EXTERNAL_PERIMETER = frExternalPerimeter
|
2014-01-05 12:16:13 +00:00
|
|
|
FLOW_ROLE_PERIMETER = frPerimeter
|
|
|
|
FLOW_ROLE_INFILL = frInfill
|
|
|
|
FLOW_ROLE_SOLID_INFILL = frSolidInfill
|
|
|
|
FLOW_ROLE_TOP_SOLID_INFILL = frTopSolidInfill
|
|
|
|
FLOW_ROLE_SUPPORT_MATERIAL = frSupportMaterial
|
|
|
|
FLOW_ROLE_SUPPORT_MATERIAL_INTERFACE = frSupportMaterialInterface
|
|
|
|
PROTOTYPE:
|
|
|
|
CODE:
|
|
|
|
RETVAL = ix;
|
|
|
|
OUTPUT: RETVAL
|
|
|
|
|
|
|
|
%}
|
|
|
|
|