mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 18:21:18 -06:00
Tech ENABLE_SINKING_CONTOURS set as default
This commit is contained in:
parent
bf21abfbfa
commit
f132ca9c3c
8 changed files with 1 additions and 99 deletions
|
|
@ -16,9 +16,7 @@
|
|||
#include "slic3r/GUI/GUI_ObjectManipulation.hpp"
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
#include "libslic3r/TriangleMeshSlicer.hpp"
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
|
@ -92,9 +90,7 @@ void GLGizmoCut::on_render()
|
|||
m_max_z = box.max.z();
|
||||
set_cut_z(m_cut_z);
|
||||
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
update_contours();
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
const float min_x = box.min.x() - Margin;
|
||||
const float max_x = box.max.x() + Margin;
|
||||
|
|
@ -143,13 +139,11 @@ void GLGizmoCut::on_render()
|
|||
|
||||
shader->stop_using();
|
||||
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_cut_contours.shift.x(), m_cut_contours.shift.y(), m_cut_contours.shift.z()));
|
||||
glsafe(::glLineWidth(2.0f));
|
||||
m_cut_contours.contours.render();
|
||||
glsafe(::glPopMatrix());
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
}
|
||||
|
||||
void GLGizmoCut::on_render_for_picking()
|
||||
|
|
@ -275,7 +269,6 @@ BoundingBoxf3 GLGizmoCut::bounding_box() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
void GLGizmoCut::update_contours()
|
||||
{
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
|
|
@ -315,7 +308,6 @@ void GLGizmoCut::update_contours()
|
|||
else
|
||||
m_cut_contours.contours.reset();
|
||||
}
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@
|
|||
#define slic3r_GLGizmoCut_hpp_
|
||||
|
||||
#include "GLGizmoBase.hpp"
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
#include "slic3r/GUI/GLModel.hpp"
|
||||
#include "libslic3r/TriangleMesh.hpp"
|
||||
#include "libslic3r/ObjectID.hpp"
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
|
@ -26,7 +24,6 @@ class GLGizmoCut : public GLGizmoBase
|
|||
bool m_keep_lower{ true };
|
||||
bool m_rotate_lower{ false };
|
||||
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
struct CutContours
|
||||
{
|
||||
TriangleMesh mesh;
|
||||
|
|
@ -39,7 +36,6 @@ class GLGizmoCut : public GLGizmoBase
|
|||
};
|
||||
|
||||
CutContours m_cut_contours;
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
public:
|
||||
GLGizmoCut(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id);
|
||||
|
|
@ -66,9 +62,7 @@ private:
|
|||
void perform_cut(const Selection& selection);
|
||||
double calc_projection(const Linef3& mouse_ray) const;
|
||||
BoundingBoxf3 bounding_box() const;
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
void update_contours();
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue