fixing build issues
This commit is contained in:
parent
15ad0ef2f2
commit
f5b1729af3
3 changed files with 7 additions and 32 deletions
|
@ -256,7 +256,7 @@ void PrintController::slice()
|
||||||
slice(pri);
|
slice(pri);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IProgressIndicator::message_fmt(
|
void ProgressIndicator::message_fmt(
|
||||||
const string &fmtstr, ...) {
|
const string &fmtstr, ...) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -311,35 +311,7 @@ void AppController::arrange_model()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dist = print_ctl()->config().min_object_distance();
|
auto dist = print_ctl()->config().min_object_distance();
|
||||||
|
|
||||||
// Create the arranger config
|
|
||||||
auto min_obj_distance = static_cast<Coord>(dist/SCALING_FACTOR);
|
|
||||||
|
|
||||||
auto& bedpoints = print_ctl()->config().bed_shape.values;
|
|
||||||
Polyline bed; bed.points.reserve(bedpoints.size());
|
|
||||||
for(auto& v : bedpoints)
|
|
||||||
bed.append(Point::new_scale(v.x, v.y));
|
|
||||||
|
|
||||||
if(pind) pind->update(0, _(L("Arranging objects...")));
|
|
||||||
|
|
||||||
try {
|
|
||||||
arr::arrange(*model_,
|
|
||||||
min_obj_distance,
|
|
||||||
bed,
|
|
||||||
arr::BOX,
|
|
||||||
false, // create many piles not just one pile
|
|
||||||
[pind, count](unsigned rem) {
|
|
||||||
if(pind)
|
|
||||||
pind->update(count - rem, _(L("Arranging objects...")));
|
|
||||||
});
|
|
||||||
} catch(std::exception& e) {
|
|
||||||
std::cerr << e.what() << std::endl;
|
|
||||||
report_issue(IssueType::ERR,
|
|
||||||
_(L("Could not arrange model objects! "
|
|
||||||
"Some geometries may be invalid.")),
|
|
||||||
_(L("Exception occurred")));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the arranger config
|
// Create the arranger config
|
||||||
auto min_obj_distance = static_cast<Coord>(dist/SCALING_FACTOR);
|
auto min_obj_distance = static_cast<Coord>(dist/SCALING_FACTOR);
|
||||||
|
@ -347,7 +319,7 @@ void AppController::arrange_model()
|
||||||
auto& bedpoints = print_ctl()->config().bed_shape.values;
|
auto& bedpoints = print_ctl()->config().bed_shape.values;
|
||||||
Polyline bed; bed.points.reserve(bedpoints.size());
|
Polyline bed; bed.points.reserve(bedpoints.size());
|
||||||
for(auto& v : bedpoints)
|
for(auto& v : bedpoints)
|
||||||
bed.append(Point::new_scale(v(0), v(1)));
|
bed.append(Point::new_scale(v.x, v.y));
|
||||||
|
|
||||||
if(pind) pind->update(0, _(L("Arranging objects...")));
|
if(pind) pind->update(0, _(L("Arranging objects...")));
|
||||||
|
|
||||||
|
@ -357,7 +329,7 @@ void AppController::arrange_model()
|
||||||
bed,
|
bed,
|
||||||
arr::BOX,
|
arr::BOX,
|
||||||
false, // create many piles not just one pile
|
false, // create many piles not just one pile
|
||||||
[this, pind, count](unsigned rem) {
|
[pind, count](unsigned rem) {
|
||||||
if(pind)
|
if(pind)
|
||||||
pind->update(count - rem, _(L("Arranging objects...")));
|
pind->update(count - rem, _(L("Arranging objects...")));
|
||||||
});
|
});
|
||||||
|
|
|
@ -181,6 +181,8 @@ void set_main_frame(wxFrame *main_frame)
|
||||||
g_wxMainFrame = main_frame;
|
g_wxMainFrame = main_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxFrame* get_main_frame() { return g_wxMainFrame; }
|
||||||
|
|
||||||
void set_tab_panel(wxNotebook *tab_panel)
|
void set_tab_panel(wxNotebook *tab_panel)
|
||||||
{
|
{
|
||||||
g_wxTabPanel = tab_panel;
|
g_wxTabPanel = tab_panel;
|
||||||
|
|
|
@ -97,6 +97,7 @@ void set_3DScene(_3DScene *scene);
|
||||||
AppConfig* get_app_config();
|
AppConfig* get_app_config();
|
||||||
wxApp* get_app();
|
wxApp* get_app();
|
||||||
PresetBundle* get_preset_bundle();
|
PresetBundle* get_preset_bundle();
|
||||||
|
wxFrame* get_main_frame();
|
||||||
|
|
||||||
const wxColour& get_label_clr_modified();
|
const wxColour& get_label_clr_modified();
|
||||||
const wxColour& get_label_clr_sys();
|
const wxColour& get_label_clr_sys();
|
||||||
|
|
Loading…
Reference in a new issue