Merge branch 'tm_openvdb_integration' into lm_tm_hollowing

* Refactor file names in SLA dir
This commit is contained in:
tamasmeszaros 2019-11-11 11:41:14 +01:00
commit c22423a219
55 changed files with 1644 additions and 592 deletions

View file

@ -566,11 +566,9 @@ void GLGizmoHollow::on_update(const UpdateData& data)
}
}
void GLGizmoHollow::get_hollowing_parameters(TriangleMesh const** object_mesh, float& offset, float& adaptability) const
std::pair<const TriangleMesh *, sla::HollowingConfig> GLGizmoHollow::get_hollowing_parameters() const
{
offset = m_offset;
adaptability = m_adaptability;
*object_mesh = m_mesh;
return std::make_pair(m_mesh, sla::HollowingConfig{double(m_offset), double(m_accuracy), double(m_closing_d)});
}
void GLGizmoHollow::hollow_mesh()
@ -725,9 +723,12 @@ RENDER_AGAIN:
m_imgui->text("Offset: ");
ImGui::SameLine();
ImGui::SliderFloat(" ", &m_offset, 0.f, 5.f, "%.1f");
m_imgui->text("Adaptibility: ");
m_imgui->text("Quality: ");
ImGui::SameLine();
ImGui::SliderFloat(" ", &m_adaptability, 0.f, 1.f, "%.1f");
ImGui::SliderFloat(" ", &m_accuracy, 0.f, 1.f, "%.1f");
m_imgui->text("Closing distance: ");
ImGui::SameLine();
ImGui::SliderFloat(" ", &m_closing_d, 0.f, 10.f, "%.1f");
// Following is rendered in both editing and non-editing mode:
m_imgui->text("");

View file

@ -4,7 +4,7 @@
#include "GLGizmoBase.hpp"
#include "slic3r/GUI/GLSelectionRectangle.hpp"
#include "libslic3r/SLA/SLACommon.hpp"
#include <libslic3r/SLA/Hollowing.hpp>
#include <wx/dialog.h>
#include <cereal/types/vector.hpp>
@ -77,7 +77,7 @@ public:
void delete_selected_points(bool force = false);
ClippingPlane get_sla_clipping_plane() const;
void update_hollowed_mesh(std::unique_ptr<TriangleMesh> mesh);
void get_hollowing_parameters(TriangleMesh const** object_mesh, float& offset, float& adaptability) const;
std::pair<const TriangleMesh *, sla::HollowingConfig> get_hollowing_parameters() const;
bool is_selection_rectangle_dragging() const { return m_selection_rectangle.is_dragging(); }
@ -105,12 +105,13 @@ private:
float m_density_stash = 0.f; // and again
mutable std::vector<bool> m_selected; // which holes are currently selected
float m_offset = 2.f;
float m_adaptability = 1.f;
float m_offset = 2.0f;
float m_accuracy = 0.5f;
float m_closing_d = 2.f;
float m_clipping_plane_distance = 0.f;
std::unique_ptr<ClippingPlane> m_clipping_plane;
// This map holds all translated description texts, so they can be easily referenced during layout calculations
// etc. When language changes, GUI is recreated and this class constructed again, so the change takes effect.
std::map<std::string, wxString> m_desc;

View file

@ -4,7 +4,7 @@
#include "GLGizmoBase.hpp"
#include "slic3r/GUI/GLSelectionRectangle.hpp"
#include "libslic3r/SLA/SLACommon.hpp"
#include "libslic3r/SLA/Common.hpp"
#include <wx/dialog.h>
#include <cereal/types/vector.hpp>