Commit Graph

6 Commits

Author SHA1 Message Date
NiJingzhe f8793ca7ce feat(viewer): standalone BRep renderer component with layered pipeline
- viewer/src/renderer: BRepRenderer owns scene assembly, materials, PMREM
  studio lighting, GTAO, trackball camera, seam-split edge visuals, FIT and
  snapshot; face pass renders into MSAA RT, edges/overlays composite after
  AO so wireframes keep a constant ink color, and scene.background is
  deliberately unused (a Color background force-clears every render pass)
- scene-view.ts shrinks to the selection/marks composition layer over the
  engine; public picking/marks API unchanged
- cad-three: fixed dark edge color #3a414d; faces get polygonOffset(1,1),
  lines slope-scaled polygonOffset(-2,-2) so silhouette edges stop breaking
  into dashes at glancing angles
- click-selection restores the camera up vector; README documents the
  component entry points
2026-09-06 02:35:10 +08:00
NiJingzhe cdfc0ee904 docs(skill): re-studio workflow rewritten for the composer round
- reverse-engineering-studio.md: free-form composer (entity/op chips,
  [label](token) serialization, IME-safe Enter), operation tips as a
  markdown registry (viewer/server/operations/, mtime-hot, errors named),
  submission schema incl. operations + operation_context, self-contained
  artifact rule (transcription = literals, extraction harnesses beside
  the case), kernel-ordering facts (bores before blend fillets; fitter
  to_dict unique_knots contract), artifact names the UI polls
- step-reconstruction.md: route to the studio variant when a human
  operator is available
- SKILL.md: workflow count corrected to six; viewer/README.md updated
  for the composer + tips registry
2026-09-05 14:35:20 +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
NiJingzhe 9092a3c8eb feat(viewer): load canonical v3 product packages
Migrate the browser viewer from package schema 2.0 (objects array +
nested scene/scene.zip) to the canonical v3 layout (themed subpackages,
flat scene projection, content-addressed blob store); v2 packages are
rejected as unsupported.

- product-package.ts: v3 manifest gate plus structural validation
  mirroring ProductPackage._validate_manifest (exact manifest key set,
  path/hash-sorted unique records, root resolution, archive blob member
  declarations, projection asset source resolution), exact member-set
  closure with per-record sha256/byte_length verification, content_hash
  and scene revision recomputation, and a definitions-vs-product_assets
  identity multiset check. Scene geometry/entity/source assets are
  materialized from blobs/<sha256> members through the projection
  sources; product and feature-graph ZIP payloads are integrity-checked
  as members but never re-packed, since the viewer never consumes them.
- main.ts: thread the loaded package schema into the footer label and
  drop a dead constant; scene/entity sidecar 2.0 checks are unchanged.
- loader.test.ts: first viewer test suite (node:test via tsx, fixture
  regenerated through prepare:example) covering the happy path and the
  tamper matrix: mutated blob member, smuggled extra member, wrong
  content_hash, and v2 manifest rejection.
2026-09-04 23:44:14 +08:00
NiJingzhe 9d6703a786 feat: enforce canonical product capture workflow 2026-08-15 16:17:11 +08:00
NiJingzhe 95c9f20513 Add browser Scene package viewer 2026-07-23 03:16:40 +08:00