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
@@ -286,10 +286,10 @@ mod tests {
|
||||
0
|
||||
}
|
||||
fn for_each_entity(&self, _f: &mut dyn FnMut(crate::host::ReaderEntity<'_>)) {}
|
||||
fn layer_name(&self, _handle: acadrust::Handle) -> Option<&str> {
|
||||
fn layer_name(&self, _handle: codec::Handle) -> Option<&str> {
|
||||
None
|
||||
}
|
||||
fn app_id_name(&self, _handle: acadrust::Handle) -> Option<&str> {
|
||||
fn app_id_name(&self, _handle: codec::Handle) -> Option<&str> {
|
||||
None
|
||||
}
|
||||
}
|
||||
@@ -299,34 +299,34 @@ mod tests {
|
||||
fn tab_index(&self) -> usize {
|
||||
0
|
||||
}
|
||||
fn document(&self) -> &acadrust::CadDocument {
|
||||
fn document(&self) -> &codec::CadDocument {
|
||||
panic!("not used")
|
||||
}
|
||||
fn document_mut(&mut self) -> &mut acadrust::CadDocument {
|
||||
fn document_mut(&mut self) -> &mut codec::CadDocument {
|
||||
panic!("not used")
|
||||
}
|
||||
fn document_reader(&self) -> Box<dyn crate::host::DocumentReader + '_> {
|
||||
Box::new(EmptyReader)
|
||||
}
|
||||
fn add_entity(&mut self, _entity: acadrust::EntityType) -> acadrust::Handle {
|
||||
fn add_entity(&mut self, _entity: codec::EntityType) -> codec::Handle {
|
||||
panic!("not used")
|
||||
}
|
||||
fn bump_geometry(&mut self) {}
|
||||
fn read_record(
|
||||
&self,
|
||||
_handle: acadrust::Handle,
|
||||
_handle: codec::Handle,
|
||||
_app_name: &str,
|
||||
) -> Option<&acadrust::xdata::ExtendedDataRecord> {
|
||||
) -> Option<&codec::xdata::ExtendedDataRecord> {
|
||||
None
|
||||
}
|
||||
fn write_record(
|
||||
&mut self,
|
||||
_handle: acadrust::Handle,
|
||||
_record: acadrust::xdata::ExtendedDataRecord,
|
||||
_handle: codec::Handle,
|
||||
_record: codec::xdata::ExtendedDataRecord,
|
||||
) -> bool {
|
||||
false
|
||||
}
|
||||
fn remove_record(&mut self, _handle: acadrust::Handle, _app_name: &str) -> bool {
|
||||
fn remove_record(&mut self, _handle: codec::Handle, _app_name: &str) -> bool {
|
||||
false
|
||||
}
|
||||
fn push_undo(&mut self, _label: &str) {}
|
||||
|
||||
@@ -338,7 +338,7 @@ mod tests {
|
||||
use crate::ipc::protocol::{HostResponse, PluginRequest, PluginResponse};
|
||||
use crate::ipc::transport::recv;
|
||||
use crate::ipc::v4::protocol::{HostToPluginV4, PluginToHostV4};
|
||||
use acadrust::{CadDocument, Handle};
|
||||
use codec::{CadDocument, Handle};
|
||||
use interprocess::local_socket::{
|
||||
traits::{Listener, Stream as StreamTrait},
|
||||
GenericNamespaced, ListenerOptions, ToNsName,
|
||||
@@ -386,7 +386,7 @@ mod tests {
|
||||
|
||||
struct DummyHost {
|
||||
push_info_messages: StdMutex<Vec<String>>,
|
||||
transactions: StdMutex<Vec<(String, Vec<acadrust::EntityType>)>>,
|
||||
transactions: StdMutex<Vec<(String, Vec<codec::EntityType>)>>,
|
||||
}
|
||||
impl DummyHost {
|
||||
fn new() -> Self {
|
||||
@@ -398,7 +398,7 @@ mod tests {
|
||||
fn take_push_info(&self) -> Vec<String> {
|
||||
std::mem::take(&mut *self.push_info_messages.lock().unwrap())
|
||||
}
|
||||
fn take_transactions(&self) -> Vec<(String, Vec<acadrust::EntityType>)> {
|
||||
fn take_transactions(&self) -> Vec<(String, Vec<codec::EntityType>)> {
|
||||
std::mem::take(&mut *self.transactions.lock().unwrap())
|
||||
}
|
||||
}
|
||||
@@ -415,7 +415,7 @@ mod tests {
|
||||
fn document_reader(&self) -> Box<dyn DocumentReader + '_> {
|
||||
Box::new(EmptyReader)
|
||||
}
|
||||
fn add_entity(&mut self, _entity: acadrust::EntityType) -> Handle {
|
||||
fn add_entity(&mut self, _entity: codec::EntityType) -> Handle {
|
||||
panic!("not used")
|
||||
}
|
||||
fn bump_geometry(&mut self) {}
|
||||
@@ -423,13 +423,13 @@ mod tests {
|
||||
&self,
|
||||
_handle: Handle,
|
||||
_app_name: &str,
|
||||
) -> Option<&acadrust::xdata::ExtendedDataRecord> {
|
||||
) -> Option<&codec::xdata::ExtendedDataRecord> {
|
||||
None
|
||||
}
|
||||
fn write_record(
|
||||
&mut self,
|
||||
_handle: Handle,
|
||||
_record: acadrust::xdata::ExtendedDataRecord,
|
||||
_record: codec::xdata::ExtendedDataRecord,
|
||||
) -> bool {
|
||||
false
|
||||
}
|
||||
@@ -440,7 +440,7 @@ mod tests {
|
||||
fn update_entities_transaction(
|
||||
&mut self,
|
||||
label: &str,
|
||||
entities: Vec<acadrust::EntityType>,
|
||||
entities: Vec<codec::EntityType>,
|
||||
) -> Result<(), String> {
|
||||
self.transactions.lock().unwrap().push((label.to_owned(), entities));
|
||||
Ok(())
|
||||
@@ -624,10 +624,10 @@ mod tests {
|
||||
let handler: Arc<dyn Fn(Option<u64>, PluginNotification) + Send + Sync> =
|
||||
Arc::new(|_, _| {});
|
||||
let conn = V4Connection::new(host_stream, handler).unwrap();
|
||||
let mut point = acadrust::entities::Point::new();
|
||||
let mut point = codec::entities::Point::new();
|
||||
point.common.handle = Handle::new(42);
|
||||
point.location.x = 7.0;
|
||||
let expected = acadrust::EntityType::Point(point);
|
||||
let expected = codec::EntityType::Point(point);
|
||||
let sent = expected.clone();
|
||||
|
||||
let runner = thread::spawn(move || {
|
||||
|
||||
Reference in new issue
Block a user