Add option for hiding / showing gridlines (#10545)

Might be useful who want to use custom grid line system with textures. or a clean look

### PROBLEM / SCENARIOS
• Custom made textures overlapping with grid system. so it might be confusing for user if want to use specific markings
• User may found its a distracting item and wants a clean look

### SOLUTION
added to view menu
<img width="477" height="434" alt="Screenshot-20251230192707" src="https://github.com/user-attachments/assets/e298d9b2-5f8f-4e33-af22-ea7c84c9b5b8" />

added to canvas menu
<img width="278" height="297" alt="Screenshot-20251230192717" src="https://github.com/user-attachments/assets/a9952408-a361-4e64-ad9a-72e2480c74cf" />

Clean look without gridlines
<img width="1669" height="1157" alt="Screenshot-20250827144140" src="https://github.com/user-attachments/assets/9229f330-9543-4d39-a8fc-01deb9b61336" />

<img width="1669" height="1157" alt="Screenshot-20250827144212" src="https://github.com/user-attachments/assets/ab3848fb-74d7-4618-8bc7-0cdff10a3804" />


Few Examples with custom made textures / markings without gridlines
<img width="1669" height="1157" alt="Screenshot-20250827140008" src="https://github.com/user-attachments/assets/5d7b17ab-e97a-489c-9e4d-99157a37b6b7" />

<img width="1669" height="1157" alt="Screenshot-20250827141904" src="https://github.com/user-attachments/assets/a7e0f360-a85a-489d-9bc2-39286984643a" />
This commit is contained in:
yw4z
2026-02-28 19:19:04 +03:00
committed by GitHub
parent 60a63c63eb
commit 095b5116ac
5 changed files with 22 additions and 2 deletions

View File

@@ -2825,6 +2825,14 @@ void MainFrame::init_menubar_as_editor()
this, [this]() { return m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview; },
[this]() { return wxGetApp().show_3d_navigator(); }, this);
append_menu_check_item(viewMenu, wxID_ANY, _L("Show Gridlines"), _L("Show Glidlines on plate"),
[this](wxCommandEvent&) {
wxGetApp().toggle_show_plate_gridlines();
m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT));
}, this,
[this]() { return m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview; },
[this]() { return wxGetApp().show_plate_gridlines(); }, this);
append_menu_item(
viewMenu, wxID_ANY, _L("Reset Window Layout"), _L("Reset to default window layout"),
[this](wxCommandEvent&) { m_plater->reset_window_layout(); }, "", this,