38 Commits

Author SHA1 Message Date
Ni Jingzhe 453bad341f build: a plain uv sync builds the C++ module on Windows (toolchain and OCCT detection, rebuild only when src/cpp changes)
On a Windows machine without Visual Studio, scikit-build-core left the generator to CMake's default (NMake), the build failed
with "'nmake' -? failed", and every contributor had to hand-set CMAKE_GENERATOR / CC / CXX / CMAKE_ARGS. uv also rebuilt the
editable install on any pyproject.toml change (a version bump), which is how the failure showed up after the 2.2.9 release.

- tools/build_backend/scad_build.py: a PEP 517 backend wrapping scikit-build-core. On Windows it uses Ninja + the gcc on PATH
  when Visual Studio is absent, finds OCCT (SCAD_OCCT_PREFIX, C:/occt, a per-user cache, or builds it once with
  tools/build_occt.py) and limits jobs by RAM (g++ ran out of memory under ninja's default). Anything the user or CI sets wins.
- [tool.uv] cache-keys: rebuild only when src/cpp changes.

Build tooling only: nothing in the published package changes, so no version bump.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:34:22 +08:00
NiJingzhe 3ad47b60fc README: the idea, the evidence, the skill, the plugins
Rewritten to 148 lines each (was 769 and 650): three pillars (efficient, low-overhead, agent-native), two comparison charts
(against CadQuery on 200 parts; tokens per task against a mature industrial CAD through its MCP; English and Chinese,
drawn by tools/make_readme_charts.py), the two six-axis arms in the new editor, the skill (seven routes and how it is
organised) and the plugin system. The update notes live in CHANGELOG.md and docs/updates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 03:02:05 +08:00
NiJingzhe d137ec553d docs: API pages for scad.ref (ref.<name>), ql.ref, ElementRef and ElementRefError
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 13:33:22 +08:00
NiJingzhe 7b31b33cfa fix: a checkout is a built source tree only when the compiled module is there, not when the type stubs are
The validation workers (build123dftc, cadqueryftc) put the checkout's src on their subprocess's path only when it is a
built tree, because it would shadow the installed wheel with Python files that have no compiled module. They looked for
glob('_native*'), which the new type stub directory src/simplecadapi/_cpp/_native/ matches: in the release workflow's wheel
tests (the wheel installed, the checkout not built) six tests failed with 'simplecadapi needs its compiled C++ module'.
wheel_smoke.py asserted the same glob, which the stubs would have satisfied without the extension.

All three now require a file. A test pins the rule (stubs alone: not built; .so / .pyd: built).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 20:09:34 +08:00
NiJingzhe b0a138c708 fix: research tool workers do not shadow an installed wheel with the source tree
The validation workers put the checkout's src on PYTHONPATH first; with a wheel installed and no in-place build that
imported a package without its compiled module.  src is added only when it is a built tree.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 22:15:28 +08:00
NiJingzhe 8971279494 feat: the geometry engine is C++ on OpenCASCADE, one package, prebuilt wheels
The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in
C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp.  The Python layers that stay
Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the
previous Python test suite passes on the new engine.

Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core.
simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the
Python adapter layer is simplecadapi/_glue.  OCP is no longer a dependency and nothing imports it.

Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows
x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to
GitHub and PyPI; ci.yml caches the static OCCT for the test jobs.

Errors: every message the library writes is English; the tag-validation and semantic-query errors render in
full with possible causes and fixes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:55:35 +08:00
NiJingzhe c195380247 docs(api): the generator documents every operators module, and the docs are what it writes
Four operators modules (deformation, draft, limited_extrusion, section_features)
were missing from the generator's source list and its table of public
functions, so the docs of scale/transform/offset/boolean_rsolidlist/draft/
extrude_until/extrude_taper/sweep_multisection were hand-kept and the generator
deleted them. operators/ is now discovered, a function the package exports is
public, the content of the hand-written docs moved into the docstrings (Args,
Raises, Examples), and tests check that every operators function has a doc
and that the committed docs equal the generator's output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 01:04:39 +08:00
NiJingzhe 3f5ee25e1c perf(cache): build restored shapes on first use; compress the cell cache
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 23:45:59 +08:00
NiJingzhe 999439d939 perf(cache): cheaper shape restore, no private values, compressed geometry
Adding a child no longer refreshes the subtree's tag cache unless a tag can
pass down; restore indexes entities by position and refreshes tag caches once;
the cell cache stores no underscore names' values; BinTools bytes are zlib'd.
Desktop-arm benchmark: no-change run 23.6s -> 7.0s.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 23:18:40 +08:00
yuliuse 3c15754221 fix: harden build123d FTC tracing replay and validation 2026-10-13 15:58:29 +08:00
yuliuse 6a63494978 feat: add build123d to FTC conversion tools
Capture Builder and algebra programs into portable feature traces, emit native FTC sources, and validate geometry in isolated processes.

Include the API inventory, six real trace fixtures, inferred constraint recovery, and the 50-model benchmark. All models build; the tea-cup STEP reference-kernel failure remains explicit.
2026-10-07 17:05:30 +08:00
NiJingzhe 3dd8c77b8d refactor!: replace the part cache with the marimo notebook runtime
A SimpleCAD model is now a marimo notebook: a PEP 723 header with a
[tool.simplecadapi] table (id, revision, tolerance_profile, inputs), one
FTC block per cell, and the product is the top-level value whose id is the
notebook id. The notebook file is the only source of truth; .scadpkg is
only for exchange and publishing.

Runtime (simplecadapi.runtime):
- run_notebook(path, *, id=None, overrides=None, cache=True) and
  sca run <notebook.py> [--id] [--set NAME=VALUE] [--no-cache] [--out]
- use(path, id=..., **overrides) composes child notebooks; notebook_id()
  lets one notebook serve a part family under per-use ids
- each cell records into its own session; cells are the unit of caching,
  keyed by the notebook dependency digest (deps.json)
- marimo cell executor entry point, so marimo edit runs the same way
- shapes and read-only definition mappings pickle for the cell cache

Removed: the content-addressed part cache (simplecadapi.cache,
CachePolicy, CacheReport, sca cache ...), the incremental assembly solver
and its dependency/state modules, and part-interface diffs with latest-
state persistence. Part and assembly builds and the notebook projection
now share one definition writer (build/definition.py).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-02 17:16:16 +08:00
auua a3fa37e50b Revert "Ci/harbor smoke (#12)"
This reverts commit d9d42a4d73.
2026-09-23 20:27:59 +08:00
auua d9d42a4d73 Ci/harbor smoke (#12)
## Summary

增加CI项:

- 时机:当push master/dev时触发
- 任务:按照仓库配置的变量,让harbor运行给定的数据集
- 动机:查看不同推送是否对具体任务有帮助

---------

Co-authored-by: auua <12321ua@gmail.com>
Reviewed-on: https://git.auuuuuua.top/PhySpace/CADIR/pulls/12
2026-09-23 20:17:39 +08:00
NiJingzhe 264a904f8b feat(skill): 'sca skill targets|install' + skill source shipped in wheel
The wheel force-includes the uncompiled docs/skill source tree and
skillproj.toml as package resources; compilation happens at install
time on the user's machine, so no repository checkout is needed.

The compiler moves to simplecadapi.skill.compiler; tools/skillbuild.py
stays as the maintainer-side wrapper over the same code.

'sca skill install' compiles into <skills-dir>/simplecadapi (location
resolved through the existing addon config/env chain, default
~/.agents/skills; no sca init required) and refuses to overwrite
without --force, which only permits replacing a directory whose
SKILL.md declares the same skill name.
2026-09-18 10:54:13 +08:00
liuyu 9caa2caa3a feat(drawing): integrate PDF reconstruction and evidence validation
Add the drawing inspection namespace and its parser, calibration, section and
independent acceptance dependencies on the current dev architecture.

Protect input BREP during material fusion and sectioning. Bind dimensions,
annotations and visual reviews to source identities and measured geometry.
Connect the workflow and generated API docs to all seven skill build targets.
Make standalone verifier tests work with the pytest console entry point.

Validation: 186 drawing, documentation, skill-target and public API tests;
16 non-render BREP query tests; compileall and skillbuild --check.
2026-09-11 13:36:27 +08:00
yuliuse 56bcc62e49 feat(whucad): WHUCAD vector → FTC translator toolset under tools/research
Decode the WHUCAD h5 vector sequences (256-level quantized CATIA/DeepCAD
command matrices) and translate them into SimpleCADAPI FTC sources,
mirroring the histjson tool suite:

- whucad_vec.py       self-contained decoder (numpy only; differential-
                      checked against the original cadlib, 1419/1419 exact)
- whucad_select.py    Topo/Select history references -> ql predicates
- whucad_to_ftc.py    translator (keyword-form call emission, histjson
                      convention; unsupported forms annotated, never
                      approximated)
- whucad_profile.py   feature/curve/select-form distribution + coverage
- whucad_validate.py  sampled build + BRep-truth volume reconciliation
                      (scale-corrected: vectors carry no absolute scale)
- whucad_batch.py     whole-dataset batch entry point
- check_port.py       differential check vs the original cadlib decode
- test_whucad_translation_output.py  output-contract tests (embedded
                      vectors; no dataset download needed)

Full-dataset run: 146,331 models -> 146,331 .py, 424,947 features decoded,
380,074 feature blocks emitted (89.4%). pyproject gains a 'whucad' extra
(h5py).
2026-09-10 22:07:28 +08:00
NiJingzhe aac0fbb29d feat(cache): script-anchored part cache, keyword-form corpus, 2.1.2
- @scad.part/@scad.assemble anchor defaults to the builder script's own
  directory: cache + interface state land beside the source, standalone
  scripts run anywhere, and the pyproject.toml walk-up requirement is
  gone (explicit project_root still relocates the anchor)
- file_input() paths resolve relative to the anchor; in-repo examples
  rewritten to script-relative declarations
- HistCAD translator emits keyword-form sketch-family calls (corpus
  self-documentation), pinned by tests; booleans stay positional by
  *solids signature
- both translators emit project_root=Path(__file__).parent explicitly;
  examples/histcad_demo regenerated (STEP volume reconciliation held)
- FTC convention documents @scad.part parameters and the cache contract
- version stamps 2.1.2 + bilingual update notes
2026-09-10 00:11:28 +08:00
NiJingzhe 90af1346e5 docs: usage-first README for the cadqueryftc toolset 2026-09-09 21:59:22 +08:00
NiJingzhe 022d14b733 feat: keyword-only call emission for training-corpus self-documentation
All sketch-family calls emitted by the translator now pass every argument
by keyword — add_point/add_line/add_circle/add_arc, constrain_* (via a
per-kind parameter-name table), and the face/wire promotions — so the
parameter meaning is legible from the corpus itself.  The only exception
is the boolean *solids varargs (union/cut/intersect), which have no
parameter names to take.

Also fixes an f-string trap the keyword pass exposed: a conversion
(`!r`) applies to the whole conditional expression, silently quoting the
numeric branch of value formatting (constrain_radius value='32.4' →
solver TypeError); formatting now goes through a helper.

New corpus pin: generated sources contain no positional sketch-family
calls.  Full regeneration reconciles at the same precision as before
(washer 1.6e-16, wheel 4.6e-16, rarray 0.0; pulley 5/5 sketches riveted).
2026-09-09 21:19:33 +08:00
NiJingzhe e56c17dec3 refactor: single-choke-point sketch capture in SketchScript.render
Capture previously lived per emission call site (plain profiles, sweep
paths) — the taper loft sections and countersink cones built their
SketchScripts directly and silently bypassed snapshots and constraint
recovery, which is why pulley's extrude-3 carried constraints while its
two taper blocks did not.

SketchScript.render is now the one capture point: it fires the replayer
sink (block-context stamping, snapshot collection, constraint recovery)
and appends the sink's constraint lines after the entities. Every
construction site — profiles, loft/taper sections, countersink cones,
sweep paths, and pattern seeds (whose loop-expression plane header is
supported via render(header=...)) — is captured by construction; no call
site remembers anything. emit_profile_sketch reverts to pure formatting
(sink forwarded, snapshot return removed).

Pulley now reports 5/5 sketches riveted (taper sections included) and
wheel 2 sketches (pattern seed captured; the 63-point outline still
degrades to timeout). New tests pin the invariant: the pulley taper
blocks carry section constraints, and a SketchScript sink fires exactly
once per render. Real pulley trace baked as a fixture.
2026-09-09 17:35:59 +08:00
NiJingzhe 1ca73e214a feat: snapshot constraint recovery for the CadQuery FTC translator
Adds the auto-constraint discovery and extraction layer discussed for the
CadQuery pipeline, as a source-agnostic capability:

- every translation now writes <stem>.sketches.json: per-block planar
  sketch snapshots (plane frame + typed entities in local coordinates +
  closedness) — the schema-facing interface any front-end can emit.
- cqftc/constraints.py implements the recovery axioms: candidates are only
  snapshot-entailed relations (P2); admission is the production SolveSpace
  solver's DOF drop with redundancy-introducing candidates rejected — the
  DOF counter alone is fooled by rank-deficient systems (P3); a riveted set
  must also pass the perturbation basin test, a jittered rebuild converging
  back onto the snapshot (P1); measured values emit verbatim (P4); ids
  carry the inf<N>_<Kind> provenance prefix (P5).
- candidates run in an intent-typicality ladder (anchor, H/V, parallel/
  perpendicular, tangency/equal/concentric, lengths/radii, orientation,
  adjacent angles, half-grid distances) under per-tier and global solve
  budgets; sketches above 24 entities recover in a subprocess worker with a
  wall-clock escape hatch because SolveSpace's redundancy analysis can
  explode combinatorially on large freeform outlines.
- cadquery_to_ftc.py --constraints on emits the recovered sets inline
  between sketch entities and promotion; results graded riveted/partial/
  timeout in the meta sidecar; --constraints off output is byte-identical
  to before.
- fixtures: hexagon/washer/revolve-ring/slot sketches rivet with canonical
  human-shaped sets (e.g. hexagon = fix + 2H + 2 parallel + 3 equal-length
  + length + signed dx + 60 deg) and constrained builds still reconcile at
  machine precision; the 63-point wheel outline honestly degrades to
  timeout. 22 tests, ty clean.

Sign-convention traps fixed along the way: distance_x value is signed
(b - a); emitting abs() pulled a rank-complete hexagon onto a mirrored
branch (caught by the coords-reconciliation gate).
2026-09-08 23:53:38 +08:00
NiJingzhe 216a7ed625 feat: CadQuery→FTC translator toolset under tools/research (cadqueryftc)
Port the runtime-tracer half of PR #30 (feat/cadquery_converter) and rewrite
its emission layer to the current Feature Tree Convention, following the
tools/research/histjson four-stage pattern (trace / translate / validate /
profile + responsibility wall: the translator only translates).

- tracer/ (instrument, fingerprint, cq_runner, worker) ported near-verbatim:
  runs under .venv-cq (Python 3.11 + cadquery 2.8); records resolved plane
  frames, serialized args, selector strings, and geometric fingerprints of
  actually-selected faces/edges plus ground-truth volume/bbox per program.
- emission rewritten for FTC: block headers with closed role vocabulary and
  no positional slugs; transcribed planar profiles authored through the
  sketch API (local coords, pooled points, three-point arcs via
  circumcenter) annotated profile=geometry; booleans in list form over a
  histjson-shaped bodies dataflow; fillet/chamfer/shell selections
  synthesized as QL predicate bands from trace fingerprints with
  take/exactly cardinality; through-cut depths derived from the trace
  bbox; zero in-source verification; literal numbers only.
- unknown ops become untranslated notes, never silent drops; static-AST
  path and exploratory scoring/edit-bench from the PR intentionally not
  ported.
- directory named cadqueryftc so it can never shadow `import cadquery`.
- fixtures are real traces captured with cadquery 2.8; 13 tests pin format
  contracts + volume reconciliation (all four reconcile at <=2.2e-12 rel
  err) with no cadquery required in CI; full test/ suite 1516 passed.
2026-09-08 15:53:51 +08:00
NiJingzhe 54017d0f3d docs(histcad): usage guide for the histjson tool suite
Covers the five user questions in reading order: how to translate (single
case / batch / demos), what the output is (annotated FTC anatomy, tier
annotation semantics, constraint_id channel), coverage (structure 100% ops,
geometry channel 85.0%/76.7% pass, constraint channel 90.3%/93.0% solvable
on the standard 100-case samples), why things fail (four-way taxonomy:
unmapped forms / dataset-side constraint errors / build-level union
contract / known dataset artifacts), and how to find the non-translatable
entries (conflicts analyzer cross-tables + dump-uid, validate reports,
in-source notes, profiler). Numbers reproduce with the pinned
count/stride commands at the end.
2026-09-04 16:40:37 +08:00
NiJingzhe cc2946dd2e refactor(histcad): translator only translates — no preflight, no tier decisions
Per user ruling: the translator unconditionally translates what the dataset
carries (constraints included, --constraints on|off, default on). The auto
mode, in-process preflight, drift gate and sidecar conflict report are gone
from the translator — auditing now lives entirely in histcad_conflicts.py,
which renders each feature's translated prefix with the same StepEmitter
and classifies the solve itself (solved / drifted >1e-3 / conflicting /
exec_error) on top of the residual + dof + halfSpace analysis.
histcad_validate.py is build + STEP volume reconciliation only.

Generated sources are unchanged in shape (single path, constraint_id tags,
pure FTC blocks); demos regenerated with full constraint sets and still
reconcile to STEP at machine precision. Purity tests updated to pin the
sharper contract: unconditional constraint translation, pooled-coincident
elision, and that the translator module never imports the SDK.
2026-09-04 15:15:24 +08:00
NiJingzhe 48c77c2055 feat(histcad): pure training-data translation, tools under research/histjson
Generated sources carry the model only: the dual-path constraint fallback,
SKETCH_CONFLICTS/SKETCH_TIER_FALLBACKS audit globals and strict=False
inspection are gone from translated code. Tier decisions and conflict
auditing moved to translation time: auto mode solves each feature's
constrained sketch prefix in-process (preflight), emits sketch tier when it
solves AND reproduces the transcribed coordinates (max point move <= 1e-3,
the drift gate), otherwise transcribed geometry; diagnostics go to the
sidecar report (<case>.ftc.py.report.json).

Root causes found by the new histcad_conflicts.py residual analyzer and
fixed in the translator:
- point-pair H/V distances are directed: sign now taken from coordinates
  (the stored length is a magnitude) — was the top Fusion conflict source
- Tangent on arcs needs an endpoint selector: picked as the nearest shared
  junction with the other curve
- MajorRadius/MinorRadius store full axis lengths: halved to semi-axes
  (solver was stretching ellipses 2x)
- Horizontal/Vertical flat line lists map each line individually
- variadic Equal chains get per-pair constraint ids (duplicate-id crash)
- Coincident entries whose refs pooled onto the same point are elided:
  degenerate point-coincident equations made the solver Jacobian singular
  and showed exact-geometry sketches as conflicting

SDK: constrain_concentric_rsketch now accepts ellipse targets (backend
resolves the ellipse center point).

Validation (100-case samples, constraints=auto): Fusion360 72 pass,
sketch-tier retention 77.5% (conflicts: 19 diverged + 1 conflicting);
DeepCAD 83 pass, retention 85.0% (9 diverged, 0 solver-conflicting).
Demos regenerated, volumes reconcile to STEP. Purity pinned by
test/test_histcad_translation_output.py (9 tests). Full suite 1489 passed.
2026-09-04 14:28:49 +08:00
NiJingzhe c092b3d49e feat(research): constraint translation channel with per-conflict dataset auditing
The translator now emits native sketch constraints (auto mode): every
HistCAD entry maps to a constrain_* call tagged with its source identity
(constraint_id='h7_Distance'), variadic chains decompose with suffixed
ids, and value_exprs evaluate through a unit-aware expression parser
(mm/in/cm/m/ft/yd plus arithmetic and mixed-unit sums like
'61.5 in + 8ft').

Stability comes from an honest dual path per feature: entities bind to
s_geo, constraints derive s, promotion tries the constrained sketch and
falls back to the geometry prefix when the solver reports conflict. The
except branch re-inspects with strict=False and records WHICH constraint
entries failed into SKETCH_CONFLICTS — the pipeline doubles as a dataset
constraint-quality auditor (rounded coordinates vs over-determined
systems are the observed conflict source).

Sampled auto-mode results (volume still machine-exact on passes):
- DeepCAD 100: 83 pass, sketch-tier retention 92.1% (conflicts:
  Length 7, Distance 6, Diameter 2, Equal 1)
- Fusion360 100: 67 pass, retention 66.2% (Distance dominates with 49 —
  its halfSpace signed-offset dialect needs side semantics work)
Demo regenerated with 28 constraint calls, volume unchanged at 349.4558.
2026-09-04 13:09:32 +08:00
NiJingzhe 962e78edac feat(research): histcad->FTC translator and STEP reconciliation harness
histcad_to_ftc.py: one FTC feature block per HistCAD step — plane mapping
from Euler+translation (convention Rx@Ry@Rz, calibrated exactly against
packaged STEP on mixed-angle samples), coordinate-pooled sketch entities
(arc endpoints ordered so the CCW promotion sweep passes through the
HistCAD middle point, nurbs knot compression, three-point ellipses),
containment-based outer/hole nesting with island support, per-mode
booleans, and an honest multi-body policy (disjoint NewBody/Join bodies
stay separate; BODIES exported for the harness).

histcad_validate.py: strided-sample executor comparing total solid
volume against the packaged STEP ground truth (1e-3 relative tolerance).
2026-09-04 05:53:54 +08:00
NiJingzhe 77584b1e20 feat(research): histcad dataset profiler tool
Streams HistCAD sequence tarballs and aggregates the feature/entity/
constraint vocabulary, sizing FTC translation coverage gaps with counts.
Scan outputs land in gitignored tools/research/out/.
2026-09-04 04:43:44 +08:00
NiJingzhe 40dc5354a5 docs(skill): engineering drawing workflow, domain, and generated API pages
Add references/workflows/engineering-drawing.md (preliminary staged
workflow: preconditions -> declare views -> declare datums/dims -> solve
and audit -> render and visual review) and references/domains/
engineering-drawing.md (capability boundary, R1-R7 solver contract, API
groups, known engine limits, failure modes). Route the new goal in
SKILL.md.

Backfill docstrings for the dxf_engine public surface (declaration
dataclasses, SheetPlan, render_plan) so auto_docs_gen can produce their
API pages under references/docs/api/ with an Engineering Drawings index
section, following the inspect/brep sub-namespace pattern.
2026-08-31 12:59:41 +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
Jiahang Shen 26bd7e922a feat(inspect): add manufacturing feature highlights (#23)
* feat(inspect): add manufacturing feature highlights

* docs(inspect): normalize manufacturing API references
2026-08-30 12:14:58 +08:00
Ni Jingzhe c454a3af10 feat(skill): per-harness skillbuild toolchain replaces skill-pack (#18)
* feat(skill): replace skill-pack with per-harness conditional compiler

skillbuild compiles the skill tree into per-target harness builds:
- <!-- skill:if omp,!claude --> blocks include text only for matching
  targets; name-list conditions only, no else/nesting, fail-loud on
  unknown targets and unpaired/nested directives
- fence-aware: directive-looking lines inside code fences are literal
- layout is the filesystem; tree root configured in skillproj.toml
- post-build assertion: zero directive residue, SKILL.md frontmatter
  name check

Migration to the new model:
- docs/skill/ becomes the self-contained source root (SKILL.md,
  references/, generated api/stdlib/core/guides now under
  references/docs/; SDK_OVERVIEW/LICENSE/inspect are ordinary tree
  files)
- auto_docs_gen output redirected into the tree (docs/api ->
  docs/skill/references/docs/api, likewise stdlib)
- skills/simplecadapi/ is now the compiled omp target output;
  dist/generic/simplecadapi the generic target
- dropped skill-pack entry point (plus dangling evolve/make-export
  entries and their orphaned test), release workflow builds via
  skillbuild + tar; README updated

First real conditional block: harness reading paths in SKILL.md
(skill:// mount on omp vs disk-relative on generic).

Verified: 59 tests pass (skillbuild 31, auto_docs_gen 19, persistence
regression 9); both targets build; outputs residue-clean; full suite
collects (1376 tests).

* refactor(tools): auto_docs_gen moves out of the installed package

tools/ scripts are repo-checkout dev scripts, not packaged CLIs:
- auto_docs_gen.py now lives in tools/ beside the other generators;
  auto_tools/ package removed entirely
- path resolution simplifies: repo root = parent of tools/, fail-loud
  if pyproject.toml missing; site-packages/cwd fallback branches were
  dead code once the script stopped shipping in the wheel
- auto-docs-gen console script dropped from [project.scripts];
  release.yml and README invoke python tools/auto_docs_gen.py
- MANIFEST.in stale src/auto_tools include removed; CadQuery-free
  runtime scan no longer needs the auto_tools filter
- run_examples.py retired (user removal): README example-runner text
  updated to direct examples/ scripts; dangling runner-contract test
  (runpy.run_path into the deleted script) removed

Verified: 53 tests pass (auto_docs_gen + skill_build + ocp runtime
scan) and test_example_model_contract passes; regeneration from
tools/ is byte-identical (zero docs drift).

* refactor(skill): strip harness and build-tool content from the skill tree

The skill is plain harness-neutral content again:
- SKILL.md 'Reading skill files' section removed (the omp skill://
  mount block and its !omp complement were the only conditional
  blocks; the tree compiles identically for every target now)
- references/README.md: build-tool meta removed ('per-harness
  conditional compilation', skillbuild packaging/validation claims —
  link validation was never implemented, so the claim was false)
- live test now asserts the tree stays harness-neutral (zero blocks)
- skillproj.toml targets aligned with the user's output table
  (omp -> skills/simplecadapi-omp, opencode -> skills/simplecadapi-opencode;
  leftover 'generic' entry had no output and failed the build)
- compiled outputs are regenerable artifacts: skills/simplecadapi/
  untracked from git, skills/simplecadapi-*/ gitignored, release.yml
  and README build via skillbuild and tar the omp output directly
  (bsdtar has no --transform; inner dir keeps its suffixed name)

Verified: 49 tests pass; both targets build 372 files with zero
conditional blocks; no omp/conditional/directive residue in the tree
or outputs.

* chore(docs): drop stale architecture review and design notes
2026-08-22 20:20:49 +08:00
NiJingzhe 2fc3029a86 refactor: split operator facade and public connectors 2026-08-20 14:52:07 +08:00
NiJingzhe ba1e06a489 feat: expand product exporters and FEM workflow 2026-08-18 01:36:44 +08:00
NiJingzhe 9d6703a786 feat: enforce canonical product capture workflow 2026-08-15 16:17:11 +08:00
NiJingzhe bde6c50f16 Migrate examples to the model workflow 2026-07-23 03:17:35 +08:00
NiJingzhe c9760f2866 Add replayable modeling and Scene packages 2026-07-23 03:15:43 +08:00