Commit Graph

11 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 e9dcba0f96 feat(sketch): unified loop/chain extraction for wire promotion
Replace _ordered_edge_loop with _ordered_edge_path: a connected edge
component with all vertex degrees <= 2 is either a closed loop (no
degree-1 vertices) or a simple open chain (exactly two), so one walker
classifies both and reports closedness as a payload property.

- make_wire_from_sketch_rwire now promotes open chains (e.g. sweep
  paths); branching remains unusable and is named per component
  ('branch point X carrying N edges') in selection errors instead of
  being silently dropped behind a misleading 'no closed profile' message
- make_face_from_sketch_rface keeps requiring closed loops; its error
  lists each component's classification (closed loop / open chain /
  branched)
- closedness stays a consumer contract: extrude/revolve/face builders
  already reject open wires at the point of use; sweep accepts open
  paths unchanged

Tests cover chain promotion, consumer rejection, branch-point
diagnostics, mixed loop+chain selection, and a fully constrained
tangent-continuous U sweep path promoted from a sketch and swept to a
solid.
2026-08-31 20:45:55 +08:00
NiJingzhe 152bbf3432 refactor!: reorganize package root into themed subpackages
- operators/: _support + geometry/features/boolean/transform/selection/sketch/product
- product/: semantic value model, solver, occurrence, packages, capture
- topology/: model, tagging, tracking, autotag (package re-exports model symbols)
- params/: units, expr, tolerance, frame
- recording/: graph, serializer, source_mapping
- _internal/: canonical_json, vendor_warning_filters, semantic, mesh, brep_region

Root shrinks from 46 to 7 modules. Drop the legacy geometry/boolean/transform/
selection monolith copies and the operations.py facade; unified operator
exports now live in operators/__init__ with monkeypatch mirroring preserved.
Remove the legacy evolve generators and their example/tests/docs. Import paths
for simplecadapi.topology keep working via package re-export; update all
in-repo consumers, tests, tools/auto_docs_gen source tables, and regenerate
the skill API reference docs.
2026-08-31 12:46:57 +08:00
NiJingzhe e63a18b530 feat: expand replayable surface translation 2026-08-08 02:11:06 +08:00
Jiahang Shen e190715868 feat: enhance declarative sketch profiles 2026-07-31 11:07:20 +08:00
NiJingzhe 9e8450f192 feat: add py-slvs sketch solver backend 2026-07-30 01:00:01 +08:00
NiJingzhe c9760f2866 Add replayable modeling and Scene packages 2026-07-23 03:15:43 +08:00
NiJingzhe 3fa3991a1d Refactor FreeCAD translator namespace 2026-07-06 01:55:01 +08:00
NiJingzhe f4f4d12eda Complete sketch and exact spline translation 2026-06-20 22:12:53 +08:00
NiJingzhe 4e046152ca Add constrained sketch API 2026-06-13 03:13:26 +08:00
NiJingzhe 65beee4c81 Prepare 2.0.0b1 beta release 2026-05-09 23:17:08 +08:00