forked from 1b-agent/opencadstudio-upstream
Add the typed document facade and plugin IPC adapter. Prepare bulk edits before mutation, preserve undo and dirty state, keep profile elevations, validate numeric inputs and session bindings, and generate Python constructors with typed results. Reuse existing entity transforms and profile conversion. Compute mass properties and closed-surface bounds in cadkernel; pin its main revision 6a5e6fc2822f6af6b2611cd605b44437b35158f0. Keep plugin API metadata at version 6. Validation: 646 native application tests, 597 kernel tests, 12 document API tests, 91 plugin API tests, 3 Python tests, default/IPC feature builds and wasm32 check passed.
65 lines
1.8 KiB
TOML
65 lines
1.8 KiB
TOML
[package]
|
|
name = "ocs_doc_api"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Object-oriented, transport-agnostic CAD entity API for OpenCADStudio plugins and hosts (v2)."
|
|
license = "MIT"
|
|
build = "build.rs"
|
|
|
|
# Dependency wiring: pin the SAME cadkernel/acadrust git revs
|
|
# as the host so `Body`/`EntityType` types are ABI-identical.
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
bincode = "1.3"
|
|
thiserror = "1"
|
|
|
|
# Host adapters convert ObjectId to acadrust handles; kernel handles stay local.
|
|
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "5b56571a190e7a17c8f12d36390d2938b0fb72f7", features = ["serde"], optional = true }
|
|
cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "6a5e6fc2822f6af6b2611cd605b44437b35158f0", features = ["acis", "offset"], optional = true }
|
|
ocs_plugin_api = { path = "../ocs_plugin_api", optional = true, features = ["host"] }
|
|
|
|
[build-dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "1"
|
|
|
|
[dev-dependencies]
|
|
serde_json = "1"
|
|
toml = "1"
|
|
|
|
[features]
|
|
# Default keeps the facade and DTOs independent of geometry dependencies.
|
|
default = []
|
|
# host: pull acadrust + cadkernel + the executor/backend trait (in-process side).
|
|
host = ["acadrust", "cadkernel"]
|
|
# ipc: pull ocs_plugin_api for the IPC transport adapter (plugin side).
|
|
ipc = ["acadrust", "ocs_plugin_api"]
|
|
|
|
[lib]
|
|
name = "ocs_doc_api"
|
|
path = "src/lib.rs"
|
|
|
|
[[test]]
|
|
name = "mock_backend"
|
|
required-features = ["host"]
|
|
|
|
[[example]]
|
|
name = "e1_primitives_and_queries"
|
|
required-features = ["host"]
|
|
|
|
[[example]]
|
|
name = "e2_intersect_two_solids"
|
|
required-features = ["host"]
|
|
|
|
[[example]]
|
|
name = "e3_transform_and_chain"
|
|
required-features = ["host"]
|
|
|
|
[[example]]
|
|
name = "e4_2d_entities_and_bulk"
|
|
required-features = ["host"]
|
|
|
|
[[example]]
|
|
name = "e5_failure_and_guards"
|
|
required-features = ["host"]
|