[K4] Aufräumen: tote TS-Funktionen und Bindungen gelöscht, Höhenregeln/JS-Helfer im Kern zusammengelegt
Gelöscht: vertikale Ausdehnungen in model/wall.ts und geometry/opening.ts (ohne Aufrufer seit dem Schnitt-Port), weitere ungenutzte Exporte (types.ts, ceiling.ts, glPlan, toWalls3d, truckSolid, meshImport, bulge, planView) und die Bindungen doc_query, core_version, drawing3d_*, bulge_between_angles, scatter_strokes_flat. Rust: model/helpers.rs::heights für typisierte Sicht und rohe Wurzel, truthy/or_zero/js_string/arr je einmal.
This commit is contained in:
38 files changed
+125
-505
No files matched your search
@@ -11,16 +11,7 @@ use std::collections::HashSet;
|
||||
|
||||
type Tree = Vec<Value>;
|
||||
|
||||
/// JS-Wahrheitswert eines JSON-Werts (`if (c.visible)`).
|
||||
fn truthy(v: Option<&Value>) -> bool {
|
||||
match v {
|
||||
None | Some(Value::Null) => false,
|
||||
Some(Value::Bool(b)) => *b,
|
||||
Some(Value::Number(n)) => n.as_f64().is_some_and(|f| f != 0.0 && !f.is_nan()),
|
||||
Some(Value::String(s)) => !s.is_empty(),
|
||||
Some(_) => true,
|
||||
}
|
||||
}
|
||||
use crate::grips::truthy;
|
||||
|
||||
fn code_of(c: &Value) -> Option<&str> {
|
||||
c.get("code").and_then(Value::as_str)
|
||||
|
||||
Reference in new issue
Block a user