Commit Graph
13 Commits
Author SHA1 Message Date
etwenandClaude Opus 4.8 060ca4ecd0 feat(perf): direct STL parsing for near-instant large-file load (v0.7.1)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgHf5MW39U3Xo8y2uA229K
2026-07-14 14:20:36 +08:00
etwenandClaude Fable 5 45b27d51cb feat(ui): Add About dialog with user-facing changelog
- Help menu (Help > About STPViewer) opens a dialog styled after
  ETTerms AboutView: app card (name/version/description), developer
  card, tech stack card on the left; scrollable version history on
  the right, written for end users in plain language (v0.1.0-v0.7.0)
- Version read from assembly (single source: csproj <Version>)
- Note in CLAUDE.md: top-level WPF MenuItem with a Click handler does
  not fire (verified with real mouse input) - dialog entries must
  live in a submenu

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 09:17:06 +08:00
etwenandClaude Fable 5 3d124782d5 feat(ui): Add menu bar and customizable quick toolbar (v0.7.0)
- Menu bar groups all functions: File (import/MRU/exports), View
  (zoom/standard views/ortho/unit), Measure (7 checkable modes with
  hotkey hints), Transform (align/drag/gizmo/rotate), Tools
  (interference/section), QuickBar (customize/reset)
- QuickBarViewModel registry: per-button visibility via XAML indexer
  binding QuickBar[Key].IsChecked; buttons keep static bindings
- Common-user defaults visible (import/recent/zoom/iso/ortho/point/
  distance/circle/angle/interference/section/clear/unit); the rest
  live in menus; selection persists in settings.json QuickBarKeys
- Section parameter bar is its own row, shown only while section is
  enabled (with close button); no longer occupies space permanently
- Bump version to 0.7.0; update ARCHITECTURE/CLAUDE docs (Phase 16)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 08:52:55 +08:00
etwenandClaude Fable 5 f5ccc13e9c feat(export): Add STL export with parameter dialog (v0.6.0)
- StlExportService: binary/ASCII STL writer (degenerate triangle
  filtering, per-triangle normals) + B-rep re-tessellation
- StlExportDialog + StlExportViewModel: scope (merged/per-file),
  format, unit scale (mm/inch/custom), mesh quality (current/fine),
  live triangle count + size estimate; confirm before export
- Background export with UI-thread mesh snapshot (GeometryModel3D is
  DispatcherObject; only frozen MeshGeometry3D crosses threads)
- Fine quality = 0.15x import precision: CADability GetTriangulation
  returns cached mesh for coarser requests (no coarse option) and
  triangle count is non-monotonic in precision (0.4x < 1x)
- SmokeTest --stl-export-test: binary round-trip incl. inch scaling,
  ASCII structure, degenerate filtering, real-file fine re-tessellation
- Bump version to 0.6.0; update ARCHITECTURE/CLAUDE docs (Phase 15)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 08:44:34 +08:00
etwenandClaude Fable 5 9b40d4c36d docs: Record Phase 14 (v0.5.0 feature round), update feature table and conventions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 08:34:21 +08:00
etwenandClaude Fable 5 e355cb4363 docs: Record Phase 13 (v0.4.0 perf/stability) and prioritized feature backlog
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:39:09 +08:00
etwenandClaude Opus 4.8 e27fd17eb8 perf: Render merged mesh in measure mode to fix large-assembly orbit lag (v0.3.2)
Measurement modes used to render per-face content (one GeometryModel3D per
B-rep face). On a large assembly (64k faces measured) that is 64k draw calls,
and WPF re-walks the whole visual tree every frame, so orbiting in a
measurement tool was severely laggy while plain browse mode (which renders the
merged mesh, one model per file) stayed smooth.

Render the merged mesh whenever not sectioning (browse AND measure), and
resolve the picked B-rep face from the hit triangle's vertex index via
_mergedFaceRanges + ResolveMergedFace (binary search over per-face vertex-start
boundaries recorded at import — BuildMergedMesh appends faces in order with no
vertex welding, so the ranges are exact and stay valid across translation).
Per-face FacesContent is now rendered only in section mode (needs cut
geometry). WPF 3D hit testing is geometric and does not cull back faces, so
single-sided merged meshes still pick hole inner walls.

Also subscribe camera-interaction suspension to HelixViewport3D.CameraChanged
(control-level routed event) in addition to Camera.Changed, so it can't be
orphaned if Helix replaces the camera instance.

