3D: Schraffur der Wand-Oberseite folgt wie im 2D der Wandachse (topAngle; Daemmung nicht mehr 90 Grad verdreht)
This commit is contained in:
1 parent
6b980d224e
commit
7db634d7d5
7 files changed
+69
-9
No files matched your search
@@ -168,7 +168,7 @@ mod tests {
|
||||
/// `wall_x` mit gesetzter Bauteil-Schraffur (Voraussetzung fuer die Kappen).
|
||||
fn wall_x_hatched(len: f32, thickness: f32, height: f32) -> WallInput {
|
||||
WallInput {
|
||||
hatch: Some(Hatch { pattern: 3, angle: 45.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 3, angle: 45.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
..wall_x(len, thickness, height)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -989,7 +989,7 @@ pub fn build_free_wall_end_caps(walls: &[WallInput]) -> Vec<f32> {
|
||||
let c = |p: Point2| -> [f32; 9] {
|
||||
[
|
||||
p[0], y, p[1], p[0], p[1],
|
||||
hatch.pattern as f32, hatch.angle.to_radians(), hatch.scale.max(0.05),
|
||||
hatch.pattern as f32, hatch.top_angle.unwrap_or(hatch.angle).to_radians(), hatch.scale.max(0.05),
|
||||
hatch.line_weight.max(0.0),
|
||||
]
|
||||
};
|
||||
|
||||
@@ -304,6 +304,7 @@ mod tests {
|
||||
angle: 90.0,
|
||||
scale: 2.0,
|
||||
line_weight: 0.5,
|
||||
top_angle: None,
|
||||
}),
|
||||
cut: None,
|
||||
};
|
||||
@@ -377,7 +378,7 @@ mod tests {
|
||||
layers: None,
|
||||
holes: vec![],
|
||||
material_index: None,
|
||||
hatch: Some(Hatch { pattern: 2, angle: 0.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 2, angle: 0.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
cut: Some(CutBandMeta {
|
||||
join_priority: Some(50),
|
||||
component_id: Some("brick".into()),
|
||||
@@ -393,7 +394,7 @@ mod tests {
|
||||
z_bottom: 2.0,
|
||||
z_top: 2.4,
|
||||
color: [0.8, 0.8, 0.8],
|
||||
hatch: Some(Hatch { pattern: 1, angle: 0.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 1, angle: 0.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
cut: Some(CutBandMeta {
|
||||
join_priority: Some(100),
|
||||
component_id: Some("concrete".into()),
|
||||
@@ -451,7 +452,7 @@ mod tests {
|
||||
layers: None,
|
||||
holes: vec![],
|
||||
material_index: None,
|
||||
hatch: Some(Hatch { pattern: 2, angle: 0.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 2, angle: 0.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
cut: Some(CutBandMeta {
|
||||
join_priority: Some(50),
|
||||
component_id: Some("brick".into()),
|
||||
@@ -467,7 +468,7 @@ mod tests {
|
||||
z_bottom: 1.0,
|
||||
z_top: 1.06,
|
||||
color: [0.8, 0.8, 0.8],
|
||||
hatch: Some(Hatch { pattern: 3, angle: 0.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 3, angle: 0.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
cut: Some(CutBandMeta {
|
||||
join_priority: Some(30),
|
||||
component_id: Some("screed".into()),
|
||||
@@ -482,7 +483,7 @@ mod tests {
|
||||
z_bottom: 0.96,
|
||||
z_top: 1.0,
|
||||
color: [0.8, 0.8, 0.8],
|
||||
hatch: Some(Hatch { pattern: 4, angle: 0.0, scale: 1.0, line_weight: 0.13 }),
|
||||
hatch: Some(Hatch { pattern: 4, angle: 0.0, scale: 1.0, line_weight: 0.13, top_angle: None }),
|
||||
cut: Some(CutBandMeta {
|
||||
join_priority: Some(20),
|
||||
component_id: Some("insulation".into()),
|
||||
|
||||
@@ -47,6 +47,11 @@ pub struct Hatch {
|
||||
/// `thin` 0.13 mm). Default 0.13 (Alt-Verhalten/Haarlinie).
|
||||
#[serde(default = "default_hatch_line_weight", rename = "lineWeight")]
|
||||
pub line_weight: f32,
|
||||
/// Musterdrehung (Grad, Modell-Winkel gegen den Uhrzeigersinn) fuer die Wand-OBERSEITE
|
||||
/// (Draufsicht, Weltkoordinaten x/z): wie im 2D-Grundriss relativ zur Wandachse. Fehlt
|
||||
/// es, gilt `angle`.
|
||||
#[serde(default, rename = "topAngle")]
|
||||
pub top_angle: Option<f32>,
|
||||
}
|
||||
|
||||
fn default_hatch_scale() -> f32 {
|
||||
|
||||
Reference in new issue
Block a user