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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-09-25 07:34:23 +03:00
1 parent 56c04408d6
commit f537aff75c
430 files changed
+9925 -8540

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
use acadrust::{EntityType, Handle};
use codec::{EntityType, Handle};
use glam::DVec3;
use crate::command::{CadCommand, CmdResult, SelectionEntity};
+5 -5
View File
@@ -1,7 +1,7 @@
use acadrust::entities::Solid3D;
use acadrust::objects::SolidHistoryOperation;
use acadrust::EntityType;
use cadkernel::brep::Body;
use codec::entities::Solid3D;
use codec::objects::SolidHistoryOperation;
use codec::EntityType;
use kernel::brep::Body;
use glam::DVec3;
use crate::command::{
@@ -134,7 +134,7 @@ impl CylinderCommand {
let plane = WorkingPlane::new(a, first_axis, second_axis);
let local_b = plane.to_local(b);
let local_c = plane.to_local(c);
let circle = cadkernel::geom2d::arc_through_points(
let circle = kernel::geom2d::arc_through_points(
[0.0, 0.0],
[local_b.x, local_b.y],
[local_c.x, local_c.y],
+5 -5
View File
@@ -1,7 +1,7 @@
use std::sync::atomic::{AtomicU64, Ordering};
use acadrust::Handle;
use cadkernel::brep::{Body, EdgeKey, FaceKey};
use codec::Handle;
use kernel::brep::{Body, EdgeKey, FaceKey};
use glam::DVec3;
use crate::command::{
@@ -200,8 +200,8 @@ impl SolidEdgeCommand {
}
let (handle, body) = self.active_body()?;
let result = match self.operation {
EdgeOperation::Fillet => cadkernel::brep::fillet_edges(body, &edges, value).ok()?,
EdgeOperation::Chamfer => cadkernel::brep::chamfer_edges(
EdgeOperation::Fillet => kernel::brep::fillet_edges(body, &edges, value).ok()?,
EdgeOperation::Chamfer => kernel::brep::chamfer_edges(
body,
&edges,
self.base_face.or_else(|| self.current_loop_face())?,
@@ -864,7 +864,7 @@ fn edge_chain(body: &Body, seed: EdgeKey) -> Vec<EdgeKey> {
fn edge_tangent_from_vertex(
body: &Body,
edge_key: EdgeKey,
vertex: cadkernel::brep::VertexKey,
vertex: kernel::brep::VertexKey,
) -> Option<DVec3> {
let edge = body.edges.get(edge_key)?;
let curve = body.curves.get(edge.curve)?;
+3 -3
View File
@@ -1,8 +1,8 @@
use std::sync::{Mutex, OnceLock};
use acadrust::entities::{LwPolyline, LwVertex, Solid3D};
use acadrust::types::Vector2;
use acadrust::{EntityType, Handle};
use codec::entities::{LwPolyline, LwVertex, Solid3D};
use codec::types::Vector2;
use codec::{EntityType, Handle};
use glam::{DVec2, DVec3};
use crate::command::{CadCommand, CmdOption, CmdResult, WorkingPlane};
+7 -7
View File
@@ -1,10 +1,10 @@
// Interactive kernel primitives stored as ACIS Solid3D entities.
use acadrust::entities::Solid3D;
use acadrust::objects::SolidHistoryOperation;
use acadrust::EntityType;
use cadkernel::brep::Body;
use cadkernel::geom2d::{
use codec::entities::Solid3D;
use codec::objects::SolidHistoryOperation;
use codec::EntityType;
use kernel::brep::Body;
use kernel::geom2d::{
fillets_between, Circle as KernelCircle, Curve as KernelCurve, Line as KernelLine,
Tolerance,
};
@@ -318,7 +318,7 @@ fn sphere_through_three_points(
second: DVec3,
third: DVec3,
) -> Option<(DVec3, f64)> {
let circle = cadkernel::geom2d::arc_through_points(
let circle = kernel::geom2d::arc_through_points(
[first.x, first.y],
[second.x, second.y],
[third.x, third.y],
@@ -640,7 +640,7 @@ impl PrimitiveCommand {
let plane = WorkingPlane::new(a, first_axis, second_axis);
let local_b = plane.to_local(b);
let local_c = plane.to_local(c);
let circle = cadkernel::geom2d::arc_through_points(
let circle = kernel::geom2d::arc_through_points(
[0.0, 0.0],
[local_b.x, local_b.y],
[local_c.x, local_c.y],
+3 -3
View File
@@ -1,6 +1,6 @@
use acadrust::entities::{EntityCommon, ExtendedEntity, ExtendedEntityData, SectionObjectData};
use acadrust::types::{Color, Handle, Vector3};
use acadrust::EntityType;
use codec::entities::{EntityCommon, ExtendedEntity, ExtendedEntityData, SectionObjectData};
use codec::types::{Color, Handle, Vector3};
use codec::EntityType;
use glam::DVec3;
use crate::command::{CadCommand, CmdOption, CmdResult, WorkingPlane};
+1 -1
View File
@@ -1,4 +1,4 @@
use acadrust::Handle;
use codec::Handle;
use glam::DVec3;
use crate::command::{CadCommand, CmdOption, CmdResult, InputKind, ShellFaceAction};
+7 -7
View File
@@ -1,5 +1,5 @@
use acadrust::{EntityType, Handle};
use cadkernel::space::Plane;
use codec::{EntityType, Handle};
use kernel::space::Plane;
use glam::DVec3;
use crate::command::{CadCommand, CmdOption, CmdResult, SelectionEntity, WorkingPlane};
@@ -38,7 +38,7 @@ pub struct SliceCommand {
preview_center: DVec3,
preview_radius: f64,
picked: Option<EntityType>,
surface_tool: Option<cadkernel::brep::Body>,
surface_tool: Option<kernel::brep::Body>,
notice: Option<&'static str>,
}
@@ -448,14 +448,14 @@ impl CadCommand for SliceCommand {
}
}
fn planar_body_plane(body: &cadkernel::brep::Body) -> Option<Plane> {
fn planar_body_plane(body: &kernel::brep::Body) -> Option<Plane> {
let mut faces = body.face_keys();
let first = cadkernel::brep::planar_face_profile(body, faces.next()?)?.plane;
let first = kernel::brep::planar_face_profile(body, faces.next()?)?.plane;
let normal = DVec3::from_array(first.normal()?);
let tolerance = cadkernel::brep::operation_tolerance(&[body]);
let tolerance = kernel::brep::operation_tolerance(&[body]);
faces
.all(|face| {
let Some(profile) = cadkernel::brep::planar_face_profile(body, face) else {
let Some(profile) = kernel::brep::planar_face_profile(body, face) else {
return false;
};
profile.plane.normal().is_some_and(|other| {