Merge remote-tracking branch 'origin/master' into ys_new_features
This commit is contained in:
commit
dd1fb286c3
9
deps/CMakeLists.txt
vendored
9
deps/CMakeLists.txt
vendored
@ -36,10 +36,11 @@ set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination direct
|
||||
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON)
|
||||
option(DEP_WX_STABLE "Build against wxWidgets stable 3.0 as opposed to default 3.1 (Linux only)" OFF)
|
||||
|
||||
# IGL static library in release mode produces 50MB binary. On the build server, it should be
|
||||
# disabled and used in header-only mode. On developer machines, it can be enabled to speed
|
||||
# up conpilation and suppress warnings coming from IGL.
|
||||
option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF)
|
||||
# On developer machines, it can be enabled to speed up compilation and suppress warnings coming from IGL.
|
||||
# FIXME:
|
||||
# Enabling this option is not safe. IGL will compile itself with its own version of Eigen while
|
||||
# Slic3r compiles with a different version which will cause runtime errors.
|
||||
# option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF)
|
||||
|
||||
message(STATUS "PrusaSlicer deps DESTDIR: ${DESTDIR}")
|
||||
message(STATUS "PrusaSlicer deps debug build: ${DEP_DEBUG}")
|
||||
|
2
deps/deps-unix-common.cmake
vendored
2
deps/deps-unix-common.cmake
vendored
@ -54,7 +54,7 @@ ExternalProject_Add(dep_libigl
|
||||
-DLIBIGL_BUILD_PYTHON=OFF
|
||||
-DLIBIGL_BUILD_TESTS=OFF
|
||||
-DLIBIGL_BUILD_TUTORIALS=OFF
|
||||
-DLIBIGL_USE_STATIC_LIBRARY=${DEP_BUILD_IGL_STATIC}
|
||||
-DLIBIGL_USE_STATIC_LIBRARY=OFF #${DEP_BUILD_IGL_STATIC}
|
||||
-DLIBIGL_WITHOUT_COPYLEFT=OFF
|
||||
-DLIBIGL_WITH_CGAL=OFF
|
||||
-DLIBIGL_WITH_COMISO=OFF
|
||||
|
2
deps/deps-windows.cmake
vendored
2
deps/deps-windows.cmake
vendored
@ -264,7 +264,7 @@ ExternalProject_Add(dep_libigl
|
||||
-DLIBIGL_BUILD_PYTHON=OFF
|
||||
-DLIBIGL_BUILD_TESTS=OFF
|
||||
-DLIBIGL_BUILD_TUTORIALS=OFF
|
||||
-DLIBIGL_USE_STATIC_LIBRARY=${DEP_BUILD_IGL_STATIC}
|
||||
-DLIBIGL_USE_STATIC_LIBRARY=OFF #${DEP_BUILD_IGL_STATIC}
|
||||
-DLIBIGL_WITHOUT_COPYLEFT=OFF
|
||||
-DLIBIGL_WITH_CGAL=OFF
|
||||
-DLIBIGL_WITH_COMISO=OFF
|
||||
|
@ -579,7 +579,7 @@ void CLI::print_help(bool include_print_options, PrinterTechnology printer_techn
|
||||
#endif /* SLIC3R_GUI */
|
||||
<< std::endl
|
||||
<< "https://github.com/prusa3d/PrusaSlicer" << std::endl << std::endl
|
||||
<< "Usage: slic3r [ ACTIONS ] [ TRANSFORM ] [ OPTIONS ] [ file.stl ... ]" << std::endl
|
||||
<< "Usage: prusa-slicer [ ACTIONS ] [ TRANSFORM ] [ OPTIONS ] [ file.stl ... ]" << std::endl
|
||||
<< std::endl
|
||||
<< "Actions:" << std::endl;
|
||||
cli_actions_config_def.print_cli_help(boost::nowide::cout, false);
|
||||
|
@ -555,7 +555,7 @@ TEST(GeometryAlgorithms, NestTest) {
|
||||
size_t partsum = std::accumulate(result.begin(),
|
||||
result.end(),
|
||||
size_t(0),
|
||||
[](int s,
|
||||
[](size_t s,
|
||||
const decltype(
|
||||
result)::value_type &bin) {
|
||||
return s += bin.size();
|
||||
|
@ -739,11 +739,11 @@ bool DynamicConfig::read_cli(int argc, char** argv, t_config_option_keys* extra,
|
||||
ConfigOption *opt_base = this->option(opt_key, true);
|
||||
ConfigOptionVectorBase *opt_vector = opt_base->is_vector() ? static_cast<ConfigOptionVectorBase*>(opt_base) : nullptr;
|
||||
if (opt_vector) {
|
||||
// Vector values will be chained. Repeated use of a parameter will append the parameter or parameters
|
||||
// to the end of the value.
|
||||
if (! existing)
|
||||
// remove the default values
|
||||
opt_vector->deserialize("", true);
|
||||
opt_vector->clear();
|
||||
// Vector values will be chained. Repeated use of a parameter will append the parameter or parameters
|
||||
// to the end of the value.
|
||||
if (opt_base->type() == coBools)
|
||||
static_cast<ConfigOptionBools*>(opt_base)->values.push_back(!no);
|
||||
else
|
||||
|
@ -167,8 +167,10 @@ public:
|
||||
// Set a single vector item from either a scalar option or the first value of a vector option.vector of ConfigOptions.
|
||||
// This function is useful to split values from multiple extrder / filament settings into separate configurations.
|
||||
virtual void set_at(const ConfigOption *rhs, size_t i, size_t j) = 0;
|
||||
|
||||
// Resize the vector of values, copy the newly added values from opt_default if provided.
|
||||
virtual void resize(size_t n, const ConfigOption *opt_default = nullptr) = 0;
|
||||
// Clear the values vector.
|
||||
virtual void clear() = 0;
|
||||
|
||||
// Get size of this vector.
|
||||
virtual size_t size() const = 0;
|
||||
@ -277,6 +279,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the values vector.
|
||||
void clear() override { this->values.clear(); }
|
||||
size_t size() const override { return this->values.size(); }
|
||||
bool empty() const override { return this->values.empty(); }
|
||||
|
||||
|
@ -286,7 +286,7 @@ template<class Tout,
|
||||
class = FloatingOnly<Tout>>
|
||||
inline SLIC3R_CONSTEXPR Tout scaled(const Tin &v) SLIC3R_NOEXCEPT
|
||||
{
|
||||
return static_cast<Tout>(v / static_cast<Tout>(SCALING_FACTOR));
|
||||
return static_cast<Tout>(v / static_cast<Tin>(SCALING_FACTOR));
|
||||
}
|
||||
|
||||
// Conversion definition from unscaled to integer 'scaled coord'.
|
||||
@ -297,7 +297,7 @@ template<class Tout = coord_t, class Tin, class = FloatingOnly<Tin>>
|
||||
inline SLIC3R_CONSTEXPR ScaledCoordOnly<Tout> scaled(const Tin &v) SLIC3R_NOEXCEPT
|
||||
{
|
||||
//return static_cast<Tout>(std::round(v / SCALING_FACTOR));
|
||||
return static_cast<Tout>(v / static_cast<Tout>(SCALING_FACTOR));
|
||||
return static_cast<Tout>(v / static_cast<Tin>(SCALING_FACTOR));
|
||||
}
|
||||
|
||||
// Conversion for Eigen vectors (N dimensional points)
|
||||
|
@ -720,8 +720,9 @@ void SLAPrint::process()
|
||||
|
||||
if(slindex_it == po.m_slice_index.end())
|
||||
//TRN To be shown at the status bar on SLA slicing error.
|
||||
throw std::runtime_error(L("Slicing had to be stopped "
|
||||
"due to an internal error."));
|
||||
throw std::runtime_error(
|
||||
L("Slicing had to be stopped due to an internal error: "
|
||||
"Inconsistent slice index."));
|
||||
|
||||
po.m_model_height_levels.clear();
|
||||
po.m_model_height_levels.reserve(po.m_slice_index.size());
|
||||
|
@ -15,6 +15,8 @@
|
||||
#define ENABLE_RENDER_STATISTICS 0
|
||||
// Shows an imgui dialog with camera related data
|
||||
#define ENABLE_CAMERA_STATISTICS 0
|
||||
// Render the picking pass instead of the main scene (use [T] key to toggle between regular rendering and picking pass only rendering)
|
||||
#define ENABLE_RENDER_PICKING_PASS 0
|
||||
|
||||
|
||||
//====================
|
||||
|
@ -24,7 +24,7 @@ namespace GUI {
|
||||
const double Camera::DefaultDistance = 1000.0;
|
||||
double Camera::FrustrumMinZSize = 50.0;
|
||||
double Camera::FrustrumZMargin = 10.0;
|
||||
double Camera::FovMinDeg = 5.0;
|
||||
double Camera::FovMinDeg = 0.5;
|
||||
double Camera::FovMaxDeg = 75.0;
|
||||
|
||||
Camera::Camera()
|
||||
|
@ -1224,6 +1224,9 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar
|
||||
, m_cursor_type(Standard)
|
||||
, m_color_by("volume")
|
||||
, m_reload_delayed(false)
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
, m_show_picking_texture(false)
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
, m_render_sla_auxiliaries(true)
|
||||
{
|
||||
if (m_canvas != nullptr) {
|
||||
@ -1627,6 +1630,10 @@ void GLCanvas3D::render()
|
||||
_picking_pass();
|
||||
}
|
||||
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
if (!m_picking_enabled || !m_show_picking_texture)
|
||||
{
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
// draw scene
|
||||
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
||||
_render_background();
|
||||
@ -1656,6 +1663,9 @@ void GLCanvas3D::render()
|
||||
|
||||
_render_current_gizmo();
|
||||
_render_selection_sidebar_hints();
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
}
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
|
||||
#if ENABLE_SHOW_CAMERA_TARGET
|
||||
_render_camera_target();
|
||||
@ -2397,6 +2407,14 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
||||
case 'k': { m_camera.select_next_type(); m_dirty = true; break; }
|
||||
case 'O':
|
||||
case 'o': { set_camera_zoom(-1.0); break; }
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
case 'T':
|
||||
case 't': {
|
||||
m_show_picking_texture = !m_show_picking_texture;
|
||||
m_dirty = true;
|
||||
break;
|
||||
}
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
case 'Z':
|
||||
case 'z': { m_selection.is_empty() ? zoom_to_volumes() : zoom_to_selection(); break; }
|
||||
default: { evt.Skip(); break; }
|
||||
|
@ -478,6 +478,10 @@ private:
|
||||
|
||||
GCodePreviewVolumeIndex m_gcode_preview_volume_index;
|
||||
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
bool m_show_picking_texture;
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
|
||||
#if ENABLE_RENDER_STATISTICS
|
||||
RenderStats m_render_stats;
|
||||
#endif // ENABLE_RENDER_STATISTICS
|
||||
|
@ -259,6 +259,10 @@ void GLGizmoSlaSupports::render_clipping_plane(const Selection& selection) const
|
||||
|
||||
void GLGizmoSlaSupports::on_render_for_picking(const Selection& selection) const
|
||||
{
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z();
|
||||
#endif
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
render_points(selection, true);
|
||||
}
|
||||
|
@ -154,6 +154,9 @@ void KBShortcutsDialog::fill_shortcuts()
|
||||
plater_shortcuts.push_back(Shortcut("I", L("Zoom in")));
|
||||
plater_shortcuts.push_back(Shortcut("O", L("Zoom out")));
|
||||
plater_shortcuts.push_back(Shortcut("ESC", L("Unselect gizmo / Clear selection")));
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
plater_shortcuts.push_back(Shortcut("T", L("Toggle picking pass texture rendering on/off")));
|
||||
#endif // ENABLE_RENDER_PICKING_PASS
|
||||
|
||||
m_full_shortcuts.push_back(std::make_pair(_(L("Plater Shortcuts")), std::make_pair(plater_shortcuts, szRight)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user