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
@@ -6,7 +6,7 @@
|
||||
|
||||
use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};
|
||||
|
||||
use acadrust::Handle;
|
||||
use codec::Handle;
|
||||
use glam::Mat4;
|
||||
use iced::{Point, Rectangle};
|
||||
|
||||
@@ -727,7 +727,7 @@ pub fn click_hits_all<'a, W: WireSource + ?Sized>(
|
||||
type MeshPickItem<'a> = (
|
||||
Handle,
|
||||
&'a MeshModel,
|
||||
Option<acadrust::types::Transform>,
|
||||
Option<codec::types::Transform>,
|
||||
[f64; 6],
|
||||
);
|
||||
|
||||
@@ -735,7 +735,7 @@ type MeshEdgePickItem<'a> = (
|
||||
Handle,
|
||||
&'a [[f32; 3]],
|
||||
&'a [[f32; 3]],
|
||||
Option<acadrust::types::Transform>,
|
||||
Option<codec::types::Transform>,
|
||||
);
|
||||
|
||||
/// Return the closest solid whose actual B-rep feature edge passes through the
|
||||
@@ -936,7 +936,7 @@ fn mesh_click_result<'a>(
|
||||
best
|
||||
}
|
||||
|
||||
fn codec_transform_matrix(transform: acadrust::types::Transform) -> glam::DMat4 {
|
||||
fn codec_transform_matrix(transform: codec::types::Transform) -> glam::DMat4 {
|
||||
let matrix = transform.matrix.m;
|
||||
glam::DMat4::from_cols_array(&[
|
||||
matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
|
||||
@@ -1018,7 +1018,7 @@ fn mesh_vert(
|
||||
/// Project a mesh's vertices to screen space.
|
||||
fn project_mesh_verts(
|
||||
mesh: &MeshModel,
|
||||
transform: Option<acadrust::types::Transform>,
|
||||
transform: Option<codec::types::Transform>,
|
||||
view_rot: Mat4,
|
||||
eye: glam::DVec3,
|
||||
bounds: Rectangle,
|
||||
@@ -1029,7 +1029,7 @@ fn project_mesh_verts(
|
||||
.map(|(i, &w)| {
|
||||
let point = mesh_vert(w, &mesh.verts_low, i);
|
||||
let point = transform.map_or(point, |transform| {
|
||||
let point = transform.apply(acadrust::types::Vector3::new(point.x, point.y, point.z));
|
||||
let point = transform.apply(codec::types::Vector3::new(point.x, point.y, point.z));
|
||||
glam::DVec3::new(point.x, point.y, point.z)
|
||||
});
|
||||
let ndc = view_rot.project_point3((point - eye).as_vec3());
|
||||
@@ -1070,7 +1070,7 @@ pub fn mesh_box_hit<'a>(
|
||||
Item = (
|
||||
Handle,
|
||||
&'a MeshModel,
|
||||
Option<acadrust::types::Transform>,
|
||||
Option<codec::types::Transform>,
|
||||
),
|
||||
>,
|
||||
view_rot: Mat4,
|
||||
@@ -1114,7 +1114,7 @@ pub fn mesh_poly_hit<'a>(
|
||||
Item = (
|
||||
Handle,
|
||||
&'a MeshModel,
|
||||
Option<acadrust::types::Transform>,
|
||||
Option<codec::types::Transform>,
|
||||
),
|
||||
>,
|
||||
view_rot: Mat4,
|
||||
|
||||
Reference in new issue
Block a user