Merge remote-tracking branch 'origin/master' into tm_colldetection_upgr
This commit is contained in:
commit
203ed3724f
4
deps/deps-windows.cmake
vendored
4
deps/deps-windows.cmake
vendored
@ -15,8 +15,8 @@ endif ()
|
||||
|
||||
ExternalProject_Add(dep_boost
|
||||
EXCLUDE_FROM_ALL 1
|
||||
URL "https://dl.bintray.com/boostorg/release/1.63.0/source/boost_1_63_0.tar.gz"
|
||||
URL_HASH SHA256=fe34a4e119798e10b8cc9e565b3b0284e9fd3977ec8a1b19586ad1dec397088b
|
||||
URL "https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz"
|
||||
URL_HASH SHA256=bd0df411efd9a585e5a2212275f8762079fed8842264954675a4fddc46cfcf60
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND bootstrap.bat
|
||||
BUILD_COMMAND b2.exe
|
||||
|
@ -88,8 +88,8 @@ add_library(libslic3r STATIC
|
||||
GCode.hpp
|
||||
GCodeReader.cpp
|
||||
GCodeReader.hpp
|
||||
GCodeSender.cpp
|
||||
GCodeSender.hpp
|
||||
# GCodeSender.cpp
|
||||
# GCodeSender.hpp
|
||||
GCodeTimeEstimator.cpp
|
||||
GCodeTimeEstimator.hpp
|
||||
GCodeWriter.cpp
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "libslic3r_version.h"
|
||||
|
||||
// this needs to be included early for MSVC (listing it in Build.PL is not enough)
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
@ -13,7 +15,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <vector>
|
||||
#include <boost/thread.hpp>
|
||||
#include <cassert>
|
||||
|
||||
#include "Technologies.hpp"
|
||||
|
||||
|
@ -696,7 +696,6 @@ void GLVolumeCollection::load_object_auxiliary(
|
||||
mesh.transform(mesh_trafo_inv);
|
||||
// Convex hull is required for out of print bed detection.
|
||||
TriangleMesh convex_hull = mesh.convex_hull_3d();
|
||||
convex_hull.transform(mesh_trafo_inv);
|
||||
for (const std::pair<size_t, size_t> &instance_idx : instances) {
|
||||
const ModelInstance &model_instance = *print_object->model_object()->instances[instance_idx.first];
|
||||
const SLAPrintObject::Instance &print_instance = print_object->instances()[instance_idx.second];
|
||||
|
@ -2800,13 +2800,13 @@ std::string GLCanvas3D::Gizmos::update_hover_state(const GLCanvas3D& canvas, con
|
||||
|
||||
float icon_size = (float)it->second->get_textures_size() * OverlayIconsScale;
|
||||
|
||||
bool inside = (OverlayBorder <= (float)mouse_pos(0)) && ((float)mouse_pos(0) <= OverlayBorder + icon_size) && (top_y <= (float)mouse_pos(1)) && ((float)mouse_pos(1) <= top_y + icon_size);
|
||||
if (inside)
|
||||
name = it->second->get_name();
|
||||
|
||||
if (it->second->is_activable(selection) && (it->second->get_state() != GLGizmoBase::On))
|
||||
{
|
||||
bool inside = (OverlayBorder <= (float)mouse_pos(0)) && ((float)mouse_pos(0) <= OverlayBorder + icon_size) && (top_y <= (float)mouse_pos(1)) && ((float)mouse_pos(1) <= top_y + icon_size);
|
||||
it->second->set_state(inside ? GLGizmoBase::Hover : GLGizmoBase::Off);
|
||||
if (inside)
|
||||
name = it->second->get_name();
|
||||
}
|
||||
|
||||
top_y += (icon_size + OverlayGapY);
|
||||
}
|
||||
|
||||
@ -5365,9 +5365,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
std::string tooltip = "";
|
||||
|
||||
// updates gizmos overlay
|
||||
if (!m_selection.is_empty())
|
||||
tooltip = m_gizmos.update_hover_state(*this, m_mouse.position, m_selection);
|
||||
else
|
||||
tooltip = m_gizmos.update_hover_state(*this, m_mouse.position, m_selection);
|
||||
if (m_selection.is_empty())
|
||||
m_gizmos.reset_all_states();
|
||||
|
||||
// updates toolbar overlay
|
||||
@ -5452,7 +5451,9 @@ void GLCanvas3D::set_tooltip(const std::string& tooltip) const
|
||||
wxToolTip* t = m_canvas->GetToolTip();
|
||||
if (t != nullptr)
|
||||
{
|
||||
if (t->GetTip() != tooltip)
|
||||
if (tooltip.empty())
|
||||
m_canvas->UnsetToolTip();
|
||||
else
|
||||
t->SetTip(tooltip);
|
||||
}
|
||||
else
|
||||
@ -5783,7 +5784,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
GLToolbarItem::Data item;
|
||||
|
||||
item.name = "add";
|
||||
item.tooltip = GUI::L_str("Add...");
|
||||
item.tooltip = GUI::L_str("Add... [Ctrl+I]");
|
||||
item.sprite_id = 0;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_ADD;
|
||||
@ -5791,7 +5792,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
return false;
|
||||
|
||||
item.name = "delete";
|
||||
item.tooltip = GUI::L_str("Delete");
|
||||
item.tooltip = GUI::L_str("Delete [Del]");
|
||||
item.sprite_id = 1;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_DELETE;
|
||||
@ -5799,7 +5800,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
return false;
|
||||
|
||||
item.name = "deleteall";
|
||||
item.tooltip = GUI::L_str("Delete all");
|
||||
item.tooltip = GUI::L_str("Delete all [Ctrl+Del]");
|
||||
item.sprite_id = 2;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_DELETE_ALL;
|
||||
@ -5807,7 +5808,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
return false;
|
||||
|
||||
item.name = "arrange";
|
||||
item.tooltip = GUI::L_str("Arrange");
|
||||
item.tooltip = GUI::L_str("Arrange [A]");
|
||||
item.sprite_id = 3;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_ARRANGE;
|
||||
@ -5818,7 +5819,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
return false;
|
||||
|
||||
item.name = "more";
|
||||
item.tooltip = GUI::L_str("Add instance");
|
||||
item.tooltip = GUI::L_str("Add instance [+]");
|
||||
item.sprite_id = 4;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_MORE;
|
||||
@ -5826,7 +5827,7 @@ bool GLCanvas3D::_init_toolbar()
|
||||
return false;
|
||||
|
||||
item.name = "fewer";
|
||||
item.tooltip = GUI::L_str("Remove instance");
|
||||
item.tooltip = GUI::L_str("Remove instance [-]");
|
||||
item.sprite_id = 5;
|
||||
item.is_toggable = false;
|
||||
item.action_event = EVT_GLTOOLBAR_FEWER;
|
||||
|
@ -748,7 +748,7 @@ bool GLGizmoRotate3D::on_init()
|
||||
|
||||
std::string GLGizmoRotate3D::on_get_name() const
|
||||
{
|
||||
return L("Rotate");
|
||||
return L("Rotate [R]");
|
||||
}
|
||||
|
||||
void GLGizmoRotate3D::on_start_dragging(const GLCanvas3D::Selection& selection)
|
||||
@ -838,7 +838,7 @@ bool GLGizmoScale3D::on_init()
|
||||
|
||||
std::string GLGizmoScale3D::on_get_name() const
|
||||
{
|
||||
return L("Scale");
|
||||
return L("Scale [S]");
|
||||
}
|
||||
|
||||
void GLGizmoScale3D::on_start_dragging(const GLCanvas3D::Selection& selection)
|
||||
@ -1197,7 +1197,7 @@ bool GLGizmoMove3D::on_init()
|
||||
|
||||
std::string GLGizmoMove3D::on_get_name() const
|
||||
{
|
||||
return L("Move");
|
||||
return L("Move [M]");
|
||||
}
|
||||
|
||||
void GLGizmoMove3D::on_start_dragging(const GLCanvas3D::Selection& selection)
|
||||
@ -1427,7 +1427,7 @@ bool GLGizmoFlatten::on_init()
|
||||
|
||||
std::string GLGizmoFlatten::on_get_name() const
|
||||
{
|
||||
return L("Place on face");
|
||||
return L("Place on face [F]");
|
||||
}
|
||||
|
||||
bool GLGizmoFlatten::on_is_activable(const GLCanvas3D::Selection& selection) const
|
||||
@ -1559,7 +1559,7 @@ void GLGizmoFlatten::update_planes()
|
||||
while (facet_queue_cnt > 0) {
|
||||
int facet_idx = facet_queue[-- facet_queue_cnt];
|
||||
const stl_normal& this_normal = ch.stl.facet_start[facet_idx].normal;
|
||||
if (this_normal.isApprox(*normal_ptr)) {
|
||||
if (std::abs(this_normal(0) - (*normal_ptr)(0)) < 0.001 && std::abs(this_normal(1) - (*normal_ptr)(1)) < 0.001 && std::abs(this_normal(2) - (*normal_ptr)(2)) < 0.001) {
|
||||
stl_vertex* first_vertex = ch.stl.facet_start[facet_idx].vertex;
|
||||
for (int j=0; j<3; ++j)
|
||||
m_planes.back().vertices.emplace_back((double)first_vertex[j](0), (double)first_vertex[j](1), (double)first_vertex[j](2));
|
||||
@ -2240,9 +2240,8 @@ bool GLGizmoSlaSupports::on_is_selectable() const
|
||||
}
|
||||
|
||||
std::string GLGizmoSlaSupports::on_get_name() const
|
||||
|
||||
{
|
||||
return L("SLA Support Points");
|
||||
return L("SLA Support Points [L]");
|
||||
}
|
||||
|
||||
|
||||
@ -2353,7 +2352,7 @@ bool GLGizmoCut::on_init()
|
||||
|
||||
std::string GLGizmoCut::on_get_name() const
|
||||
{
|
||||
return L("Cut");
|
||||
return L("Cut [C]");
|
||||
}
|
||||
|
||||
void GLGizmoCut::on_set_state()
|
||||
|
@ -530,6 +530,8 @@ std::string GLToolbar::update_hover_state_horizontal(const Vec2d& mouse_pos, GLC
|
||||
|
||||
GLToolbarItem::EState state = item->get_state();
|
||||
bool inside = (left <= (float)scaled_mouse_pos(0)) && ((float)scaled_mouse_pos(0) <= right) && (bottom <= (float)scaled_mouse_pos(1)) && ((float)scaled_mouse_pos(1) <= top);
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@ -545,9 +547,7 @@ std::string GLToolbar::update_hover_state_horizontal(const Vec2d& mouse_pos, GLC
|
||||
}
|
||||
case GLToolbarItem::Hover:
|
||||
{
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
else
|
||||
if (!inside)
|
||||
{
|
||||
item->set_state(GLToolbarItem::Normal);
|
||||
parent.set_as_dirty();
|
||||
@ -567,9 +567,7 @@ std::string GLToolbar::update_hover_state_horizontal(const Vec2d& mouse_pos, GLC
|
||||
}
|
||||
case GLToolbarItem::HoverPressed:
|
||||
{
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
else
|
||||
if (!inside)
|
||||
{
|
||||
item->set_state(GLToolbarItem::Pressed);
|
||||
parent.set_as_dirty();
|
||||
@ -623,6 +621,8 @@ std::string GLToolbar::update_hover_state_vertical(const Vec2d& mouse_pos, GLCan
|
||||
|
||||
GLToolbarItem::EState state = item->get_state();
|
||||
bool inside = (left <= (float)scaled_mouse_pos(0)) && ((float)scaled_mouse_pos(0) <= right) && (bottom <= (float)scaled_mouse_pos(1)) && ((float)scaled_mouse_pos(1) <= top);
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@ -638,9 +638,7 @@ std::string GLToolbar::update_hover_state_vertical(const Vec2d& mouse_pos, GLCan
|
||||
}
|
||||
case GLToolbarItem::Hover:
|
||||
{
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
else
|
||||
if (!inside)
|
||||
{
|
||||
item->set_state(GLToolbarItem::Normal);
|
||||
parent.set_as_dirty();
|
||||
@ -660,9 +658,7 @@ std::string GLToolbar::update_hover_state_vertical(const Vec2d& mouse_pos, GLCan
|
||||
}
|
||||
case GLToolbarItem::HoverPressed:
|
||||
{
|
||||
if (inside)
|
||||
tooltip = item->get_tooltip();
|
||||
else
|
||||
if (!inside)
|
||||
{
|
||||
item->set_state(GLToolbarItem::Pressed);
|
||||
parent.set_as_dirty();
|
||||
|
@ -120,8 +120,7 @@ void KBShortcutsDialog::fill_shortcuts()
|
||||
main_shortcuts.push_back(Shortcut("+" ,L("Add Instance to selected object ")));
|
||||
main_shortcuts.push_back(Shortcut("-" ,L("Remove Instance from selected object")));
|
||||
main_shortcuts.push_back(Shortcut("?" ,L("Show keyboard shortcuts list")));
|
||||
main_shortcuts.push_back(Shortcut("PgUp/PgDn" ,L("Switch between 3D and Preview")));
|
||||
main_shortcuts.push_back(Shortcut("Shift+LeftMouse" ,L("Select multiple object/Move multiple object")));
|
||||
main_shortcuts.push_back(Shortcut("Shift+LeftMouse", L("Select multiple object/Move multiple object")));
|
||||
|
||||
m_full_shortcuts.emplace(_(L("Main Shortcuts")), main_shortcuts);
|
||||
|
||||
|
@ -655,18 +655,24 @@ void Sidebar::update_presets(Preset::Type preset_type)
|
||||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
|
||||
switch (preset_type) {
|
||||
case Preset::TYPE_FILAMENT:
|
||||
if (p->combos_filament.size() == 1) {
|
||||
case Preset::TYPE_FILAMENT:
|
||||
{
|
||||
const int extruder_cnt = p->plater->printer_technology() != ptFFF ? 1 :
|
||||
dynamic_cast<ConfigOptionFloats*>(preset_bundle.printers.get_edited_preset().config.option("nozzle_diameter"))->values.size();
|
||||
const int filament_cnt = p->combos_filament.size() > extruder_cnt ? extruder_cnt : p->combos_filament.size();
|
||||
|
||||
if (filament_cnt == 1) {
|
||||
// Single filament printer, synchronize the filament presets.
|
||||
const std::string &name = preset_bundle.filaments.get_selected_preset().name;
|
||||
preset_bundle.set_filament_preset(0, name);
|
||||
const std::string &name = preset_bundle.filaments.get_selected_preset().name;
|
||||
preset_bundle.set_filament_preset(0, name);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < p->combos_filament.size(); i++) {
|
||||
preset_bundle.update_platter_filament_ui(i, p->combos_filament[i]);
|
||||
for (size_t i = 0; i < filament_cnt; i++) {
|
||||
preset_bundle.update_platter_filament_ui(i, p->combos_filament[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Preset::TYPE_PRINT:
|
||||
preset_bundle.prints.update_platter_ui(p->combo_print);
|
||||
@ -1356,14 +1362,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
// The model should now be initialized
|
||||
|
||||
if (model.looks_like_multipart_object()) {
|
||||
wxMessageDialog dlg(q, _(L(
|
||||
"This file contains several objects positioned at multiple heights. "
|
||||
"Instead of considering them as multiple objects, should I consider\n"
|
||||
"this file as a single object having multiple parts?\n"
|
||||
)), _(L("Multi-part object detected")), wxICON_WARNING | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_YES) {
|
||||
// wxMessageDialog dlg(q, _(L(
|
||||
// "This file contains several objects positioned at multiple heights. "
|
||||
// "Instead of considering them as multiple objects, should I consider\n"
|
||||
// "this file as a single object having multiple parts?\n"
|
||||
// )), _(L("Multi-part object detected")), wxICON_WARNING | wxYES | wxNO);
|
||||
// if (dlg.ShowModal() == wxID_YES) {
|
||||
model.convert_multipart_object(nozzle_dmrs->values.size());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
if (type_3mf || type_any_amf) {
|
||||
@ -2484,7 +2490,7 @@ void Plater::priv::init_view_toolbar()
|
||||
GLToolbarItem::Data item;
|
||||
|
||||
item.name = "3D";
|
||||
item.tooltip = GUI::L_str("3D editor view");
|
||||
item.tooltip = GUI::L_str("3D editor view [Ctrl+5]");
|
||||
item.sprite_id = 0;
|
||||
item.action_event = EVT_GLVIEWTOOLBAR_3D;
|
||||
item.is_toggable = false;
|
||||
@ -2492,7 +2498,7 @@ void Plater::priv::init_view_toolbar()
|
||||
return;
|
||||
|
||||
item.name = "Preview";
|
||||
item.tooltip = GUI::L_str("Preview");
|
||||
item.tooltip = GUI::L_str("Preview [Ctrl+6]");
|
||||
item.sprite_id = 1;
|
||||
item.action_event = EVT_GLVIEWTOOLBAR_PREVIEW;
|
||||
item.is_toggable = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "libslic3r/GCodeSender.hpp"
|
||||
// #include "libslic3r/GCodeSender.hpp"
|
||||
#include "Tab.hpp"
|
||||
#include "PresetBundle.hpp"
|
||||
#include "PresetHints.hpp"
|
||||
|
@ -53,7 +53,7 @@ set(XS_XSP_FILES
|
||||
${XSP_DIR}/Filler.xsp
|
||||
${XSP_DIR}/Flow.xsp
|
||||
${XSP_DIR}/GCode.xsp
|
||||
${XSP_DIR}/GCodeSender.xsp
|
||||
# ${XSP_DIR}/GCodeSender.xsp
|
||||
${XSP_DIR}/Geometry.xsp
|
||||
${XSP_DIR}/Layer.xsp
|
||||
${XSP_DIR}/Line.xsp
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <cstdlib>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <libslic3r/GCodeSender.hpp>
|
||||
// #include <libslic3r/GCodeSender.hpp>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -16,7 +16,7 @@ REGISTER_CLASS(Flow, "Flow");
|
||||
REGISTER_CLASS(CoolingBuffer, "GCode::CoolingBuffer");
|
||||
REGISTER_CLASS(GCode, "GCode");
|
||||
REGISTER_CLASS(GCodePreviewData, "GCode::PreviewData");
|
||||
REGISTER_CLASS(GCodeSender, "GCode::Sender");
|
||||
// REGISTER_CLASS(GCodeSender, "GCode::Sender");
|
||||
REGISTER_CLASS(Layer, "Layer");
|
||||
REGISTER_CLASS(SupportLayer, "Layer::Support");
|
||||
REGISTER_CLASS(LayerRegion, "Layer::Region");
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <ostream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <libslic3r.h>
|
||||
// #include <libslic3r.h>
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
extern "C" {
|
||||
@ -68,12 +68,19 @@ extern "C" {
|
||||
#undef fputc
|
||||
#undef fwrite
|
||||
#undef fclose
|
||||
#undef sleep
|
||||
#undef test
|
||||
#undef accept
|
||||
#undef wait
|
||||
|
||||
// Breaks compilation with Eigen matrices embedded into Slic3r::Point.
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef free
|
||||
#undef select
|
||||
|
||||
// Because of TBB
|
||||
#define _WIN32_WINNT 0x0502
|
||||
#endif /* _MSC_VER */
|
||||
#undef Zero
|
||||
#undef Packet
|
||||
|
@ -199,9 +199,9 @@ MotionPlanner* O_OBJECT_SLIC3R
|
||||
Ref<MotionPlanner> O_OBJECT_SLIC3R_T
|
||||
Clone<MotionPlanner> O_OBJECT_SLIC3R_T
|
||||
|
||||
GCodeSender* O_OBJECT_SLIC3R
|
||||
Ref<GCodeSender> O_OBJECT_SLIC3R_T
|
||||
Clone<GCodeSender> O_OBJECT_SLIC3R_T
|
||||
// GCodeSender* O_OBJECT_SLIC3R
|
||||
// Ref<GCodeSender> O_OBJECT_SLIC3R_T
|
||||
// Clone<GCodeSender> O_OBJECT_SLIC3R_T
|
||||
|
||||
BridgeDetector* O_OBJECT_SLIC3R
|
||||
Ref<BridgeDetector> O_OBJECT_SLIC3R_T
|
||||
|
@ -100,9 +100,9 @@
|
||||
%typemap{MotionPlanner*};
|
||||
%typemap{Ref<MotionPlanner>}{simple};
|
||||
%typemap{Clone<MotionPlanner>}{simple};
|
||||
%typemap{GCodeSender*};
|
||||
%typemap{Ref<GCodeSender>}{simple};
|
||||
%typemap{Clone<GCodeSender>}{simple};
|
||||
// %typemap{GCodeSender*};
|
||||
// %typemap{Ref<GCodeSender>}{simple};
|
||||
// %typemap{Clone<GCodeSender>}{simple};
|
||||
%typemap{BridgeDetector*};
|
||||
%typemap{Ref<BridgeDetector>}{simple};
|
||||
%typemap{Clone<BridgeDetector>}{simple};
|
||||
|
Loading…
Reference in New Issue
Block a user