Merge remote-tracking branch 'origin/master' into vb_undo_redo

This commit is contained in:
bubnikv
2019-07-04 20:22:15 +02:00
105 changed files with 3283 additions and 1599 deletions

View File

@@ -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();

View File

@@ -206,16 +206,12 @@ ModelMaterial::attributes()
Ref<Model> model()
%code%{ RETVAL = THIS->get_model(); %};
t_layer_height_ranges layer_height_ranges()
%code%{ RETVAL = THIS->layer_height_ranges; %};
void set_layer_height_ranges(t_layer_height_ranges ranges)
%code%{ THIS->layer_height_ranges = ranges; %};
Ref<Vec3d> origin_translation()
%code%{ RETVAL = &THIS->origin_translation; %};
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();

View File

@@ -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()
@@ -100,7 +102,6 @@ _constant()
%code%{ RETVAL = const_cast<PrintObjectPtrs*>(&THIS->objects()); %};
Ref<PrintObject> get_object(int idx)
%code%{ RETVAL = THIS->objects()[idx]; %};
void reload_object(int idx);
size_t object_count()
%code%{ RETVAL = THIS->objects().size(); %};
@@ -141,9 +142,8 @@ _constant()
}
%};
void add_model_object(ModelObject* model_object, int idx = -1);
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%{