forked from 1b-agent/opencadstudio-upstream
FIELD: codec field fixes, six-decimal real system variables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87211f4654
commit
f830084be7
3 files changed
+5
-4
No files matched your search
Generated
+1
-1
@@ -4206,7 +4206,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadcodec"
|
||||
version = "0.5.5"
|
||||
source = "git+https://github.com/ramox81/cadcodec.git?rev=22a5c3e#22a5c3e07bf9eda6b7937e951906f8aa53fdeaf3"
|
||||
source = "git+https://github.com/ramox81/cadcodec.git?rev=595800e#595800ed4b778827c3c9e48245cade9cd8ccc05a"
|
||||
dependencies = [
|
||||
"ahash 0.8.12",
|
||||
"anyhow",
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ objc2-foundation = { version = "0.2", features = ["NSArray", "NSURL", "NSString"
|
||||
|
||||
# Field authoring API and field format codes (opencadcodec PR pending).
|
||||
[patch."https://github.com/HakanSeven12/opencadcodec.git"]
|
||||
opencadcodec = { git = "https://github.com/ramox81/cadcodec.git", rev = "22a5c3e" }
|
||||
opencadcodec = { git = "https://github.com/ramox81/cadcodec.git", rev = "595800e" }
|
||||
|
||||
[patch.crates-io]
|
||||
iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
|
||||
|
||||
@@ -101,9 +101,10 @@ pub const SYSVARS: &[&str] = &[
|
||||
"userr4", "userr5",
|
||||
];
|
||||
|
||||
/// Real system variables show six decimals, as the reference shows them
|
||||
/// (TEXTSIZE 2.500000).
|
||||
fn num(v: f64) -> String {
|
||||
let t = format!("{v:.4}");
|
||||
t.trim_end_matches('0').trim_end_matches('.').to_string()
|
||||
format!("{v:.6}")
|
||||
}
|
||||
|
||||
/// A system variable's value as a field shows it.
|
||||
|
||||
Reference in new issue
Block a user