PrusaSlicer-NonPlainar/xs/xsp/Flow.xsp
bubnikv 9a0100d6de Initial definition of PresetHints C++ class and Perl binding, ported the cooling logic hints to C++.
Removed Perl Flow::new_from_spacing bindings.
Some Fill C++11 beautification.
Fix of a support_material_1st_layer_flow, brim_flow and skirt_flow logic to use the extrusion_width if both first_layer_extrusion_width and support_material_extrusion_width are undefined.
Documented the extrusion width logic in the config tooltips, including the default values.
2017-11-09 10:48:06 +01:00

72 lines
1.9 KiB
Plaintext

%module{Slic3r::XS};
%{
#include <xsinit.h>
#include "libslic3r/Flow.hpp"
%}
%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 spacing();
float spacing_to(Flow* other)
%code{% RETVAL = THIS->spacing(*other); %};
long scaled_width();
long scaled_spacing();
double mm3_per_mm();
%{
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
%}
};
%package{Slic3r::Flow};
%{
IV
_constant()
ALIAS:
FLOW_ROLE_EXTERNAL_PERIMETER = frExternalPerimeter
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
%}