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
@@ -8,8 +8,8 @@
|
||||
// text-bearing entity, plus the field read/write helpers both editors use to
|
||||
// commit back to the correct entity slot.
|
||||
|
||||
use acadrust::types::Vector3;
|
||||
use acadrust::{EntityType, Handle, Text};
|
||||
use codec::types::Vector3;
|
||||
use codec::{EntityType, Handle, Text};
|
||||
use glam::DVec3;
|
||||
|
||||
/// Which text slot of which entity an editor session reads from and writes to.
|
||||
@@ -101,10 +101,10 @@ pub struct TextInlineState {
|
||||
/// Canvas-space anchor where the field is drawn (the insertion-point click).
|
||||
pub screen_anchor: iced::Point,
|
||||
}
|
||||
pub(super) fn can_edit_text(mut handle: Handle, document: &acadrust::CadDocument) -> bool {
|
||||
pub(super) fn can_edit_text(mut handle: Handle, document: &codec::CadDocument) -> bool {
|
||||
for _ in 0..8 {
|
||||
match document.get_entity(handle) {
|
||||
Some(acadrust::EntityType::Leader(l)) => {
|
||||
Some(codec::EntityType::Leader(l)) => {
|
||||
let ann = l.annotation_handle;
|
||||
if ann.is_null() || ann == handle {
|
||||
return false;
|
||||
@@ -298,7 +298,7 @@ impl super::OpenCADStudio {
|
||||
if variable_height
|
||||
&& !matches!(
|
||||
t.horizontal_alignment,
|
||||
acadrust::entities::TextHorizontalAlignment::Aligned
|
||||
codec::entities::TextHorizontalAlignment::Aligned
|
||||
)
|
||||
{
|
||||
self.tabs[i].scene.document.header.text_height = t.height;
|
||||
|
||||
Reference in new issue
Block a user