Verified: orbit in measure mode is now as smooth as browse; circle/face/edge/
angle/face-distance and section measurements unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 16:48:42 +08:00
etwenandClaude Opus 4.8 ac08c129bd chore: Remove unused secret/ scaffolding
The project has no runtime or compile-time secrets (offline desktop
tool, no DB/API keys), so the secret/ folder held only example launch
scripts that were never used. Remove it and the related .gitignore
rules; trim references in ARCHITECTURE.md and CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:56:56 +08:00
etwenandClaude Opus 4.8 eaa72eac1e feat(ui): Always-on-top gizmo overlay; remove customer STEP files (v0.3.1)
- Gizmo now renders in a separate transparent Viewport3D overlaid on
  the main view, so the manipulator is never occluded inside solid
  parts and is always grabbable from any angle
- Overlay camera follows the main camera (position/dir/FOV/near-far)
  on every change; raw Viewport3D lets empty-area clicks pass through
  so orbit / zoom / measurement still work; IsHitTestVisible bound to
  GizmoEnabled. Mouse-up handled on the overlay (handledEventsToo),
  with _gizmoBakePending guarding against double-bake
- Window title shows version (STPViewer V0.3.1)
- Remove the two test STEP models from the repo (customer part
  numbers) -> moved to For_AI/ (gitignored); add *.stp/*.step to
  .gitignore so CAD files never get committed again
- Docs updated (ARCHITECTURE Phase 11, CLAUDE.md, README)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:50:00 +08:00
etwenandClaude Opus 4.8 ae79222bf4 feat(ui): Add gizmo manipulator for axis move/rotate (v0.3.0)
- New "操作器" toggle: select a file in the tree and a 3-axis gizmo
  appears at its center -- XYZ arrows (TranslateManipulator) to move
  along an axis regardless of view angle, and rotation rings
  (RotateManipulator) to rotate any angle about an axis
- Manipulators bind to a proxy ModelVisual3D; the proxy's transform
  is mirrored to all target BodyVisuals during drag (GPU-side, temp)
- On release the accumulated transform is baked into B-rep via
  TransformRoot (deferred with Dispatcher.BeginInvoke to avoid
  reentrancy with the manipulator's own mouse-up handling); the
  gizmo re-centers on the new bounds
- Temporary transforms are cleared with Transform3D.Identity, never
  null (HelixToolkit GetTransform crashes on null child.Transform)
- Selecting another file retargets the gizmo; removing the target
  hides it
- Docs updated (ARCHITECTURE Phase 10, CLAUDE.md, README)

Known limitation: gizmo handles are occluded inside solid parts
(WPF single depth buffer). Next: always-on-top overlay viewport.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 18:17:19 +08:00
etwenandClaude Opus 4.8 9072842bba fix(ui): Use Transform3D.Identity instead of null after drag (v0.2.1)
Drag mode set BodyVisual.Transform = null when clearing the temporary
offset on release. HelixToolkit Viewport3DHelper.GetTransform adds
child.Transform to a GeneralTransform3DGroup without a null check, so
the next FindHits after any drag threw ArgumentException and crashed.

Clear the temporary transform with Transform3D.Identity instead.
Root cause confirmed by decompiling HelixToolkit.Wpf GetTransform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 13:55:58 +08:00
etwenandClaude Opus 4.8 dd15a83986 feat(ui): Add drag mode for direct part manipulation (v0.2.0)
- New Drag mode (hand cursor): left-press a part and drag to move
  its whole file along the screen plane; release to commit
- During drag only a temporary TranslateTransform3D is applied
  (GPU-side, smooth even on 430k-triangle assemblies); on release
  the offset is baked into B-rep + meshes + edges via TranslateRoot,
  so measurement accuracy is unaffected
- Merged-mesh hit-testing via _mergedMap (browse rendering active
  in drag mode); edges suspended while dragging
- Mouse capture keeps drag alive outside the window; lost capture
  commits at current position
- Right-button rotate / wheel zoom / Shift+left pan unchanged
- Rename small test model to test.stp; docs updated
  (ARCHITECTURE Phase 9, CLAUDE.md conventions, README)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 09:41:45 +08:00
etwenandClaude Opus 4.8 0e19dbae1b feat: Initial release v0.1.0
STP/STEP 3D viewer (WPF, .NET 8) - CADability + HelixToolkit.Wpf:

- Multi-file import (STEP/STL/DXF) with STEP assembly tree
  (per-node visibility/color cascade, zoom-to)
- Measurements: point / distance / edge / face / circle / angle /
  face-to-face distance (B-rep exact where available)
- Assembly verification: two-point align (translate), 3-point align
  (rotate+translate via RigidAlign), axis rotate 90, interference
  check (tri-tri intersection + min gap)
- Section view (CPU mesh clipping, originals preserved)
- mm/inch toggle, CSV export (UTF-8 BOM), 2x PNG screenshot
- Performance: per-file merged edge lines, per-leaf merged mesh in
  browse mode, no BackMaterial on closed solids, edge suspend during
  camera interaction, parallel leaf triangulation with retry
- SmokeTest CLI: import pipeline, --tree, --clip-test,
  --interference-test, --align-test (all passing)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 00:16:10 +08:00