Commit Graph

10 Commits

Author SHA1 Message Date
NiJingzhe 67f78f893d fix(geometry): align planar profile axes with the box convention
_orthonormal_plane_axes built the in-plane basis with x = cross(z, ref),
which for a +z normal yields x=(0,1,0), y=(-1,0,0): every non-square
rectangle made on the z=0 plane was silently rotated 90 degrees relative
to make_box_rsolid (width along global y instead of x).

Build the basis by projecting the reference vector onto the plane
(Gram-Schmidt) instead: for a +z normal the frame is exactly the global
(x, y, z), matching the box convention and the OCC gp_Ax2 default. The
reference-axis branch keeps ref away from z, so the projection never
degenerates. Only make_rectangle_rwire uses the helper (session and
legacy paths); other planar makers are unaffected.

BREAKING CHANGE: non-square rectangles now orient width along global x
for +z normals; both session and legacy paths rotate together. Recorded
replay graphs built with non-square rectangles reproduce rotated
geometry.

test_surface_api's partial-overlap trim test encoded the transposed
convention; its loop dims (4, 2) -> (2, 4) reproduce the exact footprint
(x in [0.5, 2.5], y in [-2, 2]) the test has always exercised.
2026-09-03 17:57:47 +08:00
NiJingzhe a5e6bf8eb6 feat(core)!: QL-only topology enumeration — remove bare getter list form
Plural topology getters (get_edges/get_faces/get_wires/get_vertices/
get_solids/get_inner_wires/get_edge_occurrences and the Compound
variants) now accept ONLY an index. The no-argument list form raises a
SimpleCADError with migration guidance (enumerate via
ql.<kind>().resolve(shape), pick via get_X(index)). This closes the
selection channel that escapes the graph: Python loops over bare lists
lose the predicate, capture kernel artifacts (the periodic-face seam
edges that broke FCStd translation), and leave no cardinality contract.

- each shape class keeps its enumeration logic as private _iter_<kind>();
  indexed picks record geo-select nodes as before (contract test added);
  Compound getters gain the same indexed recording they lacked
- _TopologySelectionList (the __getitem__ recording vehicle, which also
  made get_X()[i] a silent escape hatch) is retired
- all 109 internal call sites, 165 test call sites, and 31 example call
  sites migrated: SDK/tests use the private channel, user-facing
  examples use ql.<kind>().resolve(...)
- QL _resolve_scope_items switches to the private channel; scene
  contract profile descriptions synced; error strings recommending
  bracket indexing rewritten
- skill docs: strict prohibition added to SKILL.md global rules (new
  rule 6), core README contract statement rewritten, solid/wire/face/
  shell/tagged_mixin pages re-exemplified with QL, geometric-validation
  anti-pattern section updated; mirrors rebuilt via tools/skillbuild.py

Gates: full suite 1418 passed / 5 skipped; translator suites 133 passed;
u_link stage verifiers + render check ALL PASS; scadpkg->FCStd
retranslation verified (5 visible deliverables, 167-object editable
tree).
2026-09-01 02:09:29 +08:00
NiJingzhe e1df185f5b Merge cadir/dev into feat/prt-and-assemble 2026-08-19 14:42:27 +08:00
NiJingzhe 2427048ea8 feat(brep): add region snapshots 2026-08-17 00:46:20 +08:00
Jiahang Shen 31ec2d7914 fix(surface): preserve bounded workflow semantics 2026-08-15 20:04:29 +08:00
Jiahang Shen 62bb587d2d fix(surface): record partial trim lineage 2026-08-15 20:04:29 +08:00
Jiahang Shen b53fce7a21 feat(surface): add replayable trimmed surface workflows 2026-08-15 20:04:29 +08:00
NiJingzhe 9d6703a786 feat: enforce canonical product capture workflow 2026-08-15 16:17:11 +08:00
NiJingzhe 2e169dec8f feat: support named point-profile lofts 2026-08-06 13:21:56 +08:00
NiJingzhe d7a6ba4dc3 feat: add replayable surface modeling APIs 2026-08-05 21:32:07 +08:00