[K3a] Kontext-Mesh, Schnittfuehrung und Linienenden im Grundriss in Rust (plan_misc.rs)
This commit is contained in:
1 parent
c134d32fcc
commit
125422afec
8 files changed
+408
-245
No files matched your search
@@ -28,6 +28,7 @@ mod gpu_compile;
|
||||
mod plan_stairs;
|
||||
mod plan_walls;
|
||||
mod plan_openings;
|
||||
mod plan_misc;
|
||||
mod hatch;
|
||||
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//! Bindungen kleiner Plan-Bausteine (`crate::plan_misc`). Layouts s. dort.
|
||||
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
|
||||
/// Grundriss-Fussabdruck eines Meshes (Sockelkanten); Unsinn → leer.
|
||||
#[wasm_bindgen]
|
||||
pub fn context_footprint_flat(positions: &[f64], indices: &[f64]) -> Vec<f64> {
|
||||
crate::plan_misc::context_footprint(positions, indices)
|
||||
}
|
||||
|
||||
/// `[minX, minY, maxX, maxY]` der x/y-Werte eines [x,y,z…]-Arrays; leer ohne Punkte.
|
||||
#[wasm_bindgen]
|
||||
pub fn context_bbox_flat(positions: &[f64]) -> Vec<f64> {
|
||||
crate::plan_misc::bbox(positions)
|
||||
}
|
||||
|
||||
/// Schnittführungs-Symbol einer Linie; leer bei zu kurzer Linie.
|
||||
#[wasm_bindgen]
|
||||
pub fn section_line_flat(p0x: f64, p0y: f64, p1x: f64, p1y: f64, sign: f64) -> Vec<f64> {
|
||||
crate::plan_misc::section_line(p0x, p0y, p1x, p1y, sign)
|
||||
}
|
||||
|
||||
/// Linienende (Pfeil, Punkt, Schrägstrich, Quadrat); leer ohne Wirkung.
|
||||
#[wasm_bindgen]
|
||||
pub fn end_mark_flat(x: f64, y: f64, dx: f64, dy: f64, art: f64, mm: f64, scale_denominator: f64) -> Vec<f64> {
|
||||
crate::plan_misc::end_mark(x, y, dx, dy, art, mm, scale_denominator)
|
||||
}
|
||||
Reference in new issue
Block a user