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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-06-20 21:23:05 +0300
committerbubnikv <bubnikv@gmail.com>2019-06-20 21:23:05 +0300
commitac6969c992b8b260f804790edc10d98412ea8060 (patch)
tree92e8725ed362782ce9721969b4703d111cd0a5f6 /xs
parent8bf6e69851657bbd9242d54d8e08f706fcdb1874 (diff)
Reworked the Perl unit / integration tests to use the same Print
interface that the application is using. Old interface used just for the integration tests was removed.
Diffstat (limited to 'xs')
-rw-r--r--xs/xsp/Config.xsp2
-rw-r--r--xs/xsp/Model.xsp1
-rw-r--r--xs/xsp/Print.xsp6
3 files changed, 6 insertions, 3 deletions
diff --git a/xs/xsp/Config.xsp b/xs/xsp/Config.xsp
index 4d48a2c6f..e193a2321 100644
--- a/xs/xsp/Config.xsp
+++ b/xs/xsp/Config.xsp
@@ -49,7 +49,7 @@
void erase(t_config_option_key opt_key);
void normalize();
%name{setenv} void setenv_();
- double min_object_distance() %code{% RETVAL = PrintConfig::min_object_distance(THIS); %};
+ double min_object_distance() %code{% PrintConfig cfg; cfg.apply(*THIS, true); RETVAL = cfg.min_object_distance(); %};
static DynamicPrintConfig* load(char *path)
%code%{
auto config = new DynamicPrintConfig();
diff --git a/xs/xsp/Model.xsp b/xs/xsp/Model.xsp
index af4cdce06..35b1c01ce 100644
--- a/xs/xsp/Model.xsp
+++ b/xs/xsp/Model.xsp
@@ -211,6 +211,7 @@ ModelMaterial::attributes()
void set_origin_translation(Vec3d* point)
%code%{ THIS->origin_translation = *point; %};
+ void ensure_on_bed();
bool needed_repair() const;
int materials_count() const;
int facets_count();
diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp
index 70313ff5e..df5f48587 100644
--- a/xs/xsp/Print.xsp
+++ b/xs/xsp/Print.xsp
@@ -70,6 +70,8 @@ _constant()
Print();
~Print();
+ Ref<Model> model()
+ %code%{ RETVAL = const_cast<Model*>(&THIS->model()); %};
Ref<StaticPrintConfig> config()
%code%{ RETVAL = const_cast<GCodeConfig*>(static_cast<const GCodeConfig*>(&THIS->config())); %};
Ref<PlaceholderParser> placeholder_parser()
@@ -140,8 +142,8 @@ _constant()
}
%};
- bool apply_config_perl_tests_only(DynamicPrintConfig* config)
- %code%{ RETVAL = THIS->apply_config_perl_tests_only(*config); %};
+ bool apply(Model *model, DynamicPrintConfig* config)
+ %code%{ RETVAL = THIS->apply(*model, *config); %};
bool has_infinite_skirt();
std::vector<unsigned int> extruders() const;
int validate() %code%{