feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph

The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-09-25 07:34:23 +03:00
1 parent 56c04408d6
commit f537aff75c
430 files changed
+9925 -8540

No files matched your search

+9 -9
View File
@@ -34,7 +34,7 @@ engine crate, and user-installable packages from a curated index.
the repos they install from). Process isolation limits the blast radius of a
buggy or malicious plugin, but it is not a security sandbox.
- Cross-toolchain binary compatibility — see [Compatibility](#compatibility--abi).
- Sandboxed scripting (Python/Lua); replacing the `acadrust` entity model.
- Sandboxed scripting (Python/Lua); replacing the `opencadcodec` entity model.
---
@@ -56,7 +56,7 @@ engine crate, and user-installable packages from a curated index.
│ pure Rust API
┌───────────────────────────────▼────────────────────────────────────┐
│ Layer C — Domain engine crate (optional) │
│ hydraulics / COGO / … — `std` only, no iced/acadrust │
│ hydraulics / COGO / … — `std` only, no iced/opencadcodec │
└────────────────────────────────────────────────────────────────────┘
```
@@ -69,7 +69,7 @@ engine crate, and user-installable packages from a curated index.
**Hard rules**
1. The host (`src/plugin/`) imports no plugin code — it only knows the contract.
2. Engine crates import neither `iced`, `acadrust`, nor `OpenCADStudio`.
2. Engine crates import neither `iced`, `opencadcodec`, nor `OpenCADStudio`.
3. A plugin never edits host source; it runs entirely from its own crate.
---
@@ -83,7 +83,7 @@ plugin compiles against. Two tiers:
ribbon vocabulary — `CadModule`, `ToolDef`, `RibbonGroup`, `RibbonItem`,
`IconKind`, `ModuleEvent`, `StyleKey`. Engine crates and tooling depend on this
cheaply.
- **`host` feature** (pulls `acadrust`): the runtime surface — the `HostApi`
- **`host` feature** (pulls `opencadcodec`): the runtime surface — the `HostApi`
trait, the `BuiltinPlugin` entry-point trait, the `export_plugin!` macro, and
the out-of-process plugin runtime (`PluginProcess`, `runner`).
@@ -94,7 +94,7 @@ A plugin enables the `host` feature.
For API v4 and later the host records two pieces of build-time metadata that
affect whether a prebuilt plugin can safely be loaded:
- `acadrust_source` — the exact git source of the `acadrust` crate the host was
- `acadrust_source` — the exact git source of the `opencadcodec` crate the host was
built against.
- `rustc_version` — the output of `rustc --version` for the compiler that built
the host.
@@ -180,9 +180,9 @@ crate-type = ["cdylib"]
[dependencies]
ocs_plugin_api = { git = "https://github.com/HakanSeven12/OpenCADStudio", features = ["host"] }
# Match the host's acadrust so the loaded library is binary-compatible.
# Match the host's opencadcodec so the loaded library is binary-compatible.
[patch.crates-io]
acadrust = { git = "https://github.com/HakanSeven12/acadrust", branch = "main" }
opencadcodec = { git = "https://github.com/HakanSeven12/opencadcodec", branch = "main" }
```
Your release build must also use the same `rustc` as the host. Record it in
@@ -243,7 +243,7 @@ command_prefixes = ["EX_"]
xdata_apps = []
# Both are filled at release-build time; see the CI step below.
rustc_version = "rustc 1.98.0 (hash date)"
acadrust_source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=<short>#<full-40-char-commit>"
acadrust_source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=<short>#<full-40-char-commit>"
```
The full, buildable scaffold is in [`docs/plugin-template/`](plugin-template);
@@ -322,7 +322,7 @@ and `acadrust_source` placeholders from the CI run's actual toolchain and
resolved dependency, rather than hand-editing them per release — see
`docs/plugin-template/.github/workflows/release.yml` for the exact `sed`
substitutions, including reading `acadrust_source` out of `Cargo.lock`'s
resolved `acadrust` package entry (`source = "git+...#<hash>"`) since that's
resolved `opencadcodec` package entry (`source = "git+...#<hash>"`) since that's
the same value the host embeds at its own build time. The template's CI pins
`rust-toolchain@stable`, which is a floating target — a real release pipeline
should pin the exact toolchain version the host was built with (check