mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00
Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
This commit is contained in:
parent
e1528e4299
commit
e9e4d75877
267 changed files with 10326 additions and 32228 deletions
|
@ -18,6 +18,9 @@
|
|||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#define MAX_NUM 9999.99
|
||||
#define MAX_SIZE "9999.99"
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
namespace GUI
|
||||
|
@ -25,6 +28,8 @@ namespace GUI
|
|||
|
||||
const double GizmoObjectManipulation::in_to_mm = 25.4;
|
||||
const double GizmoObjectManipulation::mm_to_in = 0.0393700787;
|
||||
const double GizmoObjectManipulation::oz_to_g = 28.34952;
|
||||
const double GizmoObjectManipulation::g_to_oz = 0.035274;
|
||||
|
||||
// Helper function to be used by drop to bed button. Returns lowest point of this
|
||||
// volume in world coordinate system.
|
||||
|
@ -576,9 +581,10 @@ void GizmoObjectManipulation::do_render_move_window(ImGuiWrapper *imgui_wrapper,
|
|||
else
|
||||
original_position = this->m_new_position;
|
||||
Vec3d display_position = m_buffered_position;
|
||||
|
||||
// Rotation
|
||||
Vec3d rotation = this->m_buffered_rotation;
|
||||
float unit_size = max_unit_size(2, display_position, display_position, "move") + space_size;;
|
||||
float unit_size = imgui_wrapper->calc_text_size(MAX_SIZE).x + space_size;
|
||||
int index = 1;
|
||||
int index_unit = 1;
|
||||
|
||||
|
@ -611,6 +617,12 @@ void GizmoObjectManipulation::do_render_move_window(ImGuiWrapper *imgui_wrapper,
|
|||
ImGui::BBLInputDouble(label_values[0][2], &display_position[2], 0.0f, 0.0f, "%.2f");
|
||||
ImGui::SameLine(caption_max + (++index_unit) * unit_size + (++index) * space_size);
|
||||
imgui_wrapper->text(this->m_new_unit_string);
|
||||
|
||||
for (int i = 0;i<display_position.size();i++)
|
||||
{
|
||||
if (display_position[i] > MAX_NUM)display_position[i] = MAX_NUM;
|
||||
}
|
||||
|
||||
m_buffered_position = display_position;
|
||||
update(current_active_id, "position", original_position, m_buffered_position);
|
||||
// the init position values are not zero, won't add reset button
|
||||
|
@ -671,7 +683,7 @@ void GizmoObjectManipulation::do_render_rotate_window(ImGuiWrapper *imgui_wrappe
|
|||
};
|
||||
|
||||
float space_size = imgui_wrapper->get_style_scaling() * 8;
|
||||
float position_size = imgui_wrapper->calc_text_size(_L("Position")).x + space_size;
|
||||
float position_size = imgui_wrapper->calc_text_size(_L("Rotation")).x + space_size;
|
||||
float World_size = imgui_wrapper->calc_text_size(_L("World coordinates")).x + space_size;
|
||||
float caption_max = std::max(position_size, World_size) + 2 * space_size;
|
||||
float end_text_size = imgui_wrapper->calc_text_size(this->m_new_unit_string).x;
|
||||
|
@ -685,7 +697,8 @@ void GizmoObjectManipulation::do_render_rotate_window(ImGuiWrapper *imgui_wrappe
|
|||
Vec3d display_position = m_buffered_position;
|
||||
// Rotation
|
||||
Vec3d rotation = this->m_buffered_rotation;
|
||||
float unit_size = max_unit_size(2, rotation, rotation, "rotate") + space_size * 2;
|
||||
|
||||
float unit_size = imgui_wrapper->calc_text_size(MAX_SIZE).x + space_size;
|
||||
int index = 1;
|
||||
int index_unit = 1;
|
||||
|
||||
|
@ -792,7 +805,9 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
|||
};
|
||||
|
||||
float space_size = imgui_wrapper->get_style_scaling() * 8;
|
||||
float caption_max = imgui_wrapper->calc_text_size(_L("Position:")).x + space_size;
|
||||
float scale_size = imgui_wrapper->calc_text_size(_L("Scale")).x + space_size;
|
||||
float size_len = imgui_wrapper->calc_text_size(_L("Size")).x + space_size;
|
||||
float caption_max = std::max(scale_size, size_len) + 2 * space_size;
|
||||
float end_text_size = imgui_wrapper->calc_text_size(this->m_new_unit_string).x;
|
||||
ImGui::AlignTextToFramePadding();
|
||||
unsigned int current_active_id = ImGui::GetActiveID();
|
||||
|
@ -802,12 +817,12 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
|||
|
||||
Vec3d display_position = m_buffered_position;
|
||||
|
||||
float unit_size = max_unit_size(2, scale, display_size, "scale") + space_size;
|
||||
float unit_size = imgui_wrapper->calc_text_size(MAX_SIZE).x + space_size;
|
||||
bool imperial_units = this->m_imperial_units;
|
||||
|
||||
int index = 2;
|
||||
int index_unit = 1;
|
||||
|
||||
|
||||
ImGui::PushItemWidth(caption_max);
|
||||
ImGui::Dummy(ImVec2(caption_max, -1));
|
||||
//imgui_wrapper->text(_L(" "));
|
||||
|
@ -839,8 +854,6 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
|||
ImGui::BBLInputDouble(label_scale_values[0][2], &scale[2], 0.0f, 0.0f, "%.2f");
|
||||
ImGui::SameLine(caption_max + (++index_unit) *unit_size + (++index) * space_size);
|
||||
imgui_wrapper->text(_L("%"));
|
||||
m_buffered_scale = scale;
|
||||
|
||||
|
||||
if (m_show_clear_scale) {
|
||||
ImGui::SameLine(caption_max + 3 * unit_size + 4 * space_size + end_text_size);
|
||||
|
@ -851,7 +864,6 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
|||
ImGui::InvisibleButton("", ImVec2(ImGui::GetFontSize(), ImGui::GetFontSize()));
|
||||
}
|
||||
|
||||
|
||||
//Size
|
||||
Vec3d original_size;
|
||||
if (this->m_imperial_units)
|
||||
|
@ -875,6 +887,12 @@ void GizmoObjectManipulation::do_render_scale_input_window(ImGuiWrapper* imgui_w
|
|||
ImGui::BBLInputDouble(label_scale_values[1][2], &display_size[2], 0.0f, 0.0f, "%.2f");
|
||||
ImGui::SameLine(caption_max + (++index_unit) *unit_size + (++index) * space_size);
|
||||
imgui_wrapper->text(this->m_new_unit_string);
|
||||
|
||||
for (int i = 0;i<display_size.size();i++)
|
||||
{
|
||||
if (display_size[i] > MAX_NUM || scale[i]> MAX_NUM)display_size[i] = MAX_NUM;
|
||||
}
|
||||
m_buffered_scale = scale;
|
||||
m_buffered_size = display_size;
|
||||
int size_sel = update(current_active_id, "size", original_size, m_buffered_size);
|
||||
ImGui::PopStyleVar(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue