test_render_screenshot_multiview patched _render_polydata_views, which
after the prepare/execute split is only the synchronous wrapper used by
the STEP inspection path; the SDK screenshot path now enters the grid
engine at _prepare_polydata_render.
P1 family 7 (assembly solve): the solver's five strict raise sites emitted
one-line ValueErrors that discarded the residual and connectivity data
already in hand. Residual failures (forwarded + final pass) now carry
measured translation/angular errors against both tolerances, a
per-constraint inventory (exceeded/ok with numeric deltas), and a
worst-first repair that targets connector frame definitions instead of
component placements, plus the closed-loop overconstraint escape (break
the loop or solve it inside a subassembly). Structural failures
(unresolvable loop / no grounded path / unsolved components) carry the
connectivity verdict as inventory (grounded/reachable/unsolved with
constraint-reference counts). The public wrapper surfaces them unchanged
via the SimpleCADError passthrough.
P1 family 8 (render export): the zero-hit highlight_tags guard now lists
the tags actually available on the shapes (solid + face level, capped at
24 + count row), so the typo question is answerable from the error
itself; _RenderTagMismatch promotes the payload to what_happened
(mechanism-A surgical promotion).
Tests: 3 assembly cases (15 mm residual asserted, connectivity verdict,
wrapper passthrough) + 1 render guard case (missing + available tags in
the headline). Full suite 1852 passed, 5 skipped; ty unchanged.
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
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
render_screenshot_rpath now defaults to a multi-view grid instead of a
single view: one PNG with a panel per SCREENSHOT_VIEWS entry (isometric,
top, front, side), carrying the same highlight-tag color groups, callout
labels (2-D leader-line style, projected per panel), legend and — new
for the grid engine — per-panel axis triads.
- The multi-view grid engine (_render_polydata_views[_in_process])
gains show_axes: a vtkAxesActor per panel, sized from the visible
bounds, forwarded through the macOS render worker protocol.
- _render_sdk_screenshot_rpath keeps all of its view-independent
tag-to-group / callout-anchor / legend computation and routes through
the grid engine when views is provided; image_size (pixels) maps to
inches*dpi=100 so pixel dimensions are preserved.
- Public API: new views parameter; default (view='auto') resolves to
SCREENSHOT_VIEWS; an explicit view keeps the legacy single-view path
unchanged. zoom only applies to the single-view camera.
- render_shape_views_rpath is unchanged: it remains the raw-TopoDS_Shape
entry for the STEP inspection family; both entries now share one grid
engine with identical annotation capabilities.
BEHAVIOR CHANGE: the default output of render_screenshot_rpath switches
from a single-view image to the 4-panel grid. Callers passing an
explicit view are unaffected.
ty: no new diagnostics (1043 before and after). Auto-doc pages
regenerated. Full suite: 1432 passed, 5 skipped (7 new tests: wiring,
custom views, legacy single-view routing, two real renders, constant
shape, empty-views rejection).