Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Flow.xsp « xsp « xs - github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 09c6fd5768a25c1c7d8f5b00d8bf81133930c214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%module{Slic3r::XS};

%{
#include <myinit.h>
#include "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

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:
    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

%}