Commit Graph
4 Commits
Author SHA1 Message Date
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