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
@@ -58,9 +58,9 @@ impl OpenCADStudio {
|
||||
// This application record is the hatch background colour.
|
||||
// Keep the outer Option to distinguish "source is not a
|
||||
// hatch" from "source hatch has no background".
|
||||
let hatch_background_xdata: Option<Option<Vec<acadrust::xdata::XDataValue>>> =
|
||||
let hatch_background_xdata: Option<Option<Vec<codec::xdata::XDataValue>>> =
|
||||
match src_clone.as_ref() {
|
||||
Some(acadrust::EntityType::Hatch(h)) => Some(
|
||||
Some(codec::EntityType::Hatch(h)) => Some(
|
||||
h.common
|
||||
.extended_data
|
||||
.get_record("HATCHBACKGROUNDCOLOR")
|
||||
@@ -71,12 +71,12 @@ impl OpenCADStudio {
|
||||
// Dimension-style overrides ride the ACAD record, identified
|
||||
// by a leading DSTYLE string. Matching replicates that payload
|
||||
// (or clears the destination when the source has none).
|
||||
let dstyle_xdata: Option<Vec<(i16, acadrust::xdata::XDataValue)>> = src_clone
|
||||
let dstyle_xdata: Option<Vec<(i16, codec::xdata::XDataValue)>> = src_clone
|
||||
.as_ref()
|
||||
.filter(|e| {
|
||||
matches!(
|
||||
e,
|
||||
acadrust::EntityType::Dimension(_) | acadrust::EntityType::Leader(_)
|
||||
codec::EntityType::Dimension(_) | codec::EntityType::Leader(_)
|
||||
)
|
||||
})
|
||||
.map(|e| crate::entities::dim_override::pairs(&e.common().extended_data));
|
||||
@@ -93,8 +93,8 @@ impl OpenCADStudio {
|
||||
let mut is_hatch = false;
|
||||
if let Some(se) = &src_clone {
|
||||
if let Some(e) = app.tabs[i].scene.document.get_entity_mut(handle) {
|
||||
is_dim = matches!(e, acadrust::EntityType::Dimension(_));
|
||||
is_hatch = matches!(e, acadrust::EntityType::Hatch(_));
|
||||
is_dim = matches!(e, codec::EntityType::Dimension(_));
|
||||
is_hatch = matches!(e, codec::EntityType::Hatch(_));
|
||||
crate::entities::match_props::match_properties_kernel(se, e, &match_opts);
|
||||
}
|
||||
}
|
||||
@@ -117,11 +117,11 @@ impl OpenCADStudio {
|
||||
if match_opts.copy_dim_overrides
|
||||
&& matches!(
|
||||
app.tabs[i].scene.document.get_entity(handle),
|
||||
Some(acadrust::EntityType::Dimension(_) | acadrust::EntityType::Leader(_))
|
||||
Some(codec::EntityType::Dimension(_) | codec::EntityType::Leader(_))
|
||||
)
|
||||
&& matches!(
|
||||
src_clone,
|
||||
Some(acadrust::EntityType::Dimension(_) | acadrust::EntityType::Leader(_))
|
||||
Some(codec::EntityType::Dimension(_) | codec::EntityType::Leader(_))
|
||||
)
|
||||
{
|
||||
crate::entities::dim_override::replace(
|
||||
|
||||
Reference in new issue
Block a user