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 <noreply@anthropic.com>
This commit is contained in:
parent
0d42d57927
commit
959dd66e93
2 changed files with 6 additions and 6 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -71,7 +71,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "acadrust"
|
name = "acadrust"
|
||||||
version = "0.4.0"
|
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 = [
|
dependencies = [
|
||||||
"ahash 0.8.12",
|
"ahash 0.8.12",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|
@ -3410,7 +3410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d"
|
checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytecount",
|
"bytecount",
|
||||||
"memchr 2.8.2",
|
"memchr 1.0.2",
|
||||||
"nom 8.0.0",
|
"nom 8.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ pub mod patterns;
|
||||||
pub mod update_check;
|
pub mod update_check;
|
||||||
|
|
||||||
use crate::scene::DerivedCaches;
|
use crate::scene::DerivedCaches;
|
||||||
use acadrust::entities::{Dimension, EntityType};
|
use acadrust::entities::EntityType;
|
||||||
use acadrust::io::dwg::DwgReader;
|
use acadrust::io::dwg::DwgReader;
|
||||||
use acadrust::{CadDocument, DwgWriter, DxfReader, DxfWriter};
|
use acadrust::{CadDocument, DwgWriter, DxfReader, DxfWriter};
|
||||||
use std::path::{Path, PathBuf};
|
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) {
|
fn fix_dxf_dimension_rotations(doc: &mut CadDocument) {
|
||||||
for entity in doc.entities_mut() {
|
for entity in doc.entities_mut() {
|
||||||
match entity {
|
match entity {
|
||||||
EntityType::Dimension(Dimension::Linear(d)) => {
|
// Dimension angles (rotation / text / oblique) are converted
|
||||||
d.rotation = d.rotation.to_radians();
|
// degrees->radians inside the acadrust DXF reader now, so a
|
||||||
}
|
// dimension arm here would double-convert.
|
||||||
EntityType::AttributeDefinition(a) => {
|
EntityType::AttributeDefinition(a) => {
|
||||||
a.rotation = a.rotation.to_radians();
|
a.rotation = a.rotation.to_radians();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue