Commit Graph

3 Commits

Author SHA1 Message Date
NiJingzhe ec4bb31ae8 feat(viewer): submission context gains per-entity neighborhood cards; op registry 7 categories
- runtime.entity_neighborhood: one-level adjacency cards (face→edges with
  adjacent faces + vertices; edge→vertices/faces/adjacent edges; vertex→
  edges/faces), truncated lists name their totals
- compose_submission passes BRepModel.adjacency_details into the context
- scene_build tags edges with seam/degenerate flags and meshes edges at a
  finer tolerance (lin 0.1 / ang 0.1)
- operation registry: boolean.md split into union/cut/intersect; new
  box/cylinder/cone/sphere/shell/mirror/twisted_sweep/helical_sweep docs
  (5 → 7 categories, 23 operations)
- tests: seam flags, neighborhood cards per entity kind, registry shape
2026-09-06 02:32:49 +08:00
NiJingzhe 22d19263a7 feat(viewer): re-studio free-form composer with entity/op tags, highlighted source, feature DAG
- composer: contenteditable input where viewport picks and operation tips
  land as atomic colored chips ([face:6](face:6) / [fillet](op:fillet)),
  peers of free text; IME-safe Enter (composition never submits);
  atomic chip backspace; plain-text paste
- operation tips are markdown content, not code: viewer/server/operations/
  <op_id>.md (frontmatter label/category/api/reads/doc_refs + hint body),
  loaded by a stdlib frontmatter parser with mtime cache; broken files are
  named in payload errors, never silently skipped
- five categories per the human's classification (sketch / solid / modify /
  surface / pattern); palette rendered from GET /api/operations
- compose_submission embeds operation_context for every referenced op
- SOURCE tab: read-only CodeMirror python view (PythonEditor extracted from
  SourceDock, shared extensions) with file tabs and line-range reveal
- FEATURE TREE: viewer's DAG algorithm extracted as FeatureTreeView
  (apply_tag hidden, REF/USED/IN badges); clicking a feature switches to
  SOURCE and highlights its source span; FTC-header fallback before the
  first captured package
- tests: registry load + broken-file naming + operation context (9 pass)
2026-09-05 03:10:36 +08:00
NiJingzhe e5ed7b547e feat(viewer): reverse-engineering studio — human-annotated STEP reconstruction loop
Interactive re-mode (re.html) plus a local case server implementing the
ppt-master handshake: the human selects faces / draws regions / labels intent
on the original STEP, the browser composes a submission with server-side
entity context, and a waiting agent reconstructs per the existing
reconstruction contract and writes artifacts the UI polls back.

- viewer/server (stdlib-only): STEP -> synthesized Scene 2.0 projection
  (GLB + entity sidecars, same shape as package scenes), region resolve
  (centroid projection + front-facing filter), entity descriptors,
  atomic submissions, ndjson side recording, --daemon/--wait/--wait-only/
  --shutdown CLI with lockfile and 590s budget
- viewer/src: extract shared cad-three/entity-facts modules (main.ts now
  consumes them), new SceneView class (assembly/picking/highlight) reused
  by both studio viewports
- re-mode UI: annotation canvas (circle/lasso), intent palette, context
  preview, submit flow, rebuilt v3 package loading, comparison image,
  feature tree, evaluation tab
- governance: only the browser writes submission.json; UI never edits
  geometry — code stays the single source of truth
- tests: 6 server tests (scene contract, region math, submission context
  + named failures, wait handshake exit codes, HTTP endpoints)
2026-09-05 00:30:46 +08:00