Skip to content

Settings: Show grid toggle + grid aligned to active sketch plane#129

Merged
trailcode merged 3 commits into
mainfrom
Trailcode/show_grid
Jun 12, 2026
Merged

Settings: Show grid toggle + grid aligned to active sketch plane#129
trailcode merged 3 commits into
mainfrom
Trailcode/show_grid

Conversation

@trailcode

@trailcode trailcode commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Closes #128
Closes #130

Summary

Two related 3D view grid improvements:

  1. Show grid checkbox in Settings → 3D view grid (persisted as occt_view.grid_visible)
  2. Grid aligned to active sketch plane via V3d_Viewer::SetPrivilegedPlane from the current sketch

Changes

Show / hide grid (#128)

  • Occt_view::get_grid_visible() / set_grid_visible() / apply_grid_visibility_()
  • Settings UI + JSON load/save
  • Default grid_visible: true in res/ezycad_settings.json

Active sketch plane (#130)

  • sync_grid_plane_to_active_sketch_() / refresh_viewer_grid_()
  • Refresh grid when switching sketches, loading documents, adding sketches, and editing grid settings
  • Initial grid display deferred until after init_default (first sketch exists)

Docs

  • docs/usage-settings.mdShow grid control, grid_visible JSON key, note that grid follows active sketch

Test plan

  • Settings → 3D view grid (verbosity ≥ 3): toggle Show grid — grid hides/shows immediately
  • Switch between sketches with different planes — grid moves to active sketch plane
  • Open a multi-sketch .ezy — grid matches current sketch after load
  • Restart app — grid_visible preference restored
  • Desktop Release build (EzyCad_lib)

Commits

  • 26069ef — Show grid checkbox
  • c128baa — Grid synced to active sketch plane

@trailcode trailcode changed the title Settings: Show grid checkbox to toggle 3D reference grid Settings: Show grid toggle + grid aligned to active sketch plane Jun 12, 2026
@trailcode trailcode merged commit 8887180 into main Jun 12, 2026
3 checks passed
@trailcode trailcode deleted the Trailcode/show_grid branch June 12, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3D view grid: align OCCT grid to active sketch plane Settings: Show grid checkbox to toggle 3D reference grid

1 participant