diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2014-06-12 03:00:13 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2014-06-12 03:00:13 +0400 |
commit | 8ee11b32399928a1b022830023f5d45890a8abc9 (patch) | |
tree | da90a309a30e3756d9484d8300a63a5aca50adc5 /xs/xsp/Flow.xsp | |
parent | 9bff6ccde71f25c9849355ed01c77153fd4a4aee (diff) |
Refactoring: keep height in Flow object and calculate spacing on demand
Diffstat (limited to 'xs/xsp/Flow.xsp')
-rw-r--r-- | xs/xsp/Flow.xsp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xs/xsp/Flow.xsp b/xs/xsp/Flow.xsp index 3663a29d5..7c4943145 100644 --- a/xs/xsp/Flow.xsp +++ b/xs/xsp/Flow.xsp @@ -7,7 +7,9 @@ %name{Slic3r::Flow} class Flow { ~Flow(); - %name{_new} Flow(float width, float spacing, float nozzle_diameter); + %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() @@ -15,18 +17,16 @@ float width() %code{% RETVAL = THIS->width; %}; - float spacing() - %code{% RETVAL = THIS->spacing; %}; + float height() + %code{% RETVAL = THIS->height; %}; float nozzle_diameter() %code{% RETVAL = THIS->nozzle_diameter; %}; bool bridge() %code{% RETVAL = THIS->bridge; %}; - long scaled_width() - %code{% RETVAL = THIS->scaled_width; %}; - long scaled_spacing() - %code{% RETVAL = THIS->scaled_spacing; %}; - - double mm3_per_mm(float height); + float spacing(); + long scaled_width(); + long scaled_spacing(); + double mm3_per_mm(); %{ Flow* |