Commit Graph

7 Commits

Author SHA1 Message Date
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 70251a980d perf(stdlib): build helical/herringbone ring gears by direct multi-loop sweep
Ring gears still used small-step ruled lofts through rotated copies of
the internal tooth wire plus a boolean cut, while external gears had
already moved to continuous twisted sweeps. Sweep the multi-loop ring
face directly (outer rim + internal tooth profile): helical uses one
twisted sweep, herringbone fuses two opposite-handed halves, both
mirroring the external gear construction. On BLDC-scale rings this is
~40x faster than the ruled-loft+cut path and produces ~6x fewer faces
(45t m0.8: 0.38s/183 faces vs 15.2s/1083 faces), with volume matching
the swept reference; the ruled loft was the approximation (chordal
sections undersize the void by ~1e-4). Invert the two loft-era contract
tests to require zero loft/cut nodes and the twisted-sweep op counts.
2026-08-21 11:14:18 +08:00
NiJingzhe f72e24e026 Optimize stdlib graph tracking 2026-07-23 04:23:00 +08:00
NiJingzhe fb4b1cd9b5 Expand gear and chain standard parts 2026-07-23 03:15:59 +08:00
NiJingzhe 67ff029f82 Use ruled lofts for helical gears 2026-07-06 17:47:16 +08:00
NiJingzhe 3fa3991a1d Refactor FreeCAD translator namespace 2026-07-06 01:55:01 +08:00
NiJingzhe 4dc8e2a21d Add standard gear library and release 2.0.1 2026-06-29 14:32:56 +08:00