fix(dwg): keep OCS-saved drawings readable by strict readers

Re-authored constraint-group geometry dependencies carried an empty
persistent subentity id, which crashed strict readers loading the file;
they now name the whole curve with a single-edge id.

Bump codec bc350f2 (declare classes of objects added to pre-R2004
drawings), kernel e692b97, graph 37d38eb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-12 23:24:22 +03:00
1 parent ae56fab62a
commit 390e12169a
7 files changed
+25 -15

No files matched your search

Generated
+4 -4
View File
@@ -4216,7 +4216,7 @@ dependencies = [
[[package]]
name = "opencadcodec"
version = "0.6.0"
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=3ec70a2#3ec70a2a0134f60a9f3036f1974fea86ad96e439"
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=bc350f2#bc350f266344444c8ec77bfdaee13a6216ced69c"
dependencies = [
"anyhow",
"bitflags 2.13.1",
@@ -4239,7 +4239,7 @@ dependencies = [
[[package]]
name = "opencadgraph"
version = "0.1.0"
source = "git+https://github.com/HakanSeven12/opencadgraph.git?rev=338a973#338a973202d56c1df7ddf7ce8d40d385af16d406"
source = "git+https://github.com/HakanSeven12/opencadgraph.git?rev=37d38eb#37d38eb5dfa10d2bfc9887cb6ef3945d933f0071"
dependencies = [
"opencadkernel",
"serde_json",
@@ -4248,7 +4248,7 @@ dependencies = [
[[package]]
name = "opencadkernel"
version = "0.1.0"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=e710727#e71072779377116269f822e01a2df97b8fa3420b"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=e692b97#e692b970086e23e11bc39c2b5e70e2dee7140a54"
dependencies = [
"cavalier_contours",
"opencadcodec",
@@ -4259,7 +4259,7 @@ dependencies = [
[[package]]
name = "opencadkernel-constraints"
version = "0.1.0"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=e710727#e71072779377116269f822e01a2df97b8fa3420b"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=e692b97#e692b970086e23e11bc39c2b5e70e2dee7140a54"
dependencies = [
"nalgebra",
]
+4 -4
View File
@@ -35,10 +35,10 @@ rfd = "0.17"
clap = { version = "4", features = ["derive", "string"] }
env_logger = "0.11"
log = "0.4"
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "3ec70a2", features = ["serde"] }
kernel = { package = "opencadkernel", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "e710727", features = ["acis", "offset"] }
kernel-constraints = { package = "opencadkernel-constraints", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "e710727" }
graph = { package = "opencadgraph", git = "https://github.com/HakanSeven12/opencadgraph.git", rev = "338a973" }
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "bc350f2", features = ["serde"] }
kernel = { package = "opencadkernel", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "e692b97", features = ["acis", "offset"] }
kernel-constraints = { package = "opencadkernel-constraints", git = "https://github.com/HakanSeven12/opencadkernel.git", rev = "e692b97" }
graph = { package = "opencadgraph", git = "https://github.com/HakanSeven12/opencadgraph.git", rev = "37d38eb" }
dwg-thumbnailer = { path = "crates/dwg-thumbnailer" }
# Shared SAVE serialization dispatch + web-worker wire format: one
# implementation for the inline (fallback/native) path and the worker path.
+2 -2
View File
@@ -15,7 +15,7 @@ serde_json = { version = "1", optional = true }
# Pulled in only by the `host` feature, which adds the `opencadcodec`-typed
# `HostApi` runtime surface. The default crate stays dependency-free so engine
# crates and external tooling can depend on the manifest/ribbon contract cheaply.
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "3ec70a2", optional = true, features = ["serde"] }
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "bc350f2", optional = true, features = ["serde"] }
# Runtime IPC and serialization (host feature only).
interprocess = { version = "2", optional = true }
@@ -39,7 +39,7 @@ serde_json = "1"
serde = { version = "1", features = ["derive"] }
cargo-lock = "11"
# opencadcodec is scanned at build time to generate the embedded type registry.
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "3ec70a2", features = ["serde"] }
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "bc350f2", features = ["serde"] }
[dev-dependencies]
serde_json = "1"
+1 -1
View File
@@ -10,6 +10,6 @@ publish = false
# exactly one implementation. No UI/app dependencies — only the codec + serde.
[dependencies]
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "3ec70a2", features = ["serde"] }
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "bc350f2", features = ["serde"] }
bincode = "1.3"
serde = { version = "1", features = ["derive"] }
+1 -1
View File
@@ -8,7 +8,7 @@ publish = false
crate-type = ["cdylib"]
[dependencies]
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "3ec70a2", features = ["serde"] }
codec = { package = "opencadcodec", git = "https://github.com/HakanSeven12/opencadcodec.git", rev = "bc350f2", features = ["serde"] }
bincode = "1.3"
serde = { version = "1", features = ["derive"] }
console_error_panic_hook = "0.1"
+1 -1
View File
@@ -1264,7 +1264,7 @@ dependencies = [
[[package]]
name = "opencadcodec"
version = "0.6.0"
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=3ec70a2#3ec70a2a0134f60a9f3036f1974fea86ad96e439"
source = "git+https://github.com/HakanSeven12/opencadcodec.git?rev=bc350f2#bc350f266344444c8ec77bfdaee13a6216ced69c"
dependencies = [
"anyhow",
"bitflags",
+12 -2
View File
@@ -1200,8 +1200,18 @@ impl Allocator<'_> {
},
class_version: 0,
enabled: true,
// Point and curve addressing lives on constraint-node data.
persistent_subent: AssocPersistentSubentId::default(),
// Point and curve addressing lives on constraint-node data;
// the dependency names the whole curve, as single-edge
// subentities do in authored constraint groups. An empty id
// (no class) crashes strict readers loading the drawing.
// ponytail: polyline segments get the single-edge id too;
// authored files address them with an index subentity (class
// code 3) whose fields are not decoded yet.
persistent_subent: AssocPersistentSubentId {
class_name: "AcDbAssocSingleEdgePersSubentId".to_string(),
class_code: 1,
..Default::default()
},
}),
)
}