fix(dimension): land DXF round-trip fixes (re-pin acadrust)

Re-pins acadrust to the dimension DXF round-trip fixes (rotation/text/oblique
degree<->radian units, radial/angular/ordinate group codes, ordinate X/Y bit)
and drops the OCS-side fix_dxf_dimension_rotations dimension arm, which now
lives in the acadrust DXF reader (keeping it here would double-convert).

Completes the dimension audit (Batch 5). Refs #181.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-27 18:15:14 +03:00
1 parent 0d42d57927
commit 959dd66e93
2 files changed
+6 -6

No files matched your search

Generated
+2 -2
View File
@@ -71,7 +71,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
[[package]]
name = "acadrust"
version = "0.4.0"
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#7c0c12fe2801cf6c8e5a93ea3d7527afc62f3513"
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#ad507470661689a85a999166daf7f22ee507e63c"
dependencies = [
"ahash 0.8.12",
"anyhow",
@@ -3410,7 +3410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d"
dependencies = [
"bytecount",
"memchr 2.8.2",
"memchr 1.0.2",
"nom 8.0.0",
]
+4 -4
View File
@@ -16,7 +16,7 @@ pub mod patterns;
pub mod update_check;
use crate::scene::DerivedCaches;
use acadrust::entities::{Dimension, EntityType};
use acadrust::entities::EntityType;
use acadrust::io::dwg::DwgReader;
use acadrust::{CadDocument, DwgWriter, DxfReader, DxfWriter};
use std::path::{Path, PathBuf};
@@ -856,9 +856,9 @@ fn fix_viewport_status_flags(doc: &mut CadDocument) {
fn fix_dxf_dimension_rotations(doc: &mut CadDocument) {
for entity in doc.entities_mut() {
match entity {
EntityType::Dimension(Dimension::Linear(d)) => {
d.rotation = d.rotation.to_radians();
}
// Dimension angles (rotation / text / oblique) are converted
// degrees->radians inside the acadrust DXF reader now, so a
// dimension arm here would double-convert.
EntityType::AttributeDefinition(a) => {
a.rotation = a.rotation.to_radians();
}