Tech ENABLE_SHOW_NON_MANIFOLD_EDGES set as default
This commit is contained in:
parent
0063734e78
commit
0388132acd
8 changed files with 0 additions and 28 deletions
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1246,7 +1246,6 @@ size_t its_num_open_edges(const std::vector<Vec3i> &face_neighbors)
|
|||
return num_open_edges;
|
||||
}
|
||||
|
||||
#if ENABLE_SHOW_NON_MANIFOLD_EDGES
|
||||
std::vector<std::pair<int, int>> its_get_open_edges(const indexed_triangle_set& its)
|
||||
{
|
||||
std::vector<std::pair<int, int>> ret;
|
||||
|
@ -1261,7 +1260,6 @@ std::vector<std::pair<int, int>> 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)
|
||||
{
|
||||
|
|
|
@ -227,11 +227,9 @@ bool its_is_splittable(const indexed_triangle_set &its, const std::vector<Vec3i>
|
|||
size_t its_num_open_edges(const indexed_triangle_set &its);
|
||||
size_t its_num_open_edges(const std::vector<Vec3i> &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<std::pair<int, int>> 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);
|
||||
|
|
|
@ -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<ColorRGBA, 4> 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<size_t, size_t>(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<int> 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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue