mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Merging with master, solving conflicts.
This commit is contained in:
commit
a49643ebdb
5 changed files with 49 additions and 19 deletions
|
@ -89,7 +89,7 @@ Then `cd` into the `deps` directory and use these commands to build:
|
||||||
You can also use the Visual Studio GUI or other generators as mentioned above.
|
You can also use the Visual Studio GUI or other generators as mentioned above.
|
||||||
|
|
||||||
The `DESTDIR` option is the location where the bundle will be installed.
|
The `DESTDIR` option is the location where the bundle will be installed.
|
||||||
This may be customized. If you leave it empty, the `DESTDIR` will be places inside the same `build` directory.
|
This may be customized. If you leave it empty, the `DESTDIR` will be placed inside the same `build` directory.
|
||||||
|
|
||||||
Warning: If the `build` directory is nested too deep inside other folders, various file paths during the build
|
Warning: If the `build` directory is nested too deep inside other folders, various file paths during the build
|
||||||
become too long and the build might fail due to file writing errors. For this reason, it is recommended to
|
become too long and the build might fail due to file writing errors. For this reason, it is recommended to
|
||||||
|
|
|
@ -2408,6 +2408,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
{
|
{
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
|
|
||||||
|
if (is_bridge(path.role()))
|
||||||
|
description += " (bridge)";
|
||||||
|
|
||||||
// go to first point of extrusion path
|
// go to first point of extrusion path
|
||||||
if (!m_last_pos_defined || m_last_pos != path.first_point()) {
|
if (!m_last_pos_defined || m_last_pos != path.first_point()) {
|
||||||
gcode += this->travel_to(
|
gcode += this->travel_to(
|
||||||
|
|
|
@ -369,7 +369,7 @@ public:
|
||||||
const SLAPrintConfig& print_config() const { return m_print_config; }
|
const SLAPrintConfig& print_config() const { return m_print_config; }
|
||||||
const SLAPrinterConfig& printer_config() const { return m_printer_config; }
|
const SLAPrinterConfig& printer_config() const { return m_printer_config; }
|
||||||
const SLAMaterialConfig& material_config() const { return m_material_config; }
|
const SLAMaterialConfig& material_config() const { return m_material_config; }
|
||||||
|
const SLAPrintObjectConfig& default_object_config() const { return m_default_object_config; }
|
||||||
|
|
||||||
std::string output_filename() const override;
|
std::string output_filename() const override;
|
||||||
|
|
||||||
|
|
|
@ -5012,23 +5012,30 @@ void GLCanvas3D::_render_sla_slices() const
|
||||||
if ((bottom_obj_triangles.empty() || bottom_sup_triangles.empty() || top_obj_triangles.empty() || top_sup_triangles.empty()) &&
|
if ((bottom_obj_triangles.empty() || bottom_sup_triangles.empty() || top_obj_triangles.empty() || top_sup_triangles.empty()) &&
|
||||||
obj->is_step_done(slaposIndexSlices) && !obj->get_slice_index().empty())
|
obj->is_step_done(slaposIndexSlices) && !obj->get_slice_index().empty())
|
||||||
{
|
{
|
||||||
|
double layer_height = print->default_object_config().layer_height.value;
|
||||||
double initial_layer_height = print->material_config().initial_layer_height.value;
|
double initial_layer_height = print->material_config().initial_layer_height.value;
|
||||||
|
|
||||||
coord_t key_zero = obj->get_slice_index().front().print_level();
|
coord_t key_zero = obj->get_slice_index().front().print_level();
|
||||||
coord_t key_low = coord_t((clip_min_z - initial_layer_height) / SCALING_FACTOR) + key_zero;
|
// Slice at the center of the slab starting at clip_min_z will be rendered for the lower plane.
|
||||||
|
coord_t key_low = coord_t((clip_min_z - initial_layer_height + layer_height) / SCALING_FACTOR) + key_zero;
|
||||||
|
// Slice at the center of the slab ending at clip_max_z will be rendered for the upper plane.
|
||||||
coord_t key_high = coord_t((clip_max_z - initial_layer_height) / SCALING_FACTOR) + key_zero;
|
coord_t key_high = coord_t((clip_max_z - initial_layer_height) / SCALING_FACTOR) + key_zero;
|
||||||
|
|
||||||
SliceRecord slice_low = obj->closest_slice_to_print_level(key_low, coord_t(SCALED_EPSILON));
|
const SliceRecord& slice_low = obj->closest_slice_to_print_level(key_low, coord_t(SCALED_EPSILON));
|
||||||
SliceRecord slice_high = obj->closest_slice_to_print_level(key_high, coord_t(SCALED_EPSILON));
|
const SliceRecord& slice_high = obj->closest_slice_to_print_level(key_high, coord_t(SCALED_EPSILON));
|
||||||
|
|
||||||
|
// Offset to avoid OpenGL Z fighting between the object's horizontal surfaces and the triangluated surfaces of the cuts.
|
||||||
|
double plane_shift_z = 0.002;
|
||||||
|
|
||||||
if (! slice_low.is_valid()) {
|
if (! slice_low.is_valid()) {
|
||||||
const ExPolygons& obj_bottom = slice_low.get_slice(soModel);
|
const ExPolygons& obj_bottom = slice_low.get_slice(soModel);
|
||||||
const ExPolygons& sup_bottom = slice_low.get_slice(soSupport);
|
const ExPolygons& sup_bottom = slice_low.get_slice(soSupport);
|
||||||
// calculate model bottom cap
|
// calculate model bottom cap
|
||||||
if (bottom_obj_triangles.empty() && !obj_bottom.empty())
|
if (bottom_obj_triangles.empty() && !obj_bottom.empty())
|
||||||
bottom_obj_triangles = triangulate_expolygons_3d(obj_bottom, clip_min_z, true);
|
bottom_obj_triangles = triangulate_expolygons_3d(obj_bottom, clip_min_z - plane_shift_z, true);
|
||||||
// calculate support bottom cap
|
// calculate support bottom cap
|
||||||
if (bottom_sup_triangles.empty() && !sup_bottom.empty())
|
if (bottom_sup_triangles.empty() && !sup_bottom.empty())
|
||||||
bottom_sup_triangles = triangulate_expolygons_3d(sup_bottom, clip_min_z, true);
|
bottom_sup_triangles = triangulate_expolygons_3d(sup_bottom, clip_min_z - plane_shift_z, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! slice_high.is_valid()) {
|
if (! slice_high.is_valid()) {
|
||||||
|
@ -5036,10 +5043,10 @@ void GLCanvas3D::_render_sla_slices() const
|
||||||
const ExPolygons& sup_top = slice_high.get_slice(soSupport);
|
const ExPolygons& sup_top = slice_high.get_slice(soSupport);
|
||||||
// calculate model top cap
|
// calculate model top cap
|
||||||
if (top_obj_triangles.empty() && !obj_top.empty())
|
if (top_obj_triangles.empty() && !obj_top.empty())
|
||||||
top_obj_triangles = triangulate_expolygons_3d(obj_top, clip_max_z, false);
|
top_obj_triangles = triangulate_expolygons_3d(obj_top, clip_max_z + plane_shift_z, false);
|
||||||
// calculate support top cap
|
// calculate support top cap
|
||||||
if (top_sup_triangles.empty() && !sup_top.empty())
|
if (top_sup_triangles.empty() && !sup_top.empty())
|
||||||
top_sup_triangles = triangulate_expolygons_3d(sup_top, clip_max_z, false);
|
top_sup_triangles = triangulate_expolygons_3d(sup_top, clip_max_z + plane_shift_z, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
#include <wx/menuitem.h>
|
#include <wx/menuitem.h>
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
|
#include <wx/progdlg.h>
|
||||||
#include <wx/dir.h>
|
#include <wx/dir.h>
|
||||||
#include <wx/wupdlock.h>
|
#include <wx/wupdlock.h>
|
||||||
#include <wx/filefn.h>
|
#include <wx/filefn.h>
|
||||||
|
@ -279,31 +280,50 @@ void GUI_App::set_label_clr_sys(const wxColour& clr) {
|
||||||
|
|
||||||
void GUI_App::recreate_GUI()
|
void GUI_App::recreate_GUI()
|
||||||
{
|
{
|
||||||
|
// Weird things happen as the Paint messages are floating around the windows being destructed.
|
||||||
|
// Avoid the Paint messages by hiding the main window.
|
||||||
|
// Also the application closes much faster without these unnecessary screen refreshes.
|
||||||
|
// In addition, there were some crashes due to the Paint events sent to already destructed windows.
|
||||||
|
mainframe->Show(false);
|
||||||
|
|
||||||
|
const auto msg_name = _(L("Changing of an application language")) + dots;
|
||||||
|
wxProgressDialog dlg(msg_name, msg_name);
|
||||||
|
dlg.Pulse();
|
||||||
|
|
||||||
// to make sure nobody accesses data from the soon-to-be-destroyed widgets:
|
// to make sure nobody accesses data from the soon-to-be-destroyed widgets:
|
||||||
tabs_list.clear();
|
tabs_list.clear();
|
||||||
plater_ = nullptr;
|
plater_ = nullptr;
|
||||||
|
|
||||||
|
dlg.Update(10, _(L("Recreating")) + dots);
|
||||||
|
|
||||||
MainFrame* topwindow = mainframe;
|
MainFrame* topwindow = mainframe;
|
||||||
mainframe = new MainFrame();
|
mainframe = new MainFrame();
|
||||||
sidebar().obj_list()->init_objects(); // propagate model objects to object list
|
sidebar().obj_list()->init_objects(); // propagate model objects to object list
|
||||||
|
|
||||||
if (topwindow) {
|
if (topwindow) {
|
||||||
SetTopWindow(mainframe);
|
SetTopWindow(mainframe);
|
||||||
|
|
||||||
|
dlg.Update(30, _(L("Recreating")) + dots);
|
||||||
topwindow->Destroy();
|
topwindow->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dlg.Update(80, _(L("Loading of a current presets")) + dots);
|
||||||
|
|
||||||
m_printhost_job_queue.reset(new PrintHostJobQueue(mainframe->printhost_queue_dlg()));
|
m_printhost_job_queue.reset(new PrintHostJobQueue(mainframe->printhost_queue_dlg()));
|
||||||
|
|
||||||
load_current_presets();
|
load_current_presets();
|
||||||
|
|
||||||
mainframe->Show(true);
|
mainframe->Show(true);
|
||||||
|
|
||||||
// On OSX the UI was not initialized correctly if the wizard was called
|
dlg.Update(90, _(L("Loading of a mode view")) + dots);
|
||||||
// before the UI was up and running.
|
|
||||||
CallAfter([]() {
|
update_mode();
|
||||||
// Run the config wizard, don't offer the "reset user profile" checkbox.
|
|
||||||
config_wizard_startup(true);
|
// #ys_FIXME_delete_after_testing Do we still need this ?
|
||||||
});
|
// CallAfter([]() {
|
||||||
|
// // Run the config wizard, don't offer the "reset user profile" checkbox.
|
||||||
|
// config_wizard_startup(true);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI_App::system_info()
|
void GUI_App::system_info()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue