Commit Graph

69 Commits

Author SHA1 Message Date
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 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
ganjihong 7a2ce157f1 几个几何操作的微小bug 2026-09-08 19:57:52 +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 5bd1011335 Merge remote-tracking branch 'origin/main' into lk_dev 2026-09-08 11:52:52 +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 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 9c52022c14 thread 功能的主要功能实现 2026-09-04 10:29:39 +08:00
ganjihong bb9e8a8720 增加了thread几何基础操作 2026-09-03 19:39:06 +08:00
ganjihong ef9626f936 feat: add primitive & pattern geometry ops to build123d adapter
- add box/cylinder/intersect/sweep/sweep_path/helix_path primitives
- add pattern_linear/pattern_circular direct kernel arraying
- refactor boolean result normalization into _coerce_single_or_compound
2026-09-03 16:14:33 +08:00
likang 100a0e106b Merge remote-tracking branch 'origin/main' into codex/save-current-work-20260901 2026-09-03 10:42:31 +08:00
likang c25b73c71e 添加cadfs_to_cdsl代码,优化cad生成 2026-09-03 10:40:51 +08:00
likang f3eb5dff54 优化流程 2026-09-02 13:51:35 +08:00
likang 97a03c290b chore: save current work 2026-09-01 16:37:27 +08:00
likang bc87bd6d2d 重构 改为标准化输出 2026-09-01 14:10:23 +08:00
likang a16919f050 Merge pull request 'Ganjihong' (#6) from ganjihong into main
Reviewed-on: #6
2026-08-31 17:01:24 +08:00
ganjihong 52dd2d929a revert 9d849df618
revert feat(engine): 鏀寔 annulus/circles profile 鐩存帴閲嶅缓涓?schema 鍚屾
2026-08-31 16:44:59 +08:00
ganjihong d192ac5ccd pattern引用重解析,修复完成 2026-08-31 16:01:53 +08:00
likang 7533b298f1 优化 2026-08-31 14:16:08 +08:00
ganjihong dee5e7557a feat:新增登录功能 2026-08-28 18:17:38 +08:00
ganjihong 9d849df618 feat(engine): 鏀寔 annulus/circles profile 鐩存帴閲嶅缓涓?schema 鍚屾 2026-08-28 16:20:49 +08:00
likang b1b226593a merge 2026-08-27 19:07:57 +08:00
likang b26db86d78 修改agent流程,分步构建cdsl 2026-08-27 18:59:33 +08:00
ganjihong 7e199d785d fix(engine): 支持倒角角度参数并新增回归测试 2026-08-27 18:48:27 +08:00
ganjihong 9e5aa48c3d feat(engine): 支持多实体 body 与 selector 持久化
- 多实体主体拆分为独立 body_id,支持前缀匹配解析
- 重建结果新增 solid_count 字段
- fillet/chamfer 后 selector stable_id 可解析到演化后继
2026-08-27 18:08:54 +08:00
ganjihong e5c71d07fa fix(engine): 放行固定宿主面与终止面的 pattern 变换
允许 hole_wizard 的 face selector 宿主面及 up_to_surface 的 face reference 终止面参与 pattern 变换,同时保留 mirror 等逐实例拓扑依赖的阻塞,并补充回归测试
2026-08-27 16:04:34 +08:00
ganjihong 625b296e06 feat(engine): 支持 up_to_surface 非均匀 profile 裁剪拉伸
为 up_to_surface 终止条件新增裁剪语义,通过穿透拉伸与目标面布尔求交保留可达材料,修复非均匀相交时错误拒绝特征的问题。
2026-08-27 15:40:58 +08:00
ganjihong c84fc3ade4 fix(engine): 接受 hole_wizard 的 thread 装饰并按光滑孔降级执行 2026-08-27 15:19:24 +08:00
ganjihong ba481621be fix(engine): 显式拒绝 extrude draft 参数而非静默忽略 2026-08-27 15:10:36 +08:00
ganjihong 9b4e64839b fix(engine): 支持 revolve 特征的 reverse 参数 2026-08-27 15:01:41 +08:00