Commit Graph

29 Commits

Author SHA1 Message Date
NiJingzhe 23fcc6a4e1 feat(ellipse): full ellipse support at geometry tier, sketch tier, and FreeCAD translation
- Geometry tier: make_ellipse_redge/rwire/rface with major_direction
  orientation; exact OCC Geom_Ellipse geometry (area pi*a*b).
- Sketch tier: add_ellipse_rsketch derives the shape from three solving
  points (center, major-axis end, minor-axis end) so radius constraints
  solve natively; constrain_major_radius_rsketch and
  constrain_minor_radius_rsketch drive point distances; fix pins all
  three points; promotion builds an ellipse profile branch.
- Solved entities report center/axis points, radii, and major-axis angle.
- FreeCAD: Part.Ellipse(S1, S2, Center) three-point construction in both
  Sketcher materialization and wire fallback; major radius maps to the
  native Radius constraint, minor radius to a reference distance on the
  solved minor-axis point (FreeCAD has no native minor-radius
  constraint; noted in mapping status); geometry-tier emitter uses
  _kernel_ellipse_from_params.
- QL curve_type('ELLIPSE') verified against promoted faces.
- 14 new tests; API doc pages regenerated.
2026-09-04 05:29:19 +08:00
NiJingzhe d57835232a feat(sketch): HistCAD constraint coverage — driving angle, line distance, point alignment, normal, mirror, midpoint
- Driving angle lowering: addAngle folds directed 0-360 values to the
  undirected magnitude; the solve keeps the branch nearest the initial
  geometry. Angle measurement normalizes to [0, 360).
- constrain_line_distance_rsketch: minimum offset between lines via a
  signed point-line distance (initial side preserved).
- constrain_points_horizontal/vertical_rsketch for two-point alignment.
- constrain_normal_rsketch (line through curve center),
  constrain_mirror_rsketch (entity mirror decomposed to point symmetric
  pairs with nearest-initial endpoint pairing), and
  constrain_midpoint_points_rsketch (two-point midpoint via helper
  segments: equal length + parallel through the shared point).
- Repair: symmetric lowering no longer uses py-slvs addSymmetricLine,
  which mirrors about the workplane u-axis regardless of the axis entity;
  it now decomposes to midpoint-on-line + perpendicular. Regression
  tests cover vertical and diagonal axes.
- FreeCAD translator: new kinds map to Sketcher Angle/Distance (point to
  line)/point-form Horizontal/Vertical/PointOnObject (center on line)/
  Symmetric (line mirror and three-point midpoint); priority map,
  emitter registry, capabilities, and canonical op set updated.
- 24 new tests (solve semantics, side/basin behavior, serialization
  round-trip, FCStd script mapping) + regenerated API doc pages.
2026-09-04 05:14:09 +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 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 2fc3029a86 refactor: split operator facade and public connectors 2026-08-20 14:52:07 +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 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 e63a18b530 feat: expand replayable surface translation 2026-08-08 02:11:06 +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
Jiahang Shen f799ecf9b0 feat: add replayable interpolated splines 2026-08-03 10:42:43 +08:00
Jiahang Shen e190715868 feat: enhance declarative sketch profiles 2026-07-31 11:07:20 +08:00
NiJingzhe c9760f2866 Add replayable modeling and Scene packages 2026-07-23 03:15:43 +08:00
NiJingzhe 0369769684 Add semantic CAD workflows and advanced examples 2026-07-15 19:58:30 +08:00
NiJingzhe dab03777ec Add mesh extraction and collision verification 2026-07-10 10:09:17 +08:00
NiJingzhe b2af8822cf Add connector forwarding API 2026-07-06 17:45:41 +08:00
NiJingzhe d54a1e25e4 Refactor FreeCAD translator namespace 2026-07-06 01:55:01 +08:00
NiJingzhe 7196a75a57 Add standard gear library and release 2.0.1 2026-06-29 14:32:56 +08:00
NiJingzhe fba5de795d Test assembly constraints, serialization, and FreeCAD translation
Add 16 assembly tests covering geometry-backed connectors (face/edge/
vertex with flip), fixed/revolute/prismatic constraints, limit-aware
solving, grounding, and residual measurement. Add serialization roundtrip
tests for the new connector ops. Extend FreeCAD translator tests with
face-connector-based joint emission and GuiDocument.xml Proxy injection.
2026-06-26 17:38:52 +08:00
NiJingzhe 1e06260a57 Add single-body product assembly API 2026-06-26 05:01:13 +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
fanfengxiao c12e918713 fix: rename solid boolean APIs to rsolid 2026-06-08 15:11:34 +08:00
NiJingzhe f185406516 Support indexed geo select nodes 2026-06-02 23:29:27 +08:00
NiJingzhe 80dfcce8f9 Support QL-selected profiles in FreeCAD translation 2026-06-01 13:53:46 +08:00
NiJingzhe 7425f71d79 Refactor SDK contract and QL selection replay 2026-06-01 01:14:19 +08:00
NiJingzhe 65beee4c81 Prepare 2.0.0b1 beta release 2026-05-09 23:17:08 +08:00