forked from 1b-agent/opencadstudio-upstream
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
56c04408d6
commit
f537aff75c
430 files changed
+9925
-8540
No files matched your search
@@ -29,7 +29,7 @@ use std::io;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicU32, AtomicU64, AtomicU8, AtomicUsize, Ordering};
|
||||
|
||||
use acadrust::{CadDocument, EntityType, Handle};
|
||||
use codec::{CadDocument, EntityType, Handle};
|
||||
use memmap2::{Mmap, MmapMut, MmapOptions};
|
||||
use rkyv::{check_archived_root, to_bytes, Archive, Deserialize, Serialize};
|
||||
|
||||
@@ -444,8 +444,8 @@ pub struct LayerView {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl From<&acadrust::tables::Layer> for LayerView {
|
||||
fn from(layer: &acadrust::tables::Layer) -> Self {
|
||||
impl From<&codec::tables::Layer> for LayerView {
|
||||
fn from(layer: &codec::tables::Layer) -> Self {
|
||||
Self {
|
||||
handle: layer.handle.value(),
|
||||
name: layer.name.clone(),
|
||||
@@ -460,8 +460,8 @@ pub struct AppIdView {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl From<&acadrust::tables::AppId> for AppIdView {
|
||||
fn from(app_id: &acadrust::tables::AppId) -> Self {
|
||||
impl From<&codec::tables::AppId> for AppIdView {
|
||||
fn from(app_id: &codec::tables::AppId) -> Self {
|
||||
Self {
|
||||
handle: app_id.handle.value(),
|
||||
name: app_id.name.clone(),
|
||||
@@ -539,8 +539,8 @@ impl ReaderEntityKind {
|
||||
// ── V4 full-entity document view ────────────────────────────────────────────
|
||||
|
||||
/// Serializable V4 document view. The outer structure is rkyv; each entity's
|
||||
/// `data` is a bincode-encoded `acadrust::EntityType` so that the plugin can
|
||||
/// reconstruct the full typed entity without relying on acadrust's own rkyv
|
||||
/// `data` is a bincode-encoded `codec::EntityType` so that the plugin can
|
||||
/// reconstruct the full typed entity without relying on opencadcodec's own rkyv
|
||||
/// support.
|
||||
#[derive(Archive, Serialize, Deserialize, Debug, Clone)]
|
||||
#[archive(check_bytes)]
|
||||
@@ -605,9 +605,9 @@ impl From<&EntityType> for EntityViewV4 {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::host::{DocumentReader, ReaderEntityKind};
|
||||
use acadrust::entities::Point;
|
||||
use acadrust::tables::Layer;
|
||||
use acadrust::{CadDocument, EntityType};
|
||||
use codec::entities::Point;
|
||||
use codec::tables::Layer;
|
||||
use codec::{CadDocument, EntityType};
|
||||
|
||||
fn unique_path(name: &str) -> PathBuf {
|
||||
std::env::temp_dir().join(format!(
|
||||
|
||||
Reference in new issue
Block a user