From accb7e18f328b631ccb2ba385bcf7e4d0ec61d00 Mon Sep 17 00:00:00 2001 From: Braden Ganetsky Date: Sat, 26 Jul 2025 15:31:25 -0500 Subject: [PATCH 1/3] Create tooltips for stack settings --- src/pstack/gui/controls.cpp | 23 +++++++++++++++++++++++ src/pstack/gui/controls.hpp | 26 +++++++++++++------------- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/pstack/gui/controls.cpp b/src/pstack/gui/controls.cpp index fe430f4..9a1ecc2 100644 --- a/src/pstack/gui/controls.cpp +++ b/src/pstack/gui/controls.cpp @@ -75,6 +75,7 @@ void controls::initialize(main_window* parent) { { const auto panel = notebook_panels[1]; + initial_x_text = new wxStaticText(panel, wxID_ANY, "Initial X:"); initial_y_text = new wxStaticText(panel, wxID_ANY, "Initial Y:"); initial_z_text = new wxStaticText(panel, wxID_ANY, "Initial Z:"); @@ -97,6 +98,28 @@ void controls::initialize(main_window* parent) { min_clearance_spinner->SetDigits(2); min_clearance_spinner->SetIncrement(0.05); min_clearance_spinner->SetRange(0.5, 2); + + constexpr auto make_tooltip = [](const char* state, char dir) { + return wxString::Format("%s size of the bounding box %c direction", state, dir); + }; + initial_x_text->SetToolTip(make_tooltip("Initial", 'X')); + initial_y_text->SetToolTip(make_tooltip("Initial", 'Y')); + initial_z_text->SetToolTip(make_tooltip("Initial", 'Z')); + maximum_x_text->SetToolTip(make_tooltip("Maximum", 'X')); + maximum_y_text->SetToolTip(make_tooltip("Maximum", 'Y')); + maximum_z_text->SetToolTip(make_tooltip("Maximum", 'Z')); + initial_x_spinner->SetToolTip(make_tooltip("Initial", 'X')); + initial_y_spinner->SetToolTip(make_tooltip("Initial", 'Y')); + initial_z_spinner->SetToolTip(make_tooltip("Initial", 'Z')); + maximum_x_spinner->SetToolTip(make_tooltip("Maximum", 'X')); + maximum_y_spinner->SetToolTip(make_tooltip("Maximum", 'Y')); + maximum_z_spinner->SetToolTip(make_tooltip("Maximum", 'Z')); + + const wxString min_clearance_tooltip = + "The minimum distance maintained between stacked parts. " + "Also the voxel size fed into the stacking algorithm."; + min_clearance_text->SetToolTip(min_clearance_tooltip); + min_clearance_spinner->SetToolTip(min_clearance_tooltip); } { diff --git a/src/pstack/gui/controls.hpp b/src/pstack/gui/controls.hpp index 265bff8..8456723 100644 --- a/src/pstack/gui/controls.hpp +++ b/src/pstack/gui/controls.hpp @@ -32,9 +32,7 @@ struct controls { wxButton* delete_result_button; wxButton* sinterbox_result_button; - wxStaticText* min_clearance_text; wxStaticText* section_view_text; - wxSpinCtrlDouble* min_clearance_spinner; wxCheckBox* section_view_checkbox; wxButton* stack_button; wxGauge* progress_bar; @@ -54,17 +52,7 @@ struct controls { wxButton* preview_voxelization_button; wxButton* preview_bounding_box_button; - // Sinterbox tab - wxStaticText* clearance_text; - wxStaticText* spacing_text; - wxStaticText* thickness_text; - wxStaticText* width_text; - wxSpinCtrlDouble* clearance_spinner; - wxSpinCtrlDouble* spacing_spinner; - wxSpinCtrlDouble* thickness_spinner; - wxSpinCtrlDouble* width_spinner; - - // Bounding box tab + // Stack settings tab wxStaticText* initial_x_text; wxStaticText* initial_y_text; wxStaticText* initial_z_text; @@ -77,6 +65,18 @@ struct controls { wxSpinCtrl* maximum_x_spinner; wxSpinCtrl* maximum_y_spinner; wxSpinCtrl* maximum_z_spinner; + wxStaticText* min_clearance_text; + wxSpinCtrlDouble* min_clearance_spinner; + + // Sinterbox tab + wxStaticText* clearance_text; + wxStaticText* spacing_text; + wxStaticText* thickness_text; + wxStaticText* width_text; + wxSpinCtrlDouble* clearance_spinner; + wxSpinCtrlDouble* spacing_spinner; + wxSpinCtrlDouble* thickness_spinner; + wxSpinCtrlDouble* width_spinner; }; } // namespace pstack::gui From fc3553ca146deadc7dd0c3586a47698f7df3d098 Mon Sep 17 00:00:00 2001 From: Braden Ganetsky Date: Sat, 26 Jul 2025 16:07:45 -0500 Subject: [PATCH 2/3] Create tooltips for part settings --- src/pstack/gui/controls.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/pstack/gui/controls.cpp b/src/pstack/gui/controls.cpp index 9a1ecc2..ff5d4f1 100644 --- a/src/pstack/gui/controls.cpp +++ b/src/pstack/gui/controls.cpp @@ -49,6 +49,12 @@ void controls::initialize(main_window* parent) { mirror_part_button = new wxButton(panel, wxID_ANY, "Mirror"); mirror_part_button->Disable(); + import_part_button->SetToolTip("Import parts from mesh files"); + delete_part_button->SetToolTip("Delete selected parts"); + reload_part_button->SetToolTip("Reload selected parts from their files"); + copy_part_button->SetToolTip("Make a copy of selected parts"); + mirror_part_button->SetToolTip("Make a mirrored copy of selected parts"); + quantity_text = new wxStaticText(panel, wxID_ANY, "Quantity:"); min_hole_text = new wxStaticText(panel, wxID_ANY, "Minimum hole:"); minimize_text = new wxStaticText(panel, wxID_ANY, "Minimize box:"); @@ -71,6 +77,37 @@ void controls::initialize(main_window* parent) { preview_voxelization_button->Disable(); preview_bounding_box_button = new wxButton(panel, wxID_ANY, "Preview bounding box"); preview_bounding_box_button->Disable(); + + const wxString quantity_tooltip = "How many copies of the selected parts should be included in the stacking"; + const wxString min_hole_tooltip = + "This setting defines the minimum hole in the selected parts through which another part can pass. " + "This typically applies when you have hollow or loop-shaped parts. " + "It may not be possible to remove a part from inside another part without a big enough hole.\n\n" + "The application starts with a solid cube the size of your part and then uses a cube the" + "size of the minimum hole to *carve* away from the other cube until it cannot go any further.\n\n" + "(Not yet implemented) Click the \"Preview voxelization\" button to see how changing minimum hole affects the voxelization."; + const wxString minimize_tooltip = + "This setting chooses whether the parts are first rotated to a more optimal orientation before performing any other steps. " + "The application will attempt to minimizes their axis-aligned bounding boxes.\n\n" + "Do not select this option for cosmetic parts where you care about surface finish, as this setting could apply any arbitrary rotation."; + const wxString rotation_tooltip = + "This setting chooses the set of rotations the stacking algorithm will try on the selected parts.\n\n" + "None = The parts will always be oriented exactly as they are imported.\n\n" + "Cubic = The parts will be rotated by some multiple of 90 degrees from their starting orientations.\n\n" + "Arbitrary = The parts will be oriented in one of 32 random possible rotations. The rotations are constant for the duration of the application, and will be re-randomized next time the application is launched."; + const wxString preview_voxelization_tooltip = "*NOT YET IMPLEMENTED*\nShows a preview of the voxelization. Used to check if there are any open holes into the internal volume of the part."; + const wxString preview_bounding_box_tooltip = "*NOT YET IMPLEMENTED*\nShows a preview of the bounding box. Used to check the part's orientation."; + + quantity_text->SetToolTip(quantity_tooltip); + min_hole_text->SetToolTip(min_hole_tooltip); + minimize_text->SetToolTip(minimize_tooltip); + quantity_spinner->SetToolTip(quantity_tooltip); + min_hole_spinner->SetToolTip(min_hole_tooltip); + minimize_checkbox->SetToolTip(minimize_tooltip); + rotation_text->SetToolTip(rotation_tooltip); + rotation_dropdown->SetToolTip(rotation_tooltip); + preview_voxelization_button->SetToolTip(preview_voxelization_tooltip); + preview_bounding_box_button->SetToolTip(preview_bounding_box_tooltip); } { From 7839c5baeceac7fabfc2f3961217c839137f98f8 Mon Sep 17 00:00:00 2001 From: Braden Ganetsky Date: Sat, 26 Jul 2025 16:20:50 -0500 Subject: [PATCH 3/3] Create tooltips for result settings --- src/pstack/gui/controls.cpp | 19 +++++++++++++++++++ src/pstack/gui/main_window.cpp | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/pstack/gui/controls.cpp b/src/pstack/gui/controls.cpp index ff5d4f1..36415fb 100644 --- a/src/pstack/gui/controls.cpp +++ b/src/pstack/gui/controls.cpp @@ -29,6 +29,7 @@ void controls::initialize(main_window* parent) { section_view_checkbox = new wxCheckBox(parent, wxID_ANY, ""); progress_bar = new wxGauge(parent, wxID_ANY, 100); stack_button = new wxButton(parent, wxID_ANY, "Stack"); + stack_button->SetToolTip("Start and stop the stacking process"); std::tie(notebook, notebook_panels) = make_tab_panels(parent, { "Parts", @@ -167,6 +168,11 @@ void controls::initialize(main_window* parent) { delete_result_button->Disable(); sinterbox_result_button = new wxButton(panel, wxID_ANY, "Add sinterbox"); sinterbox_result_button->Disable(); + + export_result_button->SetToolTip("Export selected result"); + delete_result_button->SetToolTip("Delete selected results"); + sinterbox_result_button->SetToolTip("Add sinterbox to selected result, using the below settings, only if it does not already have a sinterbox"); + clearance_text = new wxStaticText(panel, wxID_ANY, "Clearance:"); spacing_text = new wxStaticText(panel, wxID_ANY, "Spacing:"); thickness_text = new wxStaticText(panel, wxID_ANY, "Thickness:"); @@ -181,6 +187,19 @@ void controls::initialize(main_window* parent) { spacing_spinner = make_spinner(1, 20, 0.5); thickness_spinner = make_spinner(0.1, 4, 0.1); width_spinner = make_spinner(0.1, 4, 0.1); + + const wxString clearance_tooltip = "Distance from the result's bounding box to the inner wall of the sinterbox"; + const wxString spacing_tooltip = "Average distance between parallel bars/wires of the sinterbox"; + const wxString thickness_tooltip = "Depth from the outer wall to the inner wall of the sinterbox"; + const wxString width_tooltip = "Width of the bars/wires of the sinterbox"; + clearance_text->SetToolTip(clearance_tooltip); + spacing_text->SetToolTip(spacing_tooltip); + thickness_text->SetToolTip(thickness_tooltip); + width_text->SetToolTip(width_tooltip); + clearance_spinner->SetToolTip(clearance_tooltip); + spacing_spinner->SetToolTip(spacing_tooltip); + thickness_spinner->SetToolTip(thickness_tooltip); + width_spinner->SetToolTip(width_tooltip); } reset_values(); diff --git a/src/pstack/gui/main_window.cpp b/src/pstack/gui/main_window.cpp index 8be02f0..dce8c17 100644 --- a/src/pstack/gui/main_window.cpp +++ b/src/pstack/gui/main_window.cpp @@ -259,7 +259,7 @@ void main_window::enable_on_stacking(const bool starting) { _results_list.get_selected(selected); _controls.export_result_button->Enable(selected.size() == 1); _controls.delete_result_button->Enable(selected.size() != 0); - _controls.sinterbox_result_button->Enable(selected.size() != 0); + _controls.sinterbox_result_button->Enable(selected.size() == 1); } else { _controls.import_part_button->Disable(); _controls.delete_part_button->Disable();