Skip to content

[1] PRO workflow overhaul, mobile support, loads/shells editing, and calc report hardening#45

Open
Batuis wants to merge 9 commits intomainfrom
pr/2-next-product-iteration
Open

[1] PRO workflow overhaul, mobile support, loads/shells editing, and calc report hardening#45
Batuis wants to merge 9 commits intomainfrom
pr/2-next-product-iteration

Conversation

@Batuis
Copy link
Copy Markdown
Collaborator

@Batuis Batuis commented Mar 29, 2026

Summary

PRO mode overhaul with selection/delete correctness, grouped dropdown toolbar, editable data tables, mobile support, and calc report hardening.

Calc report hardening

  • Empty-report generation blocked when no analysis results exist
  • Truthful result provenance labeling (envelope / single combo / single case)
  • Report type always "Analysis Only" until design-check tables are rendered
  • Compact metadata block: report type + result basis
  • Cover page shows correct mode label (2D / 3D / PRO)

Saved-project / restore-mode fixes

  • Autosave now stores appMode (basico / educativo / pro)
  • Restore banner only appears in the matching mode
  • Banner reactively hides/shows on mode switch (no reload needed)
  • Legacy saves default to basico (conservative)

PRO toolbar and interaction overhaul

  • Desktop: grouped dropdown toolbar (Geometry, Properties, Conditions, Analysis)
  • Pan/Select tool buttons with select-subtype dropdown
  • Undo/Redo buttons with platform-aware Ctrl/Cmd+Z/Y shortcuts
  • Expanded labels: Connections, Diagnostics (no abbreviations) across all 14 locales
  • Row-selection sync: clicking rows in Results/Design/Verification/Nodes/Members/Shells/Supports/Loads highlights entities in viewport
  • Select-mode filtering enforced for click and box selection per subtype
  • Shell/element ID overlap disambiguation using selectMode throughout selection, highlighting, status bar, and deletion
  • Tab-entry and row-click auto-align selectMode to prevent wrong-entity selection

PRO tables and editing workflows

  • Shells: editable material (dropdown) and thickness (input) via new updatePlate/updateQuad methods
  • Loads: all 5 sub-tables (nodal, distributed, point, surface, thermal) are inline-editable
  • Load cases: converted from cramped tabs to editable table rows (type selector, name input, load count, visibility toggle)
  • Combinations: card layout with per-factor rows (factor × case name)
  • Self-weight: surfaced as display-only D row with checkbox toggle, defaults ON in PRO
  • Lr added to load-case type selector
  • Load-case row selection highlights all loads using that case
  • Consistent row hover/selected/cursor affordance with teal left-bar indicator across all data tabs
  • Status bar separates shell count from element count, shows supports and loads

3D interaction improvements

  • Measure tool: direct node raycast + screen-space nearest-node snap (works above grid, through load glyphs)
  • Shell selection: opacity boost 0.45 → 0.85 for clear selected state
  • Load hover/selection visual feedback with color change
  • Load highlight sync uses userData.id (stable model index) instead of visual child index

7-story RC example cleanup

  • Load-case names translated to English (preserving engineering specificity)
  • Wind combinations corrected: U4–U7 now use factor 1.6 (ASCE 7 / CIRSOC)
  • Dead-load composition visible: self-weight separated from superimposed dead in combination cards

Mobile support

  • PRO upper toolbar: Pan / Undo / Redo / Results-Solve / Select
  • Persistent Select sub-mode strip (stays open while Select is active)
  • Floating Results/Solve panel (upper-left, tight under toolbar)
  • Mode selector: styled dropdown with Education (Beta) / PRO (Beta)
  • Examples dialog: full-width on mobile with text wrapping
  • Floating Results/Solve box hidden in Education/PRO (Basic-only toggle preserved)

i18n

  • StatusBar: shells/loads labels via i18n keys
  • ProLoadsTab: Type, Name, Loads, ON/OFF, auto, Add Load, selected nodes via i18n keys
  • Analysis dropdown: Connections/Diagnostics expanded across all 14 locales

Not included / intentionally deferred

  • No load-case physical-template inheritance (load cases are identity containers; no per-load override tracking)
  • No solver changes
  • No localized example-content system (example data uses authored English names)
  • No separate selectedShells storage (uses selectMode disambiguation on shared selectedElements)
  • No full design-check tables in calc report yet (report type stays "Analysis Only")

@Batuis Batuis changed the title [2] Basic structural calc-book report (PDF via browser print) [2] NOT READY - Basic structural calc-book report (PDF via browser print) Mar 29, 2026
@Batuis Batuis marked this pull request as draft March 29, 2026 22:47
Batuis added 5 commits March 31, 2026 22:07
…ts, forces

Complete HTML report generator with 5 sections:
1. Model Data — materials, sections, nodes, elements, supports (condensed for large models)
2. Loads — load cases, combinations with factors, applied load summary
3. Reactions — per-node reactions with equilibrium check (ΣF ≈ 0)
4. Displacements — max displacement summary box + sorted table (top 20 for large models)
5. Internal Forces — force summary + per-element start/end forces

