diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 82c0a72a65..3ea1d80e46 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -150,10 +150,8 @@ void AppConfig::set_defaults() if (get("order_volumes").empty()) set("order_volumes", "1"); -#if ENABLE_SHOW_NON_MANIFOLD_EDGES if (get("non_manifold_edges").empty()) set("non_manifold_edges", "1"); -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES if (get("clear_undo_redo_stack_on_new_project").empty()) set("clear_undo_redo_stack_on_new_project", "1"); diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 744976df13..92f21e90af 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -59,8 +59,6 @@ #define ENABLE_OPENGL_DEBUG_OPTION (1 && ENABLE_GL_CORE_PROFILE) // Shows an imgui dialog with GLModel statistics data #define ENABLE_GLMODEL_STATISTICS (0 && ENABLE_LEGACY_OPENGL_REMOVAL) -// Enable show non-manifold edges -#define ENABLE_SHOW_NON_MANIFOLD_EDGES (1 && ENABLE_2_5_0_ALPHA1) // Enable rework of Reload from disk command #define ENABLE_RELOAD_FROM_DISK_REWORK (1 && ENABLE_2_5_0_ALPHA1) // Enable recalculating toolpaths when switching to/from volumetric rate visualization diff --git a/src/libslic3r/TriangleMesh.cpp b/src/libslic3r/TriangleMesh.cpp index 0dffdaab0e..61e84076a3 100644 --- a/src/libslic3r/TriangleMesh.cpp +++ b/src/libslic3r/TriangleMesh.cpp @@ -1246,7 +1246,6 @@ size_t its_num_open_edges(const std::vector &face_neighbors) return num_open_edges; } -#if ENABLE_SHOW_NON_MANIFOLD_EDGES std::vector> its_get_open_edges(const indexed_triangle_set& its) { std::vector> ret; @@ -1261,7 +1260,6 @@ std::vector> its_get_open_edges(const indexed_triangle_set& } return ret; } -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES size_t its_num_open_edges(const indexed_triangle_set &its) { diff --git a/src/libslic3r/TriangleMesh.hpp b/src/libslic3r/TriangleMesh.hpp index 3f3af0261c..85a8a24e15 100644 --- a/src/libslic3r/TriangleMesh.hpp +++ b/src/libslic3r/TriangleMesh.hpp @@ -227,11 +227,9 @@ bool its_is_splittable(const indexed_triangle_set &its, const std::vector size_t its_num_open_edges(const indexed_triangle_set &its); size_t its_num_open_edges(const std::vector &face_neighbors); -#if ENABLE_SHOW_NON_MANIFOLD_EDGES // Calculate and returns the list of unconnected face edges. // Each edge is represented by the indices of the two endpoint vertices std::vector> its_get_open_edges(const indexed_triangle_set& its); -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES // Shrink the vectors of its.vertices and its.faces to a minimum size by reallocating the two vectors. void its_shrink_to_fit(indexed_triangle_set &its); diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index d66d101a3f..19c12b803d 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -384,7 +384,6 @@ void GLVolume::SinkingContours::update() m_model.reset(); } -#if ENABLE_SHOW_NON_MANIFOLD_EDGES void GLVolume::NonManifoldEdges::render() { update(); @@ -475,7 +474,6 @@ void GLVolume::NonManifoldEdges::update() m_update_needed = false; } -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES const ColorRGBA GLVolume::SELECTED_COLOR = ColorRGBA::GREEN(); const ColorRGBA GLVolume::HOVER_SELECT_COLOR = { 0.4f, 0.9f, 0.1f, 1.0f }; @@ -496,9 +494,7 @@ const std::array GLVolume::MODEL_COLOR = { { GLVolume::GLVolume(float r, float g, float b, float a) : m_sla_shift_z(0.0) , m_sinking_contours(*this) -#if ENABLE_SHOW_NON_MANIFOLD_EDGES , m_non_manifold_edges(*this) -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES // geometry_id == 0 -> invalid , geometry_id(std::pair(0, 0)) , extruder_id(0) @@ -755,12 +751,10 @@ void GLVolume::render_sinking_contours() m_sinking_contours.render(); } -#if ENABLE_SHOW_NON_MANIFOLD_EDGES void GLVolume::render_non_manifold_edges() { m_non_manifold_edges.render(); } -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES #if ENABLE_LEGACY_OPENGL_REMOVAL std::vector GLVolumeCollection::load_object( @@ -1415,7 +1409,6 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab #endif // ENABLE_LEGACY_OPENGL_REMOVAL } -#if ENABLE_SHOW_NON_MANIFOLD_EDGES #if ENABLE_LEGACY_OPENGL_REMOVAL shader->stop_using(); if (edges_shader != nullptr) { @@ -1431,7 +1424,6 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab } shader->start_using(); #endif // ENABLE_LEGACY_OPENGL_REMOVAL -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES if (disable_cullface) glsafe(::glEnable(GL_CULL_FACE)); diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index a47c8d05d0..02a4715ee0 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -309,7 +309,6 @@ private: SinkingContours m_sinking_contours; -#if ENABLE_SHOW_NON_MANIFOLD_EDGES class NonManifoldEdges { GLVolume& m_parent; @@ -326,7 +325,6 @@ private: }; NonManifoldEdges m_non_manifold_edges; -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES public: // Color of the triangles / quads held by this volume. @@ -574,9 +572,7 @@ public: bool is_sinking() const; bool is_below_printbed() const; void render_sinking_contours(); -#if ENABLE_SHOW_NON_MANIFOLD_EDGES void render_non_manifold_edges(); -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES // Return an estimate of the memory consumed by this class. size_t cpu_memory_used() const { @@ -642,9 +638,7 @@ private: Slope m_slope; bool m_show_sinking_contours{ false }; -#if ENABLE_SHOW_NON_MANIFOLD_EDGES bool m_show_non_manifold_edges{ true }; -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES public: GLVolumePtrs volumes; @@ -756,9 +750,7 @@ public: void set_slope_normal_z(float normal_z) { m_slope.normal_z = normal_z; } void set_default_slope_normal_z() { m_slope.normal_z = -::cos(Geometry::deg2rad(90.0f - 45.0f)); } void set_show_sinking_contours(bool show) { m_show_sinking_contours = show; } -#if ENABLE_SHOW_NON_MANIFOLD_EDGES void set_show_non_manifold_edges(bool show) { m_show_non_manifold_edges = show; } -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES // returns true if all the volumes are completely contained in the print volume // returns the containment state in the given out_state, if non-null diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 93fdae6dbc..9d74874a8b 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5979,9 +5979,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type) m_volumes.set_clipping_plane(m_camera_clipping_plane.get_data()); m_volumes.set_show_sinking_contours(! m_gizmos.is_hiding_instances()); -#if ENABLE_SHOW_NON_MANIFOLD_EDGES m_volumes.set_show_non_manifold_edges(!m_gizmos.is_hiding_instances() && m_gizmos.get_current_type() != GLGizmosManager::Simplify); -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES GLShaderProgram* shader = wxGetApp().get_shader("gouraud"); if (shader != nullptr) { diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 27cd113fb1..20fcedd051 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -454,12 +454,10 @@ void PreferencesDialog::build() "If disabled, you can reorder Model Parts, Negative Volumes and Modifiers. But one of the model parts have to be on the first place."), app_config->get("order_volumes") == "1"); -#if ENABLE_SHOW_NON_MANIFOLD_EDGES append_bool_option(m_optgroup_gui, "non_manifold_edges", L("Show non-manifold edges"), L("If enabled, shows non-manifold edges."), app_config->get("non_manifold_edges") == "1"); -#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES #ifdef _MSW_DARK_MODE append_bool_option(m_optgroup_gui, "tabs_as_menu",