When editing inside a viewport (MSPACE), the status bar MODEL button was
sending LayoutSwitch("Model") which switched the entire layout to the
Model tab. The intended behavior (and what the comment documented) is
ExitViewport — just exit the active viewport back to PSPACE.
Fixes part of #10
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrate NAVVCUBE, NAVBAR, PROPERTIES, FILETAB, LAYOUTTAB, TOOLPALETTES
and SHEETSET commands to toggle UI widgets at runtime. Add 15 new SVG icons
for view module tools previously using glyph fallbacks. Restyle all SVG
icons to use the established two-color scheme: #e0e0e0 for passive geometry,
#4cc9f0 for active/accent elements.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the flat fixed-length axis arrows with a proper 3D tripod:
- Axis lengths are proportional (longest fills UCS_ICON_LEN, shorter
axes stay foreshortened) giving real depth perception as the camera
rotates
- Draw order computed from NDC Z so back axes render behind front ones
- X / Y / Z labels rendered beyond each arrowhead tip
- All axes drawn at full opacity with solid filled arrowheads
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Hide OS crosshair and drawn crosshair when cursor is over ViewCube area
- Enhanced hover glow in WGSL shader (blue tint + brightness boost)
- Fixed region_centroids() Y-axis sign for all FRONT/BACK-related regions
- Swapped corner geometry assignments (TPF↔TBK, BTF↔BBK) to match
intended FRONT/BACK semantics (sy=-1 = FRONT, sy=+1 = BACK)
- Corrected all snap_angles: yaw_pitch_to_quat(0,0) places eye at -Y
(FRONT view), so FRONT=0 and BACK=PI — cascaded through edges/corners
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- viewport_screen_rect now mirrors PaperCanvas::draw()'s camera-based
to_px transform instead of using a fixed paper-limits scale, so the
3D overlay lands exactly over the drawn viewport border at any zoom/pan
- blue border frame (stack layer above the shader) makes the active
viewport boundary always visible even when it fills the canvas
- space-mode pill in MSPACE now dispatches LayoutSwitch("Model") so
clicking it jumps to full Model Space instead of just exiting to PSPACE
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the static MODEL/LAYOUT pill with an interactive button that
shows and toggles the current editing context:
Model tab → "MODEL" (non-clickable, informational)
Layout PSPACE → "PAPER" (click → MspaceCommand: enter MSPACE)
Layout MSPACE → "MODEL" (click → ExitViewport: return to PSPACE)
Highlights in blue when in MSPACE to signal active model editing.
Mirrors the AutoCAD status-bar convention for MODEL/PAPER switching.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- REPORT opens GitHub new-issue page
- ABOUT opens a dialog window with version, OS and arch info + Copy Info button
- CHANGELOG opens GitHub releases page
- Fix Windows build: add windows-sys as target-specific dependency for PRINT command
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New StyleComboGroup RibbonItem renders a dropdown combobox for selecting
text style, dimension style, multileader style, or table style. Ribbon
groups in the Annotate tab now match the reference layout: each group
has a large tool on the left and a style combobox with tool rows on the
right.
Each combobox shows the active style name, opens a scrollable item list
on click, and has an optional "Manage…" row that fires the style manager
command (STYLE / DIMSTYLE / MLEADERSTYLE / TABLESTYLE).
Style state is synced from the document on every layer refresh via
sync_ribbon_styles(). RibbonStyleChanged message propagates selections
back to the acadrust document header and the active_mleader_style field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each dialog window (Page Setup, DimStyle, TextStyle, TableStyle,
MLineStyle, PlotStyle, Layout Manager, Shortcuts) is now a proper
window-filling layout in its own src/ui/<dialog>.rs file.
Pattern: toolbar strip at top + vertical separator + scrollable
content filling the rest — no modal card, no backdrop, no stack[].
Matches the existing Layer Manager window pattern.
Removed ~1600 lines of old overlay functions from view.rs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Viewport right-click now shows a proper widget-based context menu:
- When a command is active: Cancel / Enter
- Otherwise: Repeat last commands, Delete/Move/Copy (if selected),
Select All, Zoom Extents
CONSTRUCTIONLINE added as an alias for XLINE (XL).
Canvas-drawn placeholder removed; context menu closes on Escape,
click-outside, or when any action is taken.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- snap/mod.rs: Snapper gains otrack_enabled, tracking_points, dwell state;
update_otrack_dwell() acquires a snap point after DWELL_THRESHOLD=4
consecutive moves near the same position; otrack_snap() returns an
H/V alignment snap position; clear_tracking() resets state on command end
- overlay.rs: selection_overlay accepts ost_points + cursor_screen;
draws light-blue dashed H/V lines from acquired points + small cross marker
- statusbar.rs: OTRACK pill (F11) added next to DYN
- view.rs: projects tracking_points to screen, passes to selection_overlay
- update.rs: calls update_otrack_dwell + otrack_snap in ViewportMove;
overrides effective point with OST alignment when no normal snap is active
- ROADMAP.md: Object Snap Tracking marked ✅
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- overlay.rs: dynamic_input_overlay() canvas widget draws a semi-transparent
coordinate tooltip near the cursor; shows X/Y in absolute mode or
dist/angle relative to last_point when a command base point exists
- statusbar: DYN toggle pill with F12 tooltip (calls ToggleDynInput)
- app/mod.rs: dyn_input: bool field (default true), ToggleDynInput message
- view.rs: builds DYN label and pushes overlay into viewport_stack when
dyn_input=true and a command is active
- document.rs: last_cursor_screen: iced::Point — updated on every ViewportMove
- ROADMAP.md: Dynamic Input overlay marked ✅
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Grid snap (F9):
• snap spacing now tracks the visible grid zoom level — computed via
compute_grid_step() (same adaptive pow-of-5 logic as draw_grid),
updated on every ViewportMove so zooming in/out keeps snap aligned
with the grid lines on screen
Polar tracking (F10):
• configurable angle increment stored in polar_increment_deg (default 45°)
• right-click the POLAR pill to cycle through 15 → 30 → 45 → 90°
• pill label shows current angle ("POLAR 45°")
• visual guide line: while drawing with polar on, a dashed cyan line is
drawn from last_point along the snapped direction across the viewport
• SetPolarAngle message + handler; all polar_constrain() calls use the
stored increment instead of the hardcoded 45°
ROADMAP updated: Grid snap and Polar tracking marked ✅.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CommandLine now records every submitted command in a recall list (up to
50 entries). Pressing ↑ in the command input walks back through the
list, ↓ moves forward, and returning to the newest position restores
the draft text the user had typed before navigating.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add VP freeze/thaw toggle columns to the layer panel when in a paper
space layout. Each viewport gets its own column (VP 1, VP 2, …) showing
a freeze icon per layer. Clicking toggles frozen_layers on the Viewport
entity and syncs back to the panel.
- scene: viewport_list() → [(handle, label, frozen_handles)]
- LayerPanel: VpCol + vp_frozen per layer, sync_with_viewports()
- Message::LayerToggleVpFreeze(layer_idx, vp_col_idx)
- Sync VP columns on layout switch, VPLAYER cmd, undo/redo, layer ops
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Before layout completes the viewport bounds are 0×0, causing project_point3
to produce NaN/Inf coordinates which panicked in lyon_path assertions.
Added early-return when bounds < 10px, and finite checks on all projected
and derived coordinates before calling any canvas drawing functions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Screen-space UCS icon drawn on the existing selection canvas overlay.
Axes are projected from world space so the icon rotates with the camera,
always showing the correct X/Y/Z orientation relative to the drawing plane.
Each axis has its canonical color (X=red, Y=green, Z=blue) with arrowheads.
Icon visibility controlled by show_ucs_icon flag (default on); toggled by
UCSICON ON/OFF command which also updates paper-space viewport entities.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Status bar: shows "N VP" pill (with tooltip) when in a paper layout that has
user viewports (id > 1). New Scene::viewport_count() method.
REVCLOUD: closed LwPolyline with arc bumps (bulge = 0.5) along each edge.
Click polygon corners, Enter to close into a revision cloud shape.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Kağıt sınırı dikdörtgeni: paper layout'ta Layout.min/max_limits'ten
beyaz çerçeve wire'ı oluşturulur, entity_wires()'a eklenir
- first_viewport_scale(): paper layout'taki ilk kullanıcı viewport'un ölçeğini döner
- paper_limits(): mevcut layout'un kağıt sınırlarını döner, sıfır boyutlu
layout için varsayılan 12×9 kullanılır
- Status bar scale göstergesi: hardcoded "1:1" yerine aktif viewport ölçeği
dinamik olarak "1:50", "2:1" vb. formatında gösterilir
- Overall viewport (ID=1) zaten gri renkte render ediliyor (tessellate_one)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Layout sekme sağ-tıklamasında context menüsü (Yeniden Adlandır / Sil)
- Inline rename: sekme metin-giriş alanına dönüşür, Enter ile commit, ✕ ile iptal
- LayoutDelete: layout ve sahip olduğu tüm entity'leri kaldırır
- LayoutRename: Layout nesnesinin adını yerinde günceller
- LayoutCreate çakışma koruması: mevcut isimler arasında benzersiz ad bulur
- Escape tuşu açık rename/context menüsünü kapatır
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Deactivate ribbon tool highlight when command ends (issue #1)
- Reset last_point on new command dispatch to fix polar snap offset (issue #2)
- FILLET/CHAMFER: disable text input during entity pick so clicks reach viewport (issue #3)
- Dropdown icon buttons now use RibbonToolClick so they highlight blue when active
- FILLET/CHAMFER: AutoCAD-style sub-step UX — typing R/D + Enter prompts for value
- Fix FILLET arc preview plane: arc was rendering in XZ instead of XY
- Bump version to 0.1.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ribbon.rs → ribbon/mod.rs + ribbon/widgets.rs
Extracted all rendering helpers, button styles, colour constants,
layout constants and dropdown position calculators into widgets.rs.
- scene/mod.rs → scene/mod.rs + scene/selection.rs + scene/render.rs
Moved SelectionState into selection.rs; moved CameraState, Primitive,
shader::Program/Primitive impls, render_style and resolve_pattern
into render.rs, reducing mod.rs from 1323 to ~1030 lines.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>