Both 2D (N/V/M) and 3D (N/Vy/Vz/Mx/My/Mz) results supported.
Pre-report dialog for project name, engineer, company, notes.
Print-friendly CSS with page breaks. Blob URL approach (same as PRO report).
Report triggered from existing PDF button in ToolbarProject.
i18n keys for en/es.
New module: design-check-results.ts
- MemberDesignResult: unified per-member shape with elementId, elementType,
  sectionName, governingCheck, utilization, status, comboName, checks[]
- CheckDetail: per-check demand/capacity/ratio/status
- DesignCheckSummary: aggregate pass/warn/fail counts

Adapters:
- normalizeCirsoc201: CIRSOC 201 RC (JS) → unified
- normalizeCirsoc301: CIRSOC 301 steel (JS) → unified
- normalizeWasmSteel: AISC 360 / EC3 (WASM snake_case) → unified
- normalizeWasmRC: ACI 318 / EC2 (WASM snake_case) → unified

verificationStore expanded:
- New setDesignResults() for unified multi-code results
- designMap for O(1) element lookup
- getMaxRatio/getStatus check unified results first, legacy fallback
- Existing CIRSOC/steel legacy paths preserved

Tests: 8 focused tests covering all 4 adapters + summary builder.
New ProDesignTab.svelte — unified design-check product surface:
- Code selector (CIRSOC / ACI-AISC / Eurocode / NDS / Masonry / CFS)
- 'Run Design Check' button that dispatches to the selected code
- Summary bar: total members, pass/warn/fail counts (color-coded)
- Member utilization table sorted worst-first:
  Element | Type | Section | Governing Check | Utilization (ratio bar) | Status | Combo
- Status filter (All / Fail / Warn / Pass)
- Ratio bars: green(≤0.5) → yellow → amber → orange → red(>1.1)
- Auto-activates verification viewport overlay on check completion

Integration:
- Wired as 'design' tab in PRO panel (between Results and Verification)
- Added to PRO nav strip in App.svelte
- Uses normalized results from Chunk 1 via verificationStore.setDesignResults
- CIRSOC path also populates legacy store for viewport compatibility
- i18n keys for en/es
Toasts now have a small × in the top-right corner for immediate dismissal.
Auto-dismiss still works as before (4s/8s timeout). The dismiss button is
semi-transparent and highlights on hover. Added dismissToast(id) to uiStore.
@Batuis Batuis force-pushed the pr/2-next-product-iteration branch from 8ed6300 to 351de92 Compare April 1, 2026 01:08
@Batuis Batuis changed the title [2] NOT READY - Basic structural calc-book report (PDF via browser print) [1] NOT READY - Basic structural calc-book report (PDF via browser print) Apr 1, 2026
@Batuis Batuis changed the base branch from pr/1-recovery-landing-mobile-basic3d to main April 1, 2026 01:18
…lc report hardening

Calc report:
- empty-report guard, truthful result provenance, analysis-only metadata
- report type, result basis, and contents block

Saved-project restore:
- mode-aware autosave with reactive banner that hides/shows on mode switch

PRO toolbar:
- grouped dropdown desktop toolbar (Geometry, Properties, Conditions, Analysis)
- Pan/Select tools with subtype filtering
- undo/redo buttons and Ctrl/Cmd+Z/Y shortcuts
- expanded Analysis dropdown labels (Connections, Diagnostics) across all locales

PRO selection/delete:
- select-mode filtering for click and box selection
- shells picking via raycasting shellsParent
- loads picking with line threshold for ArrowHelper shafts
- correct highlight sync using userData.id for loads
- selectMode disambiguation for overlapping shell/element IDs
- row-click selection sets selectMode to match entity type
- tab-entry auto-aligns selectMode
- delete respects selectMode for shell/element disambiguation

PRO tables:
- shells editable (material, thickness) with updatePlate/updateQuad
- loads editable across all 3D load types including surface3d and thermalQuad3d
- load cases as editable table rows with type selector, name input, load count
- combination cards with per-factor rows (factor × case name)
- self-weight surfaced as display-only D row with ON/OFF toggle
- Lr type support in load-case selectors
- load-case row selection highlights all loads using that case
- consistent row hover/selected/cursor affordance across all data tabs
- selection bar separates shells from elements, shows supports and loads

3D viewport:
- measure tool node snapping via direct raycast + screen-space proximity
- shell selection with opacity boost (0.45 → 0.85) for legibility
- load hover/selection highlight with visual feedback

7-story RC example:
- English load-case names
- wind combinations corrected to 1.6W (U4-U7)

Mobile PRO:
- upper toolbar with Pan/Undo/Redo/Results-Solve/Select
- persistent Select sub-mode strip
- floating Results/Solve panel (upper-left, shared with Basic via mode gate)
- mode selector as styled dropdown with Beta labels
- examples dialog full-width on mobile with text wrapping
- floating Results/Solve box hidden in Education/PRO (Basic-only)

i18n:
- shells/loads status labels
- PRO loads tab labels (Type, Name, Loads, ON/OFF, auto, etc.)
@Batuis Batuis changed the title [1] NOT READY - Basic structural calc-book report (PDF via browser print) [1] PRO workflow overhaul, mobile support, loads/shells editing, and calc report hardening Apr 3, 2026
@Batuis Batuis marked this pull request as ready for review April 3, 2026 22:09
Batuis added a commit that referenced this pull request Apr 20, 2026
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.

1 participant