- rename every numbered example (04/08/10/11/7ep scripts, 12/16/20/21 dirs)
to clean names; each example now writes artifacts to its own out/ folder
- examples/README rewritten as a category index (part / assembly / reverse
engineering / FEM); stale run_examples.py reference removed
- flange_plate gains the quickstart FTC part (model.py + external verify.py
+ README); u_link/ap242/flange demo builders read the new asset paths
- ap242_gmsh_volume_mesh gains render_views.py for the demo gallery
fix(artifacts): round-trip-stable geometry fingerprint bounds
AddOptimal bounds wobble by one shape-tolerance quantum between a fresh
shape and the same shape read back from BRep bytes, so definitions sitting
on a quantization cell edge failed every package re-validation. Quantize
bounds at a fixed 1e-4 mm grid, far coarser than the wobble; full suite
green (1503 passed). Stored packages captured before this change must be
recaptured.
- remode UI migrated to React 19 + Tailwind 4 + shadcn-style components
(tabs/toggles/tooltips/resizable/sonner); imperative kernel (SceneView,
TokenComposer, OpSuggest, PythonEditor, FeatureTreeView) bridged via refs
- composer: same op tip can be cited twice (dedupe guard removed; backspace
deletes the exact chip); capsule hover bubble is content-sized with a
560px/72vw max width
- renderer: shift+left-drag pan via TrackballControls keyState borrow
- server: submit payload never truncates user entity selections (cap
removed, regression test added)
- shared style.css imported into a cascade layer so Tailwind utilities win
State the ordering discipline positively: a tag lands in the step right
after the operation that produced its targets, because projections into
later outputs are computed at op time. Rule 2 keeps the ownership
half (resolved-list targets), rule 3 owns the timing half, and both name
the same surface error so the misleading 'not owned' message resolves to
the right defect.
The hand-written guide at references/docs/guides/ql-selection-playbook.md
sat inside the generated-docs mirror directory under a title identical to
the verified playbook, so agents entering via SKILL.md saw only the older
unpinned copy. Merge its unique content (selection loop, predicate
vocabulary, shared-boundary failure signatures, bore->rim chamfer and
face->datum recipes, lineage routes, facts printing) into
references/ql-playbook.md and retire the guide.
Recipe snippets were re-executed against dev @ 94e3e3e (11/11) before
merging; two session-path corrections came out of that run and are now
documented in Ground rule 2: apply_tag_rselection targets must be a
resolved list, and tags must land before the next operation consumes the
shape.
Replaces the AGPL-3.0 license text with the canonical Apache License 2.0
and updates every reference: pyproject trove classifier, both README
license sections, and the skill frontmatter. The article drafts under
docs/ are untracked and were updated separately.
Float frames re-normalized on every Placement reconstruction, so
canonical JSON bytes and content hashes drifted across save/load cycles
(connector interface_hash mismatch, unstable PartInstance placement
identity, spurious cache/dirty misses).
Store every hashed/persisted frame as exact integer ticks at 1e-9
resolution instead:
- placement.py: placement_ticks / validate_placement_ticks (pure integer
unit-orthogonal-handedness checks) / placement_from_canonical with a
from_exact_frame constructor that keeps durable components verbatim;
tick frames short-circuit re-quantization; placement_frame_mm exports
millimetre floats for translators
- ConnectorInterface.local_frame and PartInstance.placement store ticks;
definition content hashes are byte-stable across round trips
- solved snapshots, authored placements, assembly state, solve keys and
component cache payloads compare tick-to-tick; rebuilds reuse
from_exact_frame so verification is exact instead of tolerance-based
- occurrence-graph transforms and scene product ingestion convert ticks
at the runtime boundary only
- FreeCAD runtime and Fusion360/SolidWorks translators convert recorded
tick frames back to millimetre floats when emitting target payloads
Derived z_axis is authoritative (computed once at write time) and is
never recomputed on read. BREP/zip/package integrity checks remain
strict byte hashes. Existing pre-tick packages must be recaptured;
examples/22_mecanum_wheel was rebuilt and revalidated.
User review: the GIF should cover the whole session, not a highlight window —
regenerated at 10 fps over the full duration. The source recording's first
7 seconds (a personal API billing dashboard, unrelated to the demo) are cut
from both the MP4 and the GIF; both now start directly in re-studio.
GIF 5.0 -> 4.5 MB (70 s), MP4 6.1 -> 5.6 MB.
The reverse-engineering section ships its demo: the re-studio MVP session —
click faces on the STEP target, stack operation-intent chips and notes per
pick, submit, and the agent takes over from your context (classifying all 37
faces of a link rod before rebuilding). UI selections plus the operator's
hunches become the agent's narrowed search space.
Source recording (78 MB, 1668x1080@60, 78 s) stays local via gitignore; the
repo tracks a 6.1 MB H.264 MP4 (full session) and a 770 KB GIF preview of
the annotate-and-submit window (30-50 s) inline in both READMEs.
The simulation-plugin section ships its real evidence now: two screen
recordings of the MuJoCo replay viewer — the first assembly pass where the
links crash through each other mid-cycle (wrong assembly), and the corrected
assembly sweeping the full crank cycle clean in the same sim.
Source recordings (74 MB, 2410x1844@60) stay local; the repo tracks lean
derivatives: 1450px/30fps H.264 MP4s (0.6 + 0.9 MB) as click-through full
videos and 700px/10fps palette GIFs (1.1 + 2.3 MB) inline in both READMEs.
Drops the bracket-STL placeholder image that stood in for this cell.
render_step_comparison_rpath never had a style parameter; the one-pipeline
sweep (26da5e2) rewrote its label color into a style == "studio" conditional,
raising NameError on the STEP comparison path. The comparison renderer keeps
its light standard look, so the label returns to unconditional dark ink.
Caught by CI (test_step_comparison_render_uses_shared_views_and_writes_image
on all four Python versions); ty does flag the unbound name — the local gate
missed it by diff-counting diagnostics instead of reading them, and by running
a test subset instead of the full suite. Full suite now green locally:
1525 passed, 5 skipped.
Two agent-SDK quality rulings from the u_link misrender review:
- zero-hit guard: requesting a highlight tag that matches no geometry now
raises with the missing tag names and likely causes (typo / wrong build
stage) instead of silently labelling empty air — the guard immediately
caught two real misuses (S1 blank labelled with S3-stage tags; flange
fillet tag lost to a downstream feature rewrite)
- label typography: all font sizes move to final-image-pixel semantics
scaled by supersample; callout lower bound 12->18, legend 10->12 with
wider cap, panel title floor raised; margins scale with font size so
large text does not overflow panels
- fix surfaced while verifying: candidate dataset names referenced by
callouts did not survive the macOS worker hop (surface_group_N vs
surface_groups_N) — re-anchoring silently no-op'd on darwin; naming
aligned and verified end-to-end (occluded rim-fillet anchor re-anchors
onto the visible lower half of the same ring)
Fixes 'flange shows no labels': callout anchors used face centers of mass,
which for annular/toroidal faces (both fillet tags) lands on the rotation
axis INSIDE the solid — occluded from every view, so the labels pointed at
nothing. Callouts now carry their tagged surface as re-anchor candidates
(referenced through the dataset channel so the macOS worker can serialize
it) and each panel admits them via a deterministic geometry pass:
- _view_ray_occluded: parallel-projection-safe ray test against a cell
locator built over base + highlight surfaces (surface tolerance scales
with model span so anchors resting on their own face pass)
- occluded anchors re-anchor to the nearest visible sampled point of the
SAME tagged surface (lateral screen distance + depth-weighted); a callout
whose whole region is hidden in a panel is suppressed there — a label
pointing at empty space is worse than no label
- flange review after fix: both fillet labels visible, leaders land on the
actual fillet geometry, 10/10
- tests: front/back face tags of a box — labels must appear from the side
that sees them (callouts-on differs from callouts-off per view)
- fixes caught by ty along the way: SCREENSHOT_VIEWS referenced but only
defined in operators/features (latent NameError on the internal auto
path; the constant now lives in the engine, features re-exports lazily
via module __getattr__) and callout tuple annotations extended to the
optional candidate element
- 32/32 render+integration tests
Design ruling: exactly one way to produce annotated multi-view renders.
- render_screenshot_rpath always routes through the multi-view grid
engine: view='auto' = the default four-view set, an explicit preset
name or (elevation, azimuth) pair = a single full-frame panel, views=
accepts up to four (elevation, azimuth, label) triples (more are
rejected). The separate single-view code path is deleted (engine,
worker 'sdk' mode and its dispatch), along with the studio-vs-grid
rejection contract
- style defaults to 'studio': the default output is now a black-stage
four-panel grid with camera-derived three-point lighting per panel,
tubed edge ink, supersampling and light-on-dark labels/legend;
style='standard' remains the explicit flat diagnostic look
(render_shape_views_rpath pins standard to keep its inspect semantics)
- zoom applies to single-panel renders; view_up applies to every panel
- framing parity verified at pixel level: single-panel studio through
the new path matches the deleted single-view path output (mean diff
0.59, 1.38% pixels), so render_showcase.py and existing studio assets
are stable
- tests: >4 views rejected, explicit view routes through the grid
engine as one panel, default style is studio (differs from explicit
standard), real-render assertions made behavioral instead of size
thresholds; 31/31 incl. integration suite; API doc regenerated
- render_screenshot_rpath now accepts raw TopoDS_Shape entries alongside
SDK solids: the STEP inspection family renders through the same public
entry with the same edge ink, supersampling and (for solids) tag
highlights/callouts — one API at SDK level, one engine below it
- edge ink + supersampling pushed DOWN into the shared multi-view grid
engine (_render_polydata_views_in_process): the default 4-panel
diagnostic grid and render_shape_views_rpath (inspect channel) now
draw tubed BRep edges with LANCZOS supersampling like the single-view
path; grid review score 9/10 (was thin 1px lines)
- render_shape_views_rpath keeps its signature as the inspect-family
convenience entry (dpi sizing contract preserved: 3240x2160) and gains
the 0.04mm edge deflection cap; it is no longer the only way to render
raw shapes
- ty config: unresolved-import ignored repo-wide — OCP/VTK ship no .pyi
stubs and examples import sibling modules, so import resolution was
~900 diagnostics of environmental noise (verified: zero real defects
in the class); replaces the duck-typing workaround with natural
isinstance(TopoDS_Shape) checks
- gates: 13/13 render tests, mixed [Solid, raw] input smoke, grid visual
review, API docs regenerated, step-inspection domain doc notes the
unified entry
- workspace: column resizer between the two panes and row resizer between
rebuilt viewport and the dock (lime highlight, same interaction as the
scadpkg viewer); [hidden] display guard fixes tab switching (source
panel's display:flex used to override the UA hidden rule)
- composer: single clean input ('whats your idea to rebuild ?'), round-note
removed, ADD becomes a square + button; draft highlight #00c8ff replaces
lemon yellow; feature rows are informational (no click-to-code)
- flat restyle on the viewer token system: square corners, #10141a/#202832
chrome, lime accent, DM Mono micro labels, lucide SVG icons throughout
- CodeMirror: PythonEditor gains a theme option; new remode/code-theme.ts
flat dark theme replaces the oneDark+CSS-override patchwork
- visible horizontal scrollbars for the code areas; FIT root-cause fix in
the renderer (radius floor and minDistance clamps now derive from model
radius; multiplier 2.3)
- RESTUDIO_UI_REDESIGN.md documents every round and acceptance result
- 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
Closes the edge-crispness gap against the three.js viewer; the single-view
standard style now matches its 'light metal + dark ink' look (8/10 vs 9/10
in side-by-side review; remaining gap is lighting, not edges):
- tubed edge ink enabled for BOTH styles (was studio-only): dark
(0.145, 0.165, 0.196) vtkTubeFilter tubes, width as span fraction
(default lowered 0.0026 -> 0.0019 after visual iteration); tube sides
10 -> 14; edge_width_scale=0 falls back to the legacy thin lines
- edge discretization decoupled from the surface tessellation: dedicated
0.04 mm chord-error cap (was the shared 0.35 surface deflection), so
curved edges stay smooth once tubed — same philosophy as the viewer's
.lines.glb assets
- deterministic supersampling: render at integer factor (default 2,
validated 1-3) and LANCZOS-downsample; FXAA off when supersampling;
legend text scales with the factor so the final look is preserved
- coincident-topology polygon offset added (shared walls after booleans)
- tests: supersample writes the requested image size at factors 1/2/3,
out-of-range factor rejected; 13/13 pass; API doc regenerated
Default single-view output changes once, deliberately (thin light lines
-> crisp dark ink); supersample=1 + edge_width_scale=0 restores the
legacy 1:1 look.
Reviewed keep of the BLDC-GIF render pipeline changes (all opt-in; the
default inspection path is byte-identical, verified by A/B render):
- render_screenshot_rpath: + linear_deflection / angular_deflection
(tighten tessellation for high-res diagnosis), style='studio'
(product-shot look: black stage, camera-derived three-point lighting,
metal specular), edge_width_scale (tubed-edge radius as span fraction,
validated [0, 0.02]), view_up (explicit camera roll for inclined
orbits)
- BRep edges as vtkTubeFilter geometry in studio style: LineWidth is
capped ~3px on macOS, so edges must be geometry to stay readable at
high resolution / for small features
- contracts: unknown style, studio+views grid and out-of-range
edge_width_scale are rejected with guidance errors
- tests: three rejection contracts + studio/standard divergence smoke
(size-threshold assertion replaced with a behavioral one: outputs must
differ); 11/11 pass
- API doc regenerated via tools/auto_docs_gen.py (also picked up the
view_up parameter the hand edit had missed)
- examples/20 render_showcase.py: four-module axial explode (ESC /
motor / two-stage reducer / output shaft) with concentric radius-band
peeling, inclined camera orbit, exploded turntable GIF export
- img/capability: refreshed bldc_assembly/front/exploded studio stills
and added bldc_exploded.gif (72-frame inclined-orbit exploding
turntable; four modules separate axially, concentric parts peel into
radius bands)
- README EN/zh assembly cards: exploded still replaced by the turntable
GIF with captions describing the four-module axial explode
- README.md / README.zh-CN.md section 1: each case now shows the
first-turn requirement (verbatim excerpt) next to a turntable GIF of
the delivered model; flange row notes the 6->8-hole re-parameterization
so the 8-hole GIF cannot read as inconsistent with the prompt
- turntables rendered by the in-repo Scene Viewer BRep renderer through
the new viewer/src/embed-bundle.ts (reusable mountScene + camera utils)
and viewer/gif-harness.html (deterministic azimuth stepping, 48 frames
per turn), captured headless and assembled as looping GIFs
- img/capability: three turntable GIFs (0.7-1.6 MB each)
- vite build gains the gif-harness input
- flange/bracket demo images re-rendered through the in-repo Scene Viewer
(BRep face shading + edges, camera normalized to the scene bounding
sphere) via headless Chrome capture; raw-solid VTK renders replaced
- flange demo: caption bug fixed ('六特征块' read as six holes vs the
8-hole final model); renders tab now leads with the 6-hole @PCD 78
initial state next to the final 8-hole @PCD 84.5, making the turn-2
re-parameterization visible; glCap states the final state explicitly
- bracket demo: three viewer views (iso/top/detail)
- README cards: flange/bracket images swapped to viewer renders; captions
clarified to '6→8-bolt'
- 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
- 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)
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)
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.
Covers the five user questions in reading order: how to translate (single
case / batch / demos), what the output is (annotated FTC anatomy, tier
annotation semantics, constraint_id channel), coverage (structure 100% ops,
geometry channel 85.0%/76.7% pass, constraint channel 90.3%/93.0% solvable
on the standard 100-case samples), why things fail (four-way taxonomy:
unmapped forms / dataset-side constraint errors / build-level union
contract / known dataset artifacts), and how to find the non-translatable
entries (conflicts analyzer cross-tables + dump-uid, validate reports,
in-source notes, profiler). Numbers reproduce with the pinned
count/stride commands at the end.
Per user ruling: the translator unconditionally translates what the dataset
carries (constraints included, --constraints on|off, default on). The auto
mode, in-process preflight, drift gate and sidecar conflict report are gone
from the translator — auditing now lives entirely in histcad_conflicts.py,
which renders each feature's translated prefix with the same StepEmitter
and classifies the solve itself (solved / drifted >1e-3 / conflicting /
exec_error) on top of the residual + dof + halfSpace analysis.
histcad_validate.py is build + STEP volume reconciliation only.
Generated sources are unchanged in shape (single path, constraint_id tags,
pure FTC blocks); demos regenerated with full constraint sets and still
reconcile to STEP at machine precision. Purity tests updated to pin the
sharper contract: unconditional constraint translation, pooled-coincident
elision, and that the translator module never imports the SDK.
Generated sources carry the model only: the dual-path constraint fallback,
SKETCH_CONFLICTS/SKETCH_TIER_FALLBACKS audit globals and strict=False
inspection are gone from translated code. Tier decisions and conflict
auditing moved to translation time: auto mode solves each feature's
constrained sketch prefix in-process (preflight), emits sketch tier when it
solves AND reproduces the transcribed coordinates (max point move <= 1e-3,
the drift gate), otherwise transcribed geometry; diagnostics go to the
sidecar report (<case>.ftc.py.report.json).
Root causes found by the new histcad_conflicts.py residual analyzer and
fixed in the translator:
- point-pair H/V distances are directed: sign now taken from coordinates
(the stored length is a magnitude) — was the top Fusion conflict source
- Tangent on arcs needs an endpoint selector: picked as the nearest shared
junction with the other curve
- MajorRadius/MinorRadius store full axis lengths: halved to semi-axes
(solver was stretching ellipses 2x)
- Horizontal/Vertical flat line lists map each line individually
- variadic Equal chains get per-pair constraint ids (duplicate-id crash)
- Coincident entries whose refs pooled onto the same point are elided:
degenerate point-coincident equations made the solver Jacobian singular
and showed exact-geometry sketches as conflicting
SDK: constrain_concentric_rsketch now accepts ellipse targets (backend
resolves the ellipse center point).
Validation (100-case samples, constraints=auto): Fusion360 72 pass,
sketch-tier retention 77.5% (conflicts: 19 diverged + 1 conflicting);
DeepCAD 83 pass, retention 85.0% (9 diverged, 0 solver-conflicting).
Demos regenerated, volumes reconcile to STEP. Purity pinned by
test/test_histcad_translation_output.py (9 tests). Full suite 1489 passed.