[140] Tusche-Standard: Kategorien, Kontext, Baurecht, Schatten, Achsen, Glas grau/schwarz; Bildschirm: Strichbreite unter 1 px als Deckung (Rangfolge bleibt sichtbar)
This commit is contained in:
13 files changed
+55
-43
No files matched your search
@@ -532,7 +532,7 @@ fn room_ops(p: &Project, v: &Value, ctx: &Ctx, ids: &mut IdGen) -> Vec<Op> {
|
||||
("siaCategory", s("HNF")),
|
||||
("name", s(&name)),
|
||||
("boundary", pvs(&boundary)),
|
||||
("color", category_color(p, code, "#5a7a9a")),
|
||||
("color", category_color(p, code, "#4a4a4a")),
|
||||
("stampAnchor", pt(e.centroid[0], e.centroid[1])),
|
||||
("stampDoc", doc),
|
||||
])],
|
||||
|
||||
@@ -127,7 +127,8 @@ pub fn plan_context(c: &Ctx, out: &mut Vec<Primitive>) {
|
||||
out.append(&mut late);
|
||||
}
|
||||
|
||||
const TERRAIN_INK: &str = "#7a5b3a";
|
||||
/// [140] Gelände/Höhenlinien grau statt braun.
|
||||
const TERRAIN_INK: &str = "#6e6e6e";
|
||||
/// [140] Kleinster Papierabstand (mm) zwischen Höhenlinien; enger werden Zwischenlinien ausgelassen.
|
||||
const CONTOUR_MIN_GAP_MM: f64 = 0.6;
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ use crate::plan::wall_poche::{ceiling_outline_lines, wall_footprint, WallFootpri
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
/// Footprint-Farbe der Extrusionen (wie das 3D-Orange).
|
||||
const EXTRUSION_STROKE: &str = "#d98c40";
|
||||
/// [140] Tusche statt Orange.
|
||||
const EXTRUSION_STROKE: &str = "#3a3f47";
|
||||
/// Rückfall-Füllung einer Stütze ohne auflösbares Bauteil.
|
||||
const COLUMN_FALLBACK_FILL: &str = "#3a3f47";
|
||||
/// Alpha-Suffix der (unsichtbaren) Raumfüllung.
|
||||
|
||||
@@ -22,14 +22,15 @@ const SILHOUETTE_MM: f64 = 0.18;
|
||||
const SILHOUETTE_TOL: f64 = 2e-3;
|
||||
const FRAME_MM: f64 = 0.13;
|
||||
const GLASS_FILL_MONO: &str = "#c4c8cd";
|
||||
const GLASS_FILL_COLOR: &str = "#9fc2d9";
|
||||
/// [140] Glas hellgrau statt blau (Farbe nur, wo der Nutzer sie setzt).
|
||||
const GLASS_FILL_COLOR: &str = "#d3d8dd";
|
||||
const SHADOW_FILL: &str = "#8f959e";
|
||||
const OPENING_SHADOW_FILL: &str = "#a7adb5";
|
||||
const GROUND_INK: &str = "#1f242c";
|
||||
const GROUND_MM: f64 = 0.25;
|
||||
const FRAME_FILL_COLOR: &str = "#d9d9d4";
|
||||
const FRAME_FILL_COLOR: &str = "#dcdcdc";
|
||||
const SILL_FILL_COLOR: &str = "#cccccb";
|
||||
const DOOR_LEAF_FILL_COLOR: &str = "#ede6d9";
|
||||
const DOOR_LEAF_FILL_COLOR: &str = "#ececec";
|
||||
const SYMBOL_INK: &str = "#7d858f";
|
||||
const ROOF_RGB_FALLBACK: [f64; 3] = [0.72, 0.45, 0.36];
|
||||
const EPS: f64 = 1e-6;
|
||||
|
||||
@@ -19,7 +19,8 @@ pub const SITE_PICK_RULES: &str = "@siteRules";
|
||||
pub const SITE_PICK_VIEW_SHADOWS: &str = "@viewShadows";
|
||||
|
||||
/// Füllfarbe der Schattenflächen.
|
||||
pub const SUN_SHADOW_FILL: &str = "#3a4a66";
|
||||
/// [140] Schatten grau (Tusche-Darstellung), nicht blau.
|
||||
pub const SUN_SHADOW_FILL: &str = "#3c3c3c";
|
||||
/// [140] Schatten heller (0.28 → 0.16): Bemassung und Stempel darüber bleiben lesbar.
|
||||
const SUN_SHADOW_OPACITY: f64 = 0.16;
|
||||
/// Linien-Klassen und Füllfarbe des Baurechts.
|
||||
@@ -29,8 +30,9 @@ pub const SITE_VIOLATION_FILL: &str = "#d0342c";
|
||||
const SITE_VIOLATION_OPACITY: f64 = 0.45;
|
||||
/// Profilverstösse ([63]): gleiches Rot, schwächer gefüllt (Bauteil ragt über das Gebäudeprofil).
|
||||
const SITE_PROFILE_OPACITY: f64 = 0.25;
|
||||
const PARCEL_COLOR: &str = "#1f6f3f";
|
||||
const ALLOWED_COLOR: &str = "#2b5fae";
|
||||
/// [140] Baurecht in Grautönen (Parzelle dunkel, zulässiger Baukörper mittel); Verstösse bleiben rot.
|
||||
const PARCEL_COLOR: &str = "#3a3a3a";
|
||||
const ALLOWED_COLOR: &str = "#6e6e6e";
|
||||
const PARCEL_DASH: [f64; 4] = [6.0, 1.5, 0.5, 1.5];
|
||||
const ALLOWED_DASH: [f64; 2] = [2.0, 1.0];
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ use super::section::{LevelSpec, Plane};
|
||||
use crate::grid::{bubble_diameter, section_axes, Spec};
|
||||
use crate::model::{Drawing2DGeom, GridBubbles, Project, Vec2};
|
||||
|
||||
const INK: &str = "#5a5f66";
|
||||
/// [140] Achsen in Tusche (schwarz), nicht grau.
|
||||
const INK: &str = "#1f242c";
|
||||
const AXIS_MM: f64 = 0.18;
|
||||
/// Überstand der Achse über die Gebäudehöhe und unter die Bodenlinie (Meter).
|
||||
const OVER_TOP: f64 = 0.8;
|
||||
|
||||
@@ -297,7 +297,7 @@ pub fn block_defs() -> Vec<Value> {
|
||||
pub const LIGHT_CATEGORY_CODE: &str = "65";
|
||||
|
||||
pub fn light_category() -> Value {
|
||||
json!({"code": LIGHT_CATEGORY_CODE, "name": "Leuchten", "color": "#b08020", "lw": 0.18, "visible": true, "locked": false})
|
||||
json!({"code": LIGHT_CATEGORY_CODE, "name": "Leuchten", "color": "#1a1a1a", "lw": 0.18, "visible": true, "locked": false})
|
||||
}
|
||||
|
||||
/// Gibt es im Kategorie-Baum schon den Code oder den Namen der Leuchten-Kategorie?
|
||||
|
||||
@@ -98,7 +98,10 @@ fn vs_main(in : VsIn) -> @builtin(position) vec4<f32> {
|
||||
|
||||
@fragment
|
||||
fn fs_main() -> @location(0) vec4<f32> {
|
||||
return globals.color;
|
||||
// [140] Unter 1 Geraete-px gilt die Breite als Deckung: feine Linien werden heller statt alle
|
||||
// gleich 1 px — die Rangfolge der Strichstaerken bleibt auch weit herausgezoomt sichtbar.
|
||||
let cov = clamp(globals.stroke_px * globals.stroke_scale, 0.35, 1.0);
|
||||
return vec4<f32>(globals.color.rgb, globals.color.a * cov);
|
||||
}
|
||||
"#;
|
||||
|
||||
@@ -258,7 +261,8 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
|
||||
cov_dash = smoothstep(-0.5, 0.5, sdist);
|
||||
}
|
||||
|
||||
let a = in.color.a * cov_radial * cov_cap * cov_dash;
|
||||
// [140] Deckung unter 1 Geraete-px wie `LINE_WGSL`.
|
||||
let a = in.color.a * cov_radial * cov_cap * cov_dash * clamp(width_mm * g.stroke_scale, 0.35, 1.0);
|
||||
if (a <= 0.002) {
|
||||
discard;
|
||||
}
|
||||
@@ -384,7 +388,8 @@ fn fs_main(in : VsOut) -> @location(0) vec4<f32> {
|
||||
}
|
||||
}
|
||||
let e = e_in + e_out;
|
||||
var a = globals.color.a;
|
||||
// [140] Deckung unter 1 Geraete-px wie `LINE_WGSL`.
|
||||
var a = globals.color.a * clamp(globals.stroke_px * globals.stroke_scale, 0.35, 1.0);
|
||||
if (e > 0.0) {
|
||||
// Rundes Strich-Ende (Abstand zum Strich), Kante ~1 px weich wie die Boegen.
|
||||
let d = sqrt(e * e + y * y);
|
||||
|
||||
@@ -53,7 +53,7 @@ export const CONTEXT_PARENT_CATEGORY: ContextCategoryDef = {
|
||||
export const TERRAIN_CATEGORY: ContextCategoryDef = {
|
||||
code: "02",
|
||||
name: "Gelände",
|
||||
color: "#8a9478",
|
||||
color: "#808080",
|
||||
lw: 0.13,
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ export const GENERIC_IMPORT_CATEGORY: ContextCategoryDef = {
|
||||
export const IMPORTED_ROOF_CATEGORY: ContextCategoryDef = {
|
||||
code: "31",
|
||||
name: "Dächer",
|
||||
color: "#7a4a3a",
|
||||
color: "#4a4a4a",
|
||||
lw: 0.18,
|
||||
};
|
||||
|
||||
@@ -95,12 +95,12 @@ export const IMPORTED_ROOF_CATEGORY: ContextCategoryDef = {
|
||||
*/
|
||||
export const GEO_CATEGORY_DEFS: Record<GeoCategory, ContextCategoryDef> = {
|
||||
building: { code: "12", name: "Gebäude", color: "#888888", lw: 0.25 },
|
||||
road: { code: "11", name: "Strasse", color: "#a89070", lw: 0.18 },
|
||||
forest: { code: "04", name: "Wald", color: "#3a7a3a", lw: 0.13 },
|
||||
road: { code: "11", name: "Strasse", color: "#808080", lw: 0.18 },
|
||||
forest: { code: "04", name: "Wald", color: "#909090", lw: 0.13 },
|
||||
parking: { code: "15", name: "Parkplätze", color: "#a0a0a0", lw: 0.13 },
|
||||
railway: { code: "16", name: "Bahn", color: "#606060", lw: 0.18 },
|
||||
water: { code: "17", name: "Gewässer", color: "#5a90b0", lw: 0.13 },
|
||||
green: { code: "18", name: "Grünflächen", color: "#70b070", lw: 0.13 },
|
||||
water: { code: "17", name: "Gewässer", color: "#909090", lw: 0.13 },
|
||||
green: { code: "18", name: "Grünflächen", color: "#a0a0a0", lw: 0.13 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+18
-17
@@ -363,10 +363,11 @@ export const sampleProject: Project = {
|
||||
},
|
||||
{ id: "detail-1", name: "Detail 1", kind: "drawing", visible: true, locked: false },
|
||||
],
|
||||
// Grafik-Kategorie-Baum (DOSSIER-Codes 1:1).
|
||||
// Grafik-Kategorie-Baum (DOSSIER-Codes 1:1). [140] Standard = Tusche: Bauteile schwarz, Kontext grau;
|
||||
// Farbe nur, wo der Nutzer sie setzt.
|
||||
layers: [
|
||||
{ code: "00", name: "Raster", color: "#484850", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "01", name: "Vermessung", color: "#707078", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "00", name: "Raster", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "01", name: "Vermessung", color: "#4a4a4a", lw: 0.18, visible: true, locked: false },
|
||||
// "05 Kontext" bündelt Bestand/Umgebung (manuell gezeichnet ODER importiert,
|
||||
// s. `contextCategories.ts::CONTEXT_PARENT_CATEGORY`) als Kinder statt als
|
||||
// gleichrangige Top-Level-Einträge (Nutzer-Wunsch 2026-08-31).
|
||||
@@ -379,10 +380,10 @@ export const sampleProject: Project = {
|
||||
locked: false,
|
||||
children: [
|
||||
{ code: "10", name: "Situation", color: "#909090", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "11", name: "Strasse", color: "#a89070", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "11", name: "Strasse", color: "#808080", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "12", name: "Gebäude", color: "#888888", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "13", name: "Bäume", color: "#50a050", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "14", name: "Höhenlinien", color: "#909050", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "13", name: "Bäume", color: "#808080", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "14", name: "Höhenlinien", color: "#808080", lw: 0.18, visible: true, locked: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -395,19 +396,19 @@ export const sampleProject: Project = {
|
||||
visible: true,
|
||||
locked: false,
|
||||
children: [
|
||||
{ code: "21", name: "Türen/Fenster", color: "#5080c8", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "22", name: "Möbel", color: "#909090", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "25", name: "Stützen", color: "#c87050", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "21", name: "Türen/Fenster", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "22", name: "Möbel", color: "#4a4a4a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "25", name: "Stützen", color: "#0a0a0a", lw: 0.25, visible: true, locked: false },
|
||||
],
|
||||
},
|
||||
{ code: "30", name: "Decken", color: "#605850", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "31", name: "Dächer", color: "#7a4a3a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "40", name: "Treppen", color: "#4a6a58", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "35", name: "Träger", color: "#a87858", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "50", name: "Text", color: "#d0d0d0", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "60", name: "Räume", color: "#5a7a9a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "90", name: "Referenzen", color: "#585860", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "99", name: "Konstruktion", color: "#404048", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "30", name: "Decken", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "31", name: "Dächer", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "40", name: "Treppen", color: "#1a1a1a", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "35", name: "Träger", color: "#0a0a0a", lw: 0.25, visible: true, locked: false },
|
||||
{ code: "50", name: "Text", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "60", name: "Räume", color: "#4a4a4a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "90", name: "Referenzen", color: "#1a1a1a", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "99", name: "Konstruktion", color: "#404040", lw: 0.13, visible: true, locked: false },
|
||||
],
|
||||
// [140] Strichstärken folgen dem Massstab (neue Projekte; bestehende behalten ihre Einstellung).
|
||||
scaleLineWeights: true,
|
||||
|
||||
@@ -119,8 +119,8 @@ const LAYERS: LayerCategory[] = [
|
||||
? {
|
||||
...l,
|
||||
children: [
|
||||
{ code: "02", name: "Gelände", color: "#8a9478", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "07", name: "Baugrube", color: "#a07850", lw: 0.18, visible: true, locked: false },
|
||||
{ code: "02", name: "Gelände", color: "#808080", lw: 0.13, visible: true, locked: false },
|
||||
{ code: "07", name: "Baugrube", color: "#4a4a4a", lw: 0.18, visible: true, locked: false },
|
||||
...(l.children ?? []),
|
||||
],
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { Project } from "../model/types";
|
||||
|
||||
const ALL = new Set(flattenCategories(sampleProject.layers).map((c) => c.code));
|
||||
/** Füllfarbe der Schattenflächen (`core/src/plan/extras.rs::SUN_SHADOW_FILL`). */
|
||||
const SUN_SHADOW_FILL = "#3a4a66";
|
||||
const SUN_SHADOW_FILL = "#3c3c3c";
|
||||
|
||||
const withStudy = (when: string, show = true): Project => ({ ...sampleProject, sunStudy: { when, show } });
|
||||
const shadows = (p: Project, floorId: string) =>
|
||||
|
||||
@@ -359,7 +359,7 @@ describe("toElevation — Öffnungen: Verdeckung + Reveal-Schatten", () => {
|
||||
const plan = generateElevationPlan(p, p.drawingLevels[1])!;
|
||||
// Glasflächen = weiss/blau gefüllte Polygone mit Kontur, keine Öffnung/Rahmen.
|
||||
return plan.primitives.filter(
|
||||
(pr) => pr.kind === "polygon" && pr.fill === "#9fc2d9",
|
||||
(pr) => pr.kind === "polygon" && pr.fill === "#d3d8dd",
|
||||
).length;
|
||||
};
|
||||
expect(glassCount(1)).toBe(1); // fest, 1 Feld
|
||||
@@ -405,7 +405,7 @@ describe("toElevation — Öffnungen: Verdeckung + Reveal-Schatten", () => {
|
||||
const plan = generateElevationPlan(p, p.drawingLevels[1])!;
|
||||
// Glasflächen = weiss/blau gefüllte Polygone mit Kontur, keine Öffnung/Rahmen.
|
||||
return plan.primitives.filter(
|
||||
(pr) => pr.kind === "polygon" && pr.fill === "#9fc2d9",
|
||||
(pr) => pr.kind === "polygon" && pr.fill === "#d3d8dd",
|
||||
).length;
|
||||
};
|
||||
expect(glassCount(1)).toBe(1); // fest, 1 Feld
|
||||
@@ -504,7 +504,7 @@ describe("Dächer auf L-Grundriss in der Ansicht", () => {
|
||||
});
|
||||
|
||||
describe("toElevation — Tür-Teilverglasung (glazingRatio)", () => {
|
||||
const GLASS_FILL_COLOR = "#9fc2d9";
|
||||
const GLASS_FILL_COLOR = "#d3d8dd";
|
||||
const DOOR_LEAF_FILL_COLOR = "#ede6d9";
|
||||
|
||||
function doorProject(dt: {
|
||||
|
||||
Reference in new issue
Block a user