mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
Merge remote-tracking branch 'origin/master' into new_main_page_ui
This commit is contained in:
commit
e0bb6bafd5
153 changed files with 20775 additions and 4724 deletions
27
xs/xsp/AppController.xsp
Normal file
27
xs/xsp/AppController.xsp
Normal file
|
@ -0,0 +1,27 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "slic3r/AppController.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/Print.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::PrintController} class PrintController {
|
||||
|
||||
PrintController(Print *print);
|
||||
|
||||
void slice();
|
||||
};
|
||||
|
||||
%name{Slic3r::AppController} class AppController {
|
||||
|
||||
AppController();
|
||||
|
||||
PrintController *print_ctl();
|
||||
void set_model(Model *model);
|
||||
void set_print(Print *print);
|
||||
void set_global_progress_indicator(unsigned gauge_id, unsigned statusbar_id);
|
||||
|
||||
void arrange_model();
|
||||
};
|
|
@ -29,6 +29,10 @@
|
|||
int x_max() %code{% RETVAL = THIS->max.x; %};
|
||||
int y_min() %code{% RETVAL = THIS->min.y; %};
|
||||
int y_max() %code{% RETVAL = THIS->max.y; %};
|
||||
void set_x_min(double val) %code{% THIS->min.x = val; %};
|
||||
void set_x_max(double val) %code{% THIS->max.x = val; %};
|
||||
void set_y_min(double val) %code{% THIS->min.y = val; %};
|
||||
void set_y_max(double val) %code{% THIS->max.y = val; %};
|
||||
std::string serialize() %code{% char buf[2048]; sprintf(buf, "%ld,%ld;%ld,%ld", THIS->min.x, THIS->min.y, THIS->max.x, THIS->max.y); RETVAL = buf; %};
|
||||
bool defined() %code{% RETVAL = THIS->defined; %};
|
||||
|
||||
|
|
|
@ -74,13 +74,13 @@
|
|||
static StaticPrintConfig* new_GCodeConfig()
|
||||
%code{% RETVAL = new GCodeConfig(); %};
|
||||
static StaticPrintConfig* new_PrintConfig()
|
||||
%code{% RETVAL = new PrintConfig(); %};
|
||||
%code{% RETVAL = static_cast<GCodeConfig*>(new PrintConfig()); %};
|
||||
static StaticPrintConfig* new_PrintObjectConfig()
|
||||
%code{% RETVAL = new PrintObjectConfig(); %};
|
||||
static StaticPrintConfig* new_PrintRegionConfig()
|
||||
%code{% RETVAL = new PrintRegionConfig(); %};
|
||||
static StaticPrintConfig* new_FullPrintConfig()
|
||||
%code{% RETVAL = static_cast<PrintObjectConfig*>(new FullPrintConfig()); %};
|
||||
%code{% RETVAL = static_cast<GCodeConfig*>(new FullPrintConfig()); %};
|
||||
~StaticPrintConfig();
|
||||
bool has(t_config_option_key opt_key);
|
||||
SV* as_hash()
|
||||
|
@ -119,7 +119,7 @@
|
|||
auto config = new FullPrintConfig();
|
||||
try {
|
||||
config->load(path);
|
||||
RETVAL = static_cast<PrintObjectConfig*>(config);
|
||||
RETVAL = static_cast<GCodeConfig*>(config);
|
||||
} catch (std::exception& e) {
|
||||
delete config;
|
||||
croak("Error extracting configuration from %s:\n%s\n", path, e.what());
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
try {
|
||||
THIS->do_export(print, path, preview_data);
|
||||
} catch (std::exception& e) {
|
||||
croak(e.what());
|
||||
croak("%s\n", e.what());
|
||||
}
|
||||
%};
|
||||
|
||||
|
|
|
@ -172,3 +172,6 @@ void desktop_open_datadir_folder()
|
|||
|
||||
void fix_model_by_win10_sdk_gui(ModelObject *model_object_src, Print *print, Model *model_dst)
|
||||
%code%{ Slic3r::fix_model_by_win10_sdk_gui(*model_object_src, *print, *model_dst); %};
|
||||
|
||||
void set_3DScene(SV *scene)
|
||||
%code%{ Slic3r::GUI::set_3DScene((_3DScene *)wxPli_sv_2_object(aTHX_ scene, "Slic3r::Model::3DScene") ); %};
|
||||
|
|
|
@ -56,9 +56,13 @@
|
|||
int volume_idx() const;
|
||||
int instance_idx() const;
|
||||
Clone<Pointf3> origin() const
|
||||
%code%{ RETVAL = THIS->origin; %};
|
||||
%code%{ RETVAL = THIS->get_origin(); %};
|
||||
void translate(double x, double y, double z)
|
||||
%code%{ THIS->origin.translate(x, y, z); %};
|
||||
%code%{
|
||||
Pointf3 o = THIS->get_origin();
|
||||
o.translate(x, y, z);
|
||||
THIS->set_origin(o);
|
||||
%};
|
||||
Clone<BoundingBoxf3> bounding_box() const
|
||||
%code%{ RETVAL = THIS->bounding_box; %};
|
||||
Clone<BoundingBoxf3> transformed_bounding_box() const;
|
||||
|
@ -101,10 +105,6 @@
|
|||
void release_geometry();
|
||||
|
||||
void set_print_box(float min_x, float min_y, float min_z, float max_x, float max_y, float max_z);
|
||||
bool check_outside_state(DynamicPrintConfig* config)
|
||||
%code%{
|
||||
RETVAL = THIS->check_outside_state(config);
|
||||
%};
|
||||
|
||||
void reset_outside_state();
|
||||
void update_colors_by_extruder(DynamicPrintConfig* config);
|
||||
|
@ -190,18 +190,6 @@ remove_all_canvases()
|
|||
CODE:
|
||||
_3DScene::remove_all_canvases();
|
||||
|
||||
void
|
||||
reset_current_canvas()
|
||||
CODE:
|
||||
_3DScene::reset_current_canvas();
|
||||
|
||||
void
|
||||
set_active(canvas, active)
|
||||
SV *canvas;
|
||||
bool active;
|
||||
CODE:
|
||||
_3DScene::set_active((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), active);
|
||||
|
||||
void
|
||||
set_as_dirty(canvas)
|
||||
SV *canvas;
|
||||
|
@ -242,7 +230,7 @@ update_volumes_selection(canvas, selections)
|
|||
CODE:
|
||||
_3DScene::update_volumes_selection((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), selections);
|
||||
|
||||
bool
|
||||
int
|
||||
check_volumes_outside_state(canvas, config)
|
||||
SV *canvas;
|
||||
DynamicPrintConfig *config;
|
||||
|
@ -481,6 +469,12 @@ update_volumes_colors_by_extruder(canvas)
|
|||
CODE:
|
||||
_3DScene::update_volumes_colors_by_extruder((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
update_gizmos_data(canvas)
|
||||
SV *canvas;
|
||||
CODE:
|
||||
_3DScene::update_gizmos_data((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"));
|
||||
|
||||
void
|
||||
render(canvas)
|
||||
SV *canvas;
|
||||
|
@ -616,63 +610,25 @@ register_on_gizmo_scale_uniformly_callback(canvas, callback)
|
|||
CODE:
|
||||
_3DScene::register_on_gizmo_scale_uniformly_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
unsigned int
|
||||
finalize_legend_texture()
|
||||
void
|
||||
register_on_gizmo_rotate_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
RETVAL = _3DScene::finalize_legend_texture();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
_3DScene::register_on_gizmo_rotate_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
unsigned int
|
||||
get_legend_texture_width()
|
||||
void
|
||||
register_on_update_geometry_info_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_legend_texture_width();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
unsigned int
|
||||
get_legend_texture_height()
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_legend_texture_height();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
_3DScene::register_on_update_geometry_info_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
reset_legend_texture()
|
||||
CODE:
|
||||
_3DScene::reset_legend_texture();
|
||||
|
||||
void
|
||||
generate_warning_texture(std::string msg)
|
||||
CODE:
|
||||
_3DScene::generate_warning_texture(msg);
|
||||
|
||||
unsigned int
|
||||
finalize_warning_texture()
|
||||
CODE:
|
||||
RETVAL = _3DScene::finalize_warning_texture();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
unsigned int
|
||||
get_warning_texture_width()
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_warning_texture_width();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
unsigned int
|
||||
get_warning_texture_height()
|
||||
CODE:
|
||||
RETVAL = _3DScene::get_warning_texture_height();
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
reset_warning_texture()
|
||||
CODE:
|
||||
_3DScene::reset_warning_texture();
|
||||
|
||||
std::vector<int>
|
||||
load_model_object(canvas, model_object, obj_idx, instance_idxs)
|
||||
SV *canvas;
|
||||
|
|
|
@ -133,7 +133,7 @@ _constant()
|
|||
~Print();
|
||||
|
||||
Ref<StaticPrintConfig> config()
|
||||
%code%{ RETVAL = &THIS->config; %};
|
||||
%code%{ RETVAL = static_cast<GCodeConfig*>(&THIS->config); %};
|
||||
Ref<StaticPrintConfig> default_object_config()
|
||||
%code%{ RETVAL = &THIS->default_object_config; %};
|
||||
Ref<StaticPrintConfig> default_region_config()
|
||||
|
@ -145,8 +145,10 @@ _constant()
|
|||
%code%{ RETVAL = &THIS->skirt; %};
|
||||
Ref<ExtrusionEntityCollection> brim()
|
||||
%code%{ RETVAL = &THIS->brim; %};
|
||||
std::string estimated_print_time()
|
||||
%code%{ RETVAL = THIS->estimated_print_time; %};
|
||||
std::string estimated_normal_print_time()
|
||||
%code%{ RETVAL = THIS->estimated_normal_print_time; %};
|
||||
std::string estimated_silent_print_time()
|
||||
%code%{ RETVAL = THIS->estimated_silent_print_time; %};
|
||||
|
||||
PrintObjectPtrs* objects()
|
||||
%code%{ RETVAL = &THIS->objects; %};
|
||||
|
|
|
@ -216,6 +216,8 @@ Ref<PrintObjectSupportMaterial> O_OBJECT_SLIC3R_T
|
|||
Clone<PrintObjectSupportMaterial> O_OBJECT_SLIC3R_T
|
||||
|
||||
AppConfig* O_OBJECT_SLIC3R
|
||||
AppController* O_OBJECT_SLIC3R
|
||||
PrintController* O_OBJECT_SLIC3R
|
||||
Ref<AppConfig> O_OBJECT_SLIC3R_T
|
||||
|
||||
GLShader* O_OBJECT_SLIC3R
|
||||
|
|
|
@ -268,3 +268,5 @@
|
|||
$CVar = (PrintObjectStep)SvUV($PerlVar);
|
||||
%};
|
||||
};
|
||||
%typemap{AppController*};
|
||||
%typemap{PrintController*};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue