From 5ba72ec3e4c8a3928f74c597899579895ba64745 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 18 Sep 2026 22:16:06 +0300 Subject: [PATCH] chore: pick up cadcodec #47 and cadkernel #66; guard the re-align length - acadrust 7ea4247: clamped-knot degree and MINSERT reservation fixes (cadcodec #47). cadkernel a0b962a: dogleg fails on a non-finite Jacobian (cadkernel #66) and pins the same codec rev, so one acadrust stays in the graph. - The axis re-alignment from #1361 retains its transformed length through retain_segment_length, which holds a zero-length segment with per-axis differences instead of a P2PDistance whose gradient is NaN there. Co-Authored-By: Claude Fable 5.1 --- Cargo.lock | 6 +++--- Cargo.toml | 6 +++--- crates/ocs_plugin_api/Cargo.toml | 4 ++-- crates/ocs_web_worker/Cargo.toml | 2 +- src/scene/parametric_solve.rs | 3 +-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9d55c24f..2a087f73a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,7 +86,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" [[package]] name = "acadrust" version = "0.5.5" -source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=8a28c21#8a28c21537d5e5ab06a431b1741d0c2d2b098b15" +source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=7ea4247#7ea4247134af60c8c1617426849d4fa8233660c8" dependencies = [ "ahash 0.8.12", "anyhow", @@ -922,7 +922,7 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cadkernel" version = "0.1.0" -source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=0493b59#0493b59a06980e3b5b07bf3c73df0725a2e56c86" +source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=a0b962a#a0b962ae8045e7221ecb5d478adc5ad58e2706ba" dependencies = [ "acadrust", "cavalier_contours", @@ -933,7 +933,7 @@ dependencies = [ [[package]] name = "cadkernel-constraints" version = "0.1.0" -source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=0493b59#0493b59a06980e3b5b07bf3c73df0725a2e56c86" +source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=a0b962a#a0b962ae8045e7221ecb5d478adc5ad58e2706ba" dependencies = [ "nalgebra", ] diff --git a/Cargo.toml b/Cargo.toml index 40af11344..05791c276 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,9 +33,9 @@ rfd = "0.17" clap = { version = "4", features = ["derive", "string"] } env_logger = "0.11" log = "0.4" -acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "8a28c21", features = ["serde"] } -cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "0493b59", features = ["acis", "offset"] } -cadkernel-constraints = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "0493b59" } +acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "7ea4247", features = ["serde"] } +cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "a0b962a", features = ["acis", "offset"] } +cadkernel-constraints = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "a0b962a" } dwg-thumbnailer = { path = "crates/dwg-thumbnailer" } flate2 = "1" image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] } diff --git a/crates/ocs_plugin_api/Cargo.toml b/crates/ocs_plugin_api/Cargo.toml index ba169d97c..d1ef124df 100644 --- a/crates/ocs_plugin_api/Cargo.toml +++ b/crates/ocs_plugin_api/Cargo.toml @@ -14,7 +14,7 @@ serde = { version = "1", features = ["derive"] } # Pulled in only by the `host` feature, which adds the `acadrust`-typed # `HostApi` runtime surface. The default crate stays dependency-free so engine # crates and external tooling can depend on the manifest/ribbon contract cheaply. -acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "8a28c21", optional = true, features = ["serde"] } +acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "7ea4247", optional = true, features = ["serde"] } # Runtime IPC and serialization (host feature only). interprocess = { version = "2", optional = true } @@ -38,7 +38,7 @@ serde_json = "1" serde = { version = "1", features = ["derive"] } cargo-lock = "11" # acadrust is scanned at build time to generate the embedded type registry. -acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "8a28c21", features = ["serde"] } +acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "7ea4247", features = ["serde"] } [dev-dependencies] serde_json = "1" diff --git a/crates/ocs_web_worker/Cargo.toml b/crates/ocs_web_worker/Cargo.toml index f314455a4..8b28027d5 100644 --- a/crates/ocs_web_worker/Cargo.toml +++ b/crates/ocs_web_worker/Cargo.toml @@ -8,7 +8,7 @@ publish = false crate-type = ["cdylib"] [dependencies] -acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "8a28c21", features = ["serde"] } +acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "7ea4247", features = ["serde"] } bincode = "1.3" serde = { version = "1", features = ["derive"] } console_error_panic_hook = "0.1" diff --git a/src/scene/parametric_solve.rs b/src/scene/parametric_solve.rs index fa0095096..cfa36a225 100644 --- a/src/scene/parametric_solve.rs +++ b/src/scene/parametric_solve.rs @@ -2463,8 +2463,7 @@ fn solve_scope( let dy = store.get(line.p2.y) - store.get(line.p1.y); (dx * dx + dy * dy).sqrt() }; - let target = sys.add_param(length, true); - sys.add_constraint(Rc::new(P2PDistance::new(line.p1, line.p2, target))); + retain_segment_length(&mut sys, line.p1, line.p2, length, length); } } let temporary = ParametricConstraint {