Commit Graph

104 Commits

Author SHA1 Message Date
likang 48cec45fee Merge pull request 'feat(cadfs): expand selector provenance coverage' (#23) from lk_dev into main
Reviewed-on: #23
2026-09-14 11:20:10 +08:00
likang de21ee8a5b feat(cadfs): expand selector provenance coverage 2026-09-14 11:11:12 +08:00
likang c6d3bfddec Merge pull request 'feat(selector): 增加离线候选遍历与严格回放验证 Demo' (#22) from lk_dev into main
Reviewed-on: #22
2026-09-10 15:15:23 +08:00
likang 994d06aaea feat(selector): 增加离线候选遍历与严格回放验证 Demo
- 新增 selector_candidate_demo,移除 provenance intent 后枚举候选 selector
- 对候选分支执行有界重建与严格 STEP 比较
- 仅在候选遍历完整且唯一 strict 通过时生成 selector 映射记录
- 增加 selector 候选搜索、预算限制和记录生成的测试
- 保持生产 selector resolver 不受 Demo 逻辑影响
- 更新 CADFS 能力台账,记录 IMPRINT 派生 profile 的 lineage selector 缺口
2026-09-10 15:12:57 +08:00
likang adafac9f08 Merge pull request 'Lk dev' (#21) from lk_dev into main
Reviewed-on: #21
2026-09-09 18:52:27 +08:00
likang d8fc2a9207 Merge branch 'codex/integrate-ganjihong-refactor-2' into lk_dev
# Conflicts:
#	backend/app/cad_agent/domain/operation_contract.py
#	backend/engine/cdsl_engine/runtime.py
#	backend/engine/cdsl_engine/runtime_types.py
#	backend/engine/cdsl_engine/semantic_validation.py
2026-09-09 18:50:31 +08:00
likang 21a5185926 integrate ganjihong engine refactor 2026-09-09 18:41:56 +08:00
likang 387b99e255 wip: preserve local engine and agent workflow changes before ganjihong refactor integration 2026-09-09 17:08:24 +08:00
ganjihong cf9cd0366a refactor(cdsl_engine): extract topology evidence export from the adapter
Phase 6 of the decoupling refactor (behavior-preserving move):
- topology_export.py: body_geometry / surface_geometry / topology_records
  (~290 lines) moved verbatim out of build123d_adapter.py as module-level
  functions; includes the circle_center_mm/radius_mm concentric-circle
  evidence added by the lk_dev integration
- build123d_adapter.py: the three methods are now one-line forwards, so
  kernel construction and topology evidence export live in separate files
  and can evolve independently

No protocol change (GeometryAdapter untouched). Verified by:
- golden comparison: full-corpus analyze (2881 docs) + 12 complete
  rebuilds -- zero field differences vs f79c287
- full test suite: 435 tests, failure set identical to baseline
2026-09-09 16:07:25 +08:00
ganjihong 6fa4501f16 docs(cdsl_engine): document package layout and the add-atomic-operation workflow
Phase 8: README now maps every module of the split package, documents
the executor registration + schema-contract workflow for new atomic
operations, and restates the schema maintenance rule for executors/.
2026-09-09 14:34:14 +08:00
ganjihong 95cae203f4 refactor(cdsl_engine): freeze legacy engine paths under legacy/
Phase 7 of the decoupling refactor (behavior-preserving move):
- legacy/llm_compiler.py, legacy/llm_engine.py: frozen build_pack path
  (unused by run_cdsl_only), moved with git mv for history
- legacy/exact_rebuild.py: _run_parameterized / _run_exact /
  _apply_geometric_compensations moved out of rebuild.py, including
  the part-specific compensation table
- rebuild.py keeps run_rebuild / run_cdsl_only / compare_with_gold and
  imports the moved functions
- llm_compiler.py / llm_engine.py become compatibility shims

Frozen zone: new capability belongs in executors/ + schema contracts.
The project-specific compensation no longer sits in the main pipeline.
2026-09-09 14:02:53 +08:00
ganjihong ad88d92ab9 refactor(cdsl_engine): split translator.py into the translator package
Phase 5 of the decoupling refactor (behavior-preserving move):
- translator/ir.py: SolidWorks plugin JSON to backend-IR conversion (70 syms)
- translator/codegen.py: backend IR to build123d source generation (64 syms)
- translator/runtime_lib.py: frozen generated-script runtime library,
  spliced into generate_build123d_code as *RUNTIME_LIB_LINES
- translator/common.py: helpers shared by both sides
- translator/__init__.py: full historical symbol surface re-exported

Generated-code equivalence verified byte-for-byte against the pre-split
output for a representative IR sample; py_compile clean.
2026-09-09 13:56:08 +08:00
ganjihong beac59fc8b refactor(cdsl_engine): sink atomic runtime capability flags into schema contracts
Phase 4 of the decoupling refactor (behavior-preserving):
- profile_schema.json: every operation contract now carries
  runtime_capability {body_mutating, requires_active_body,
  replayable, requires_selector, open_profile_ok} (single source of truth)
- operation_contracts.py: validates and forwards the flags
- capabilities.py: the five data-classification frozensets are now
  derived from the schema at import time; dispatch-logic sets
  (_HOLE_ATOMICS, _PATTERN_ATOMICS, extent constants) stay in code
- test_profile_schema.py: completeness + structural invariants test

Equivalence proven by flag counts (27/13/25/6/2) matching the previous
hand-written sets and by the unchanged test-baseline failure set.
2026-09-09 13:41:38 +08:00
ganjihong 5ffb106f36 refactor(cdsl_engine): executor registry + per-family executor package
Phase 3 of the decoupling refactor (behavior-preserving):
- registry.py: atomic_executor decorator, ALL_ATOMIC_IDS with
  fail-fast registration validation, execute_node dispatcher
- executors/: one module per family (extrude, revolve, surfaces,
  loft_sweep, bodies, context, primitives, parametric, holes,
  dressup, patterns) + shared helpers in executors/common
- executors/__init__: explicit aggregation + completeness check
  (registry must cover every declared atomic id at import time)
- runtime.py: slimmed to entry points (analyze_cdsl/rebuild_cdsl)
  plus full historical re-exports incl. test-referenced privates

Adding an atomic operation now touches only one executor module and
its schema contract; the shared registry never changes. Verified
against baseline: zero new failures.
2026-09-09 13:33:06 +08:00
ganjihong 871070c440 refactor(cdsl_engine): extract session/extents/pattern_transform from runtime
Phase 2 of the decoupling refactor (behavior-preserving move):
- runtime_base.py: RuntimeExecutionError, FeatureExecutionError, ExtentVector
- session.py: GeometryAdapter protocol + ExecutionSession
- extents.py: end-condition planning (_extent_vectors family)
- pattern_transform.py: translate/mirror/rotate replay parameter algebra
- runtime.py: keeps executors + registry + entry points; re-exports all
  moved names (incl. test-referenced privates) for import stability

No behavior change; verified against baseline (zero new failures).
2026-09-09 13:13:17 +08:00
ganjihong 3fb08423da refactor(cdsl_engine): split runtime_types into specs + topology with shim
Phase 1 of the decoupling refactor (behavior-preserving move):
- specs.py: vector math, plane/axis helpers, parametric feature specs
- topology.py: diagnostics, planning contracts, TopologyRegistry
- runtime_types.py: compatibility shim re-exporting all public names

No behavior change; all historical import paths keep working.
2026-09-09 12:58:58 +08:00
likang f79c28759d Merge pull request 'Lk dev' (#20) from lk_dev into main
Reviewed-on: #20
2026-09-09 10:41:30 +08:00
likang a5c3ec1f36 merge: resolve main integration conflicts 2026-09-09 10:39:34 +08:00
likang 2f89d7930c feat(cadfs): expand reconstruction capability coverage 2026-09-09 10:11:46 +08:00
likang 9ab20db443 Merge pull request '几个几何操作的微小bug' (#18) from ganjihong into main
Reviewed-on: #18
2026-09-08 20:01:55 +08:00
ganjihong 7a2ce157f1 几个几何操作的微小bug 2026-09-08 19:57:52 +08:00
likang cf991dd619 Merge pull request 'N5 渐开线齿廓与齿条专用生成 involute_gear 的功能增加' (#17) from ganjihong into main
Reviewed-on: #17
2026-09-08 14:25:26 +08:00
ganjihong 235d3bf0c8 解决合并冲突 2026-09-08 13:58:58 +08:00
ganjihong 673ae62e70 提交关于N5功能,“involute_gear渐开线齿廓与齿条专用生成”的改动 2026-09-08 13:47:24 +08:00
likang c0475c5df5 Merge pull request 'Lk dev' (#16) from lk_dev into main
Reviewed-on: #16
2026-09-08 11:54:00 +08:00
likang 5bd1011335 Merge remote-tracking branch 'origin/main' into lk_dev 2026-09-08 11:52:52 +08:00
likang 6e8b994ee7 Merge pull request 'N3 功能,sheet_bend 钣金折弯功能的增加,还有一些简单的代码冲突' (#15) from ganjihong into main
Reviewed-on: #15
2026-09-08 11:48:25 +08:00
likang 738934416e feat(cadfs): 扩展重建引擎能力并固化代表性模型回归
- 扩展 CDSL engine 的 shell、sweep、loft、reference plane、pattern 等运行时能力,
  支持新的实体结果模式、双向拉伸、曲线扫掠、镜像/圆周阵列及相关 selector 解析。
- 完善 Build123d 适配层的拓扑快照、Compound/ShapeList 兼容处理和旋转曲面识别,
  兼容 Python 3.12 / 当前 Build123d 缺少 axis_of_rotation 的合法曲面场景。
- 扩展 CDSL schema、profile schema、capability analysis、semantic validation 和
  sketch solver,使新增建模操作能够被校验、执行并保留可诊断的部分结果。
- 完善 CADFS FeatureScript lowering:
  支持 shell、sweep、surface/实体 loft、圆周阵列副本、镜像副本、删除阵列实例、
  新 body 操作、更多拉伸终止条件和 reference plane 变体。
- 补齐椭圆、B-spline、环形区域、imprint、SWEPT_FACE、CAP_FACE、OFFSET_FACE 等
  草图和拓扑引用的转换逻辑,改善后续特征的工作平面、轴线和 profile 定位精度。
- 改进 selector binding:支持 pattern 前缀复合 B-rep 快照、交集顶点引用、
  多面 match_mode=all、圆柱轴线/半径和面积下限等稳定匹配条件。
- 修复 MID_PLANE 法向统一后交线方向未同步的问题,恢复 00287955 基准面的正确位置;
  修复 00542223 sweep 路径反转后的切线契约和 00423838 的拓扑面数不稳定测试假设。
- 修正 CADFS 比较模块 import 路径,补充重建报告、批量重建脚本、目标文档和 README。
- 新增并扩展 engine、lowering、parser、selector binding、reports、integration 和
  Onshape pipeline 回归测试,覆盖代表性 CADFS 特征链及运行时兼容性。
2026-09-08 11:47:10 +08:00
ganjihong f48ba19dfa sheet_bend 的一个文件 2026-09-08 10:03:03 +08:00
ganjihong c524f0213c 一个小的代码冲突 2026-09-07 19:53:25 +08:00
ganjihong 2414904b02 处理一些冲突 2026-09-07 19:40:10 +08:00
ganjihong 00b50b1f31 提交N3 功能的改动 2026-09-07 19:30:56 +08:00
likang d518442565 Merge pull request 'Lk dev' (#14) from lk_dev into main
Reviewed-on: #14
2026-09-07 18:40:19 +08:00
likang e7dc521ece Merge remote-tracking branch 'origin/main' into lk_dev
# Conflicts:
#	backend/engine/cdsl_engine/capabilities.py
2026-09-07 18:34:45 +08:00
likang d2a33390dd Merge pull request 'open_slot 的第二次迭代' (#13) from ganjihong into main
Reviewed-on: #13
2026-09-07 18:21:56 +08:00
likang 038d38ed98 feat(cadfs): 补齐核心建模能力并建立代表性回归
- 新增 loft、双向切除、through-all/up-to-next 等 CADFS lowering 与 engine 支持
- 支持多种 reference plane、B-spline profile 和 circular pattern replay
- 保留 transform 历史,并烘焙安全的单源平移/旋转变换
- 改进 selector 绑定、拓扑快照和 pattern 变换处理
- 建立 17 个代表样本的转换、重建与比较回归工具链
- 补充 schema、author guidance、运行时和几何回归测试
2026-09-07 18:21:07 +08:00
ganjihong a208ea5c8b open_slot 的第二次迭代 2026-09-07 17:44:05 +08:00
likang 4ad890b7b4 Merge pull request '几何引擎新增open_slot功能。' (#12) from ganjihong into main
Reviewed-on: #12
2026-09-07 16:59:05 +08:00
ganjihong 9a3e09b9f5 几何引擎新增open_slot功能。 2026-09-07 16:44:06 +08:00
likang c1b84d1f76 Merge pull request '修改了一些之前增加功能的bug' (#11) from ganjihong into main
Reviewed-on: #11
2026-09-07 15:57:53 +08:00
ganjihong 9160c2bace 修改了一些之前增加功能的bug 2026-09-07 15:25:24 +08:00
likang 4f068068f9 Merge pull request 'Ganjihong: thread 功能的主要功能实现' (#10) from ganjihong into main
Reviewed-on: #10
2026-09-04 17:49:53 +08:00
ganjihong ef5d393c20 内螺纹 thread_cut 算子的增加 2026-09-04 17:42:04 +08:00
likang 921ba5eab3 change 2026-09-04 11:17:36 +08:00
ganjihong 9abba1b12d Merge branch 'ganjihong' of https://gitea.robotquan.com/likang/cdsl-cad into ganjihong 2026-09-04 10:36:45 +08:00
ganjihong 9c52022c14 thread 功能的主要功能实现 2026-09-04 10:29:39 +08:00
likang 9e27f11bb7 Merge pull request '增加了thread几何基础操作' (#9) from ganjihong into main
Reviewed-on: #9
2026-09-04 10:18:51 +08:00
likang 1b6958db62 Merge branch 'main' into ganjihong 2026-09-04 10:18:36 +08:00
ganjihong bb9e8a8720 增加了thread几何基础操作 2026-09-03 19:39:06 +08:00
likang 1a43556910 Merge pull request 'feat: add 增加了几个较为简单的几何操作' (#8) from ganjihong into main
Reviewed-on: #8
2026-09-03 17:05:08 +08:00