[287] UX-Prüfung Zeichnen: Wandring schliesst per Klick, Befehlszeile wächst statt abzuschneiden, HUD-Feldnamen und Optionswerte übersetzt, Fangart-Beschriftung, Werkzeugname in der Statusleiste
This commit is contained in:
18 files changed
+231
-28
No files matched your search
@@ -10,7 +10,7 @@ Wer zu einer ID mehr wissen will (Entscheide, Tests, Bilder), sucht dort nach `*
|
||||
stehen im Archiv („Bewusst nicht übernommen“).
|
||||
- **Grösse** (eine Person mit Agenten): S ≤ 1 Tag · M ≤ 1 Woche · L ≤ 1 Monat · XL > 1 Monat.
|
||||
Steht keine Grösse im Archiv, ist sie hier geschätzt.
|
||||
- **IDs sind stabil.** Neue ID = nächste freie Zahl nach der höchsten im Archiv und hier (aktuell 285);
|
||||
- **IDs sind stabil.** Neue ID = nächste freie Zahl nach der höchsten im Archiv und hier (aktuell 287);
|
||||
nie eine ID wiederverwenden oder umnummerieren. Präfix-IDs (`[K]`, `[G]`, `[T]`, `[B]`, `[C]`) bleiben.
|
||||
- **Pro Punkt:** was fehlt · wo im Code · Grösse. Höchstens ein bis drei Sätze je Punkt;
|
||||
Messwerte und Befunde gehören in den Commit.
|
||||
@@ -55,6 +55,7 @@ Raumprogramm gegen Modell → Grundrisse/Schnitte/Ansichten 1:200 (Vorprojekt 1:
|
||||
Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
|
||||
- ◐ **[266]** Wettbewerb einmal ganz durchgespielt (16.11., Chromium/Linux, Bilder `doc/review-266/`); alle Befunde behoben bis auf: GV (18.11., `flaechen.rs`): Studienkörper (frei, ≥ 9 m² Grundfläche und ≥ 2.4 m hoch) zählen, aber nur ausserhalb der Geschossgrundrisse (innerhalb sonst doppelt); Bodenplatte = Decke unter dem untersten Geschoss zählt von ihrer UK bis Fertigboden (SIA 416: untere Begrenzung = Unterseite der untersten Bodenkonstruktion; Fundamente/Kies/Magerbeton nicht) — FRAGE: SIA-416-Wortlaut zu Fundamenten/Sauberkeitsschicht nicht im Repo, gegen die Norm prüfen; Schwellen 9 m²/2.4 m sind Annahmen (Alternative: Merkmal „Gebäudekörper" am Körper); Aufstockungen über dem Haus als Geschoss modellieren, nicht als Körper. Offen: Innenhöfe ohne Dach werden im Dachraum gefüllt (`core/building_volume.rs`); Tabellen wandern aufs 2. Blatt trotz freier Spalten oben (`presentation_poster.rs`); Schnittmarken im Plakat: Marken ungewählter Schnitte erscheinen mit, Linien > 40 mm Papier vom Haus beschnitten, beim Blatt ohne Plakat keine Marken; Plakat-Grundrisse zeigen alle Bemassungsketten statt nur Gesamtmass; Situation: eigenständige Layouts „Situation WBW“ setzen Nordpfeil/Massstab weiter unter die Lage, Kataster-Gebäude unter eigenem Fussabdruck nicht ausgeblendet; Wendeltreppen und Treppen nach unten/Teilhöhe bekommen kein Deckenloch automatisch (`stair_hole_ops`, `cmd_solid.rs`); 3D-Dokument ([266]/12, `plan/axo.rs`): nicht auf dem Mac geprüft (passt die Zeichnung zur 3D-Kamera?), kein eigener Reiter (nur Blatt-Viewport), kein Live-Schnitt, Fenster als Löcher ohne Rahmen/Glas, keine Rückseiten verdeckter Flächen, Gelände nicht, Kontext-Netze nur mit `context`, Flächen < 1/1200 Bildbreite ungetönt. Nicht geprüft: Tauri-App/Mac (Metal, 3D-Bild, Schatten, Rendering), Mausbedienung, Druck des A1-Plakats, DXF/IFC in Fremdsoftware. · M
|
||||
- ◐ **[287]** UX-Prüfung „wie eine Architektin zeichnen“ (18.11., Chromium/Linux, 1280×800 hell, nur Maus und Tastatur: leeres Projekt, Wandzug mit Klicks/getippter Länge/Winkel, Ring schliessen, Fenster/Tür, Raum, Treppe, Bemassung, Text, Decke, Auswahl/Verschieben/Griff, Ctrl+Z, Ebenen-/Schnittwechsel; Bilder `doc/review-287/`; nicht geprüft: 3D umschauen (headless kein WebGPU), Layout/Plakat, Umbau-Status, Wandtyp-Wechsel, Spiegeln/Drehen bis zum Ergebnis, Mac). Behoben: Klick auf den Startpunkt schliesst den Wandring (≥ 3 Wände) und legt ihn an — vorher blieb der Befehl offen und das gewohnte Esc-Esc verwarf alle gezeichneten Wände (`cmds/wall.ts`, vitest `wallClose.test.ts`) · Befehlszeile bei schmaler Mitte (Docks offen): Optionen/Felder/Eingabe liefen rechts aus dem Bild (Treppe: „Trittmass=“ abgeschnitten, Felder unsichtbar) — die Zeile wächst jetzt nach oben über die Zeichenfläche, Zoom springt nicht (`ui/CommandLine.tsx` `cmdline-row`, `styles.css`) · Cursor-HUD beschriftet Felder mit ihrer Bezeichnung statt der Feld-ID („pos/Δx/Δy/sill“ → „Abstand/Breite/Höhe/Brüstung“, „steps/rise“ → „Stufen/Steighöhe“, `tools/hudFormat.ts`) · Optionswerte der Befehlszeile übersetzt („Art=window“, „Grundform=straight“, „Auf/Ab=up“, „Trittmass=without“, „Modus=inside“, `cmds/opening.ts`, `stair.ts`, `room.ts`) · Fangmarker tragen die Fangart als Kurztext („Mitte“, „Endpunkt“, „Schnittpunkt“ …, `planView/overlays.tsx`) · Statusleiste links zeigt bei aktivem Werkzeug/Befehl dessen Namen statt „Auswahl“ (`App.tsx`). Offen, nach Ärger sortiert: (1) Griff-/Verschiebe-Zug übernimmt beim Loslassen nicht, sondern bleibt „bewaffnet“ bis zum nächsten Klick (Wand/Fenster wirken verschoben, sind es aber nicht; Esc/Ctrl+Z verwirft) — Archicad/VW setzen beim Loslassen, bekannt aus [204](h) als „gewollt“, `state/useGripEditing.ts` · M; (2) Wandzug wird erst mit Enter/Leertaste/Rechtsklick angelegt und Esc-Esc verwirft alles ohne Rückfrage (Vorgabe [99]) — für offene Züge Esc = „beenden und behalten“ (≥ 2 Punkte), `cmds/wall.ts` `onCancel` · S; (3) Länge tippen + Enter sperrt nur die Länge, das Winkelfeld braucht ein zweites Enter, und die Vorschau folgt dem getippten Winkel erst nach Tab/Enter, nicht beim Tippen (`commands/engine.ts` `lockActiveField`; Vorschlag: Enter übernimmt mit Mauswinkel, Tab für Winkel) · S–M; (4) Fenster/Tür: zwei Klicks (erst Wand, dann Position) und beim Überfahren der Wand keine Öffnungs-Vorschau; Archicad setzt mit einem (`cmds/opening.ts`) · M; (5) Tippen auf der Zeichenfläche startet keinen Befehl („w“, Enter tut nichts, Fokus bleibt auf dem Body) — nur Tab/Klick in die Befehlszeile, Platzhalter „(Tab)“ ist der einzige Hinweis (`state/commandKeys.ts`) · S–M; (6) Objekt-Info bei Mehrfachauswahl zeigt die Werte des ersten Elements unter „Wand“, kein „2 Wände“/„gemischt“ (`panels/objectInfo`) · S; (7) Anfangsansicht des leeren Projekts zeigt 60 × 60 m (≈ 21 px/m, Raumtext 3 px hoch) und „1:179 56 %“ neben dem Massstab „1:100“ — zwei Zahlen, die verwirren (`views/plan`, Topbar) · S; (8) Tab „+“ öffnet eine zweite Ansicht „Erdgeschoss“ mit gleichem Namen, kein neues Geschoss (Geschoss-Plus steht in der Ebenenliste) · S; (9) Fangmarker bleiben ≈ 5 px klein und gelb auf schwarzem Wandfüll; grösser/mit Kontrastring (`overlays.tsx` `markSize`) · S; (10) Ctrl+V fügt am selben Ort ohne Vorschau ein (Kopie unsichtbar, nur „Auswahl: 2 Wände“) · S; (11) Prompt „Nächster Punkt ( Fertig Zurück ):“ ohne Trennzeichen, Wand-Optionen „Bogen=aus“/„Wandtyp=aktiv“ uneinheitlich; Prompt bleibt bei aktivem Werkzeug zwischen zwei Objekten „Befehl:“ (`i18n`, `cmds/*`) · S; (12) Werkzeug-Tooltips nennen kein Tastenkürzel (Wand = „w“ + Enter nur über die Befehlszeile) · S. Nicht in der Tauri-App geprüft. · M
|
||||
- ◐ **[285]** Referenz-Ablauf zum zweiten Mal durchgespielt (18.11., Chromium/Linux, Haus 18 × 11 m, 2 Geschosse, 4 Wohnungen, Bilder `doc/review-285/`; nicht auf dem Mac, kein 3D-Live/Rendering/Druck). Behoben: Gesamthöhe (Baurecht, Kennzahlen) zählt die Attika (`site_rules.rs` `model_top`; vorher 5.80 statt Oberkante Attika, Ansicht zeigte +6.30; `KURZANLEITUNG` „Höhe 9.50" nicht neu geprüft). Offen, nach Schritt: Baurecht: Meldung „Gebäude innerhalb der zulässigen Fläche" steht grün schon ohne Bauteil (`panels/SiteRulesSection.tsx`) · S. Volumen: `decke` setzt die Decke immer oben ans aktive Geschoss, Bodenplatte unter EG und Balkonplatte brauchen je 6 Schritte in der Objekt-Info (OK/UK „Eigene"), kein Befehl/Option dafür (`cmds/ceiling.ts`) · S; `wand` hat keine Wandtyp-Option (Innenwände nachträglich umstellen) und setzt „Aussenbauteil"/„Tragend" nie, dadurch kein IsExternal an Aussenwänden im IFC und U-Wert „unvollständig (4 Schicht(en) ohne λ)" für den Standardaufbau (`cmds/wall.ts`, Standard-Wandtypen) · S; Zeichnungsebene „kataster" liegt im Arbeitsgrundriss über den neuen Wänden (Kataster-Gebäude deckt sie zu, bis man die Ebene ausblendet) · S; Fenster-Befehl: eine Zahl bei „Position entlang der Wand (Abstand tippen)" setzt stillschweigend die Breite (3 m statt Abstand 3 m, `cmds/opening.ts`) · S; Rampe: falsche Richtung (Anfang aussen, +6 %) hebt die Rampe über Geschosshöhe ohne Hinweis (`cmds/ramp.ts`) · S. Räume/Einheiten: `raum` legt je Aufruf nur einen Raum an, Name/Nutzung/Kategorie je Raum einzeln (10 Räume ≈ 40 Eingaben) · M; Einheit löschen/verschieben lässt leere Einheiten („0 Zi · 0.0 m²") und zählt Nummern weiter (Whg 5, 6) · S; Statusleiste: Feld „Ebene" zeigt die Klasse („20 Wände"), „Geschoss" die Zeichnungsebene (Bezeichnungen nach [180] vereinheitlichen, `ui/StatusBar.tsx`) · S; Projektname bleibt „Leeres Projekt" (Titel von Plakat/Spiegel), bis er im Mappe-Panel gesetzt wird · S. Abgabe (18.11. behoben, `presentation_sheet.rs`/`presentationSheet.ts`/`PresentationDialog.tsx`: Dialog bietet feineren Massstab (≥ 1:100) mit Knopf an, wenn er aufs Blatt passt; Situation = Parzelle (`siteRules.parcel`) ∪ Haus ± 10 m statt Haus ± 40 m, ohne Parzelle ± 30 m; Wohnungsspiegel als dritte Plakat-Tabelle bei Projekten mit Einheiten (`posterExtrasDefault`); nur Chromium/Vitest geprüft, Prüfbild `doc/review-285/r4-plakat-nachher.png` ist eine Rahmen-Skizze der Anordnung, kein gerenderter Plan; Tabellen füllen das Blatt weiter nur rechts neben der letzten Zeile, bei 3 Tabellen im Beispiel 2. Blatt; Axo-Bild bleibt auf die Grösse des grössten Grundrisses begrenzt — beides am 18.11. behoben, s. „Plakat gefüllt“) · Axo: Bäume fehlen (Entourage-Objekte da), Rampe/Haustür auf der abgewandten Seite nicht zu sehen (`plan/axo.rs`) · S. Geprüft ok: Kataster-Import und Baurecht-Zahlen (484 m² zulässig, AZ 0.41, ÜZ 0.23), GV mit Bodenplatte (686.8 = 603.5 + 83.3 m³), Wohnungsspiegel CSV/SVG, Kosten (1'094 CHF/m³), Plakat anonym (Kennwort im Titel, Projektname nirgends im PDF), PDF-Ebenen (17 OCG), IFC (Geländer, Träger, Rampe, Treppe, Dach, Räume), DXF. Nicht durchgespielt: Umbau (Abbruch Kataster-Bestand) und Varianten (nur Hinweise „noch kein Variantensatz"/„Zuerst Bauteile wählen" gesehen), Rendering-Fenster, Mac. · M Behoben (19.11., Bedienung/Modell): Baurecht-Meldung „innerhalb der zulässigen Fläche" erst mit Gebäude (sonst „Noch kein Gebäude gezeichnet", neutral) · `decke`: Option „Lage" (oben / unter dem Geschoss = Bodenplatte / frei mit getippter Oberkante, Kern `top`) · `wand`: Optionen „Wandtyp" (reihum durch die Projekt-Typen) und „Aussenbauteil" (nach Typ / ja / nein); Vorgabe `isExternal` nach dem Wandtypnamen („Aussenwand" ⇒ aussen, „Innenwand" ⇒ innen), der IFC-Export schreibt `IsExternal` nur mit Angabe im Modell (`ifc_data.rs`) · Standard-Baustoffe des Beispiel-/Leerprojekts (`sampleProject.ts`) haben λ (SIA-Richtwerte, wie `core/standards.rs`), U-Wert nicht mehr „unvollständig" · Fenster/Tür: getippte Zahl im Positionsschritt = Abstand (neues erstes Tab-Feld „Abstand"), nicht Breite · Rampe: Hinweis, wenn sie über die Geschosshöhe steigt bzw. tiefer als eine Geschosshöhe fällt · Axo: Bäume (Stamm + Krone) wie im 3D (`furniture_3d::with_context_meshes`). Nicht auf dem Mac/in der Tauri-App geprüft. Entschieden und behoben (18.11., Koordinator; Chromium/Linux, nicht auf dem Mac): Kataster/Kontext deckt im Arbeitsgrundriss die Wände nicht mehr zu — Gruppenreihenfolge und Goldens bleiben, stattdessen zeigt der Arbeitsgrundriss (Bildschirm, `contextUnderlay` aus `viewportContent.tsx`, nie Druck/PDF/SVG/CLI) Klassen „als Unterlage“ mit Deckkraft 0.35 (`drawings.rs` `underlay_class`, über den vorhandenen Transparenz-Rahmen der Senke, auch in der kompakten Linien-Unterlage); Schalter „Als Unterlage“ je Klasse (`LayerCategory.underlay`, KlLine truncated
|
||||
- ◐ **[270]** Blickrichtungen überall gleich (3D-Spiegelung behoben, Marken weichen aus; 17.11.). Offen: 3D-Bild nur numerisch (Kameramatrix, Pick-Strahl) geprüft, kein Bild aus render3d unter Linux, nicht auf dem Mac/Metal (`doc/RELEASE-1.0.md` 13.36); natives Spike-Fenster `src-tauri/src/native.rs` (Orbit-Richtung) nicht angepasst. · M
|
||||
- ◐ **[279]** Geländer als eigenes Bauteil (18.11.; Lücke 7 `doc/VERGLEICH-1.0.md`; Linux/Chromium, nicht auf dem Mac geprüft): Modell, Grundriss, Schnitt/Ansicht/3D, IFC, DXF, Befehl `gelaender` umgesetzt (`railing.rs`, `plan/railings.rs`). Nachgeführt 18.11.: Glas in Ansicht und 3D-Dokument durchscheinend (helle Füllung wie Fensterglas, Deckkraft 0.4, verdeckt nichts; Schnitt unverändert), Objektfang auf Achse (und Längskanten dicker Brüstungen), Schatten der Sonnenstudie (Prismen aus `railing::pieces`, ab 400 Teilen ohne Stäbe/Pfosten). Lochblech mit Lochmuster in Ansicht und 3D-Dokument (Punktschraffur `Dots` der Schraffur-Bibliothek auf der Tafel, `railings::perforation_hatch`; Schnitt und Grundriss unverändert); Handlauf über der Schnitthöhe bei geschnittenem Fuss im Grundriss als zwei gestrichelte Linien im Abstand der Handlaufbreite neben der Achse (`railing-handrail`, Strichmuster wie die Treppen-Handläufe über dem Schnitt; 18.11., Prüfbild `doc/review-279/03-lochblech.png`, Chromium/Linux). Offen: kein IfcRailing-Import; Loggia-Brüstung an Wänden bleibt Wand. · M
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
+13
-2
@@ -36,7 +36,10 @@ import { DEFAULT_PRESETS } from "./text/richText";
|
||||
import { unitsForLevel } from "./tools/displayUnits";
|
||||
import type { ToolHandlers } from "./tools/types";
|
||||
import { checkForUpdateOnStart } from "./update/checkForUpdate";
|
||||
import { useT } from "./i18n";
|
||||
import { useT, t } from "./i18n";
|
||||
import type { TranslationKey } from "./i18n";
|
||||
import { toolInfo } from "./tools/tools";
|
||||
import { getCommand } from "./commands/registry";
|
||||
|
||||
// Globaler Store (Slices: project/selection/view/layout) und lokaler UI-Zustand.
|
||||
import { useStore } from "./state/appStore";
|
||||
@@ -580,6 +583,14 @@ export default function App() {
|
||||
|
||||
// Werkzeug-Hinweis und aktive Ebene der Status-Leiste → state/useStatusBarInfo.ts.
|
||||
const { toolHint, activeLayerName } = useStatusBarInfo({ selection, activeCategoryCode });
|
||||
// [287] Links in der Statusleiste steht bei aktivem Werkzeug/Befehl dessen Name (vorher „Auswahl“ auch beim Wandzeichnen).
|
||||
const statusToolKey =
|
||||
activeTool !== "select"
|
||||
? toolInfo(activeTool).labelKey
|
||||
: commandActive && engineView.commandName
|
||||
? getCommand(engineView.commandName)?.labelKey
|
||||
: null;
|
||||
const statusToolLabel = statusToolKey ? t(statusToolKey as TranslationKey) : null;
|
||||
|
||||
// Solange keine Plan-Ansicht montiert ist, gibt es keinen Live-Massstab.
|
||||
// (PlanView meldet beim Montieren/Zoomen sofort wieder einen Wert.)
|
||||
@@ -1023,7 +1034,7 @@ export default function App() {
|
||||
{/* Footer / Status-Leiste (unten). Werte rein aus Modell + View-State.
|
||||
Cursor/Zoom nur, wenn eine Plan-Ansicht aktiv ist (sonst „—"). */}
|
||||
<StatusBar
|
||||
hint={toolHint}
|
||||
hint={statusToolLabel ?? toolHint}
|
||||
showCursor={planActive}
|
||||
unit="m"
|
||||
units={displayUnits}
|
||||
|
||||
@@ -23,6 +23,8 @@ import type {
|
||||
Vec2,
|
||||
} from "../types";
|
||||
import { createMutation, createPreview, createQuery, xy } from "../createCore";
|
||||
import { t } from "../../i18n";
|
||||
import type { TranslationKey } from "../../i18n";
|
||||
|
||||
/** Default-Maße (Meter). */
|
||||
const DEF_WINDOW = { width: 1.2, height: 1.2, sill: 0.9 };
|
||||
@@ -134,7 +136,7 @@ function posDraftAt(s: OpPos, ctx: CommandContext, pos: number | null, at: Vec2
|
||||
const draft: ToolDraft = { preview: pv.shapes, vertices: [{ x: ax, y: ay }, { x: bx, y: by }] };
|
||||
draft.hud = {
|
||||
at: s.cursor ?? { x: mx, y: my },
|
||||
text: `${from.toFixed(2)} m · ${s.kind === "door" ? "Tür" : "Fenster"} ${(
|
||||
text: `${from.toFixed(2)} m · ${t(s.kind === "door" ? "cmd.opening.doorLabel" : "cmd.opening.windowLabel")} ${(
|
||||
s.width * 100
|
||||
).toFixed(0)}×${(s.height * 100).toFixed(0)}`,
|
||||
};
|
||||
@@ -163,13 +165,14 @@ export const openingCommand: Command = {
|
||||
: ["point", "option"],
|
||||
options: (s): CmdOption[] => {
|
||||
const st = s as OpState;
|
||||
const kind: CmdOption = { ...KIND, value: st.kind };
|
||||
// [287] Werte übersetzt (vorher „Art=window", „Seite=left").
|
||||
const kind: CmdOption = { ...KIND, value: t(st.kind === "door" ? "cmd.opening.doorLabel" : "cmd.opening.windowLabel") };
|
||||
if (st.kind === "door") {
|
||||
return [
|
||||
kind,
|
||||
{ ...HINGE, value: st.hinge },
|
||||
{ ...SIDE, value: st.side },
|
||||
{ ...DIR, value: st.dir },
|
||||
{ ...HINGE, value: t(`objinfo.opening.hinge.${st.hinge}` as TranslationKey) },
|
||||
{ ...SIDE, value: t(`objinfo.opening.swing.${st.side}` as TranslationKey) },
|
||||
{ ...DIR, value: t(`objinfo.opening.dir.${st.dir}` as TranslationKey) },
|
||||
];
|
||||
}
|
||||
return [kind];
|
||||
|
||||
@@ -29,6 +29,8 @@ import type {
|
||||
Vec2,
|
||||
} from "../types";
|
||||
import { createMutation, createPreview, xy } from "../createCore";
|
||||
import { t } from "../../i18n";
|
||||
import type { TranslationKey } from "../../i18n";
|
||||
|
||||
const EPS = 1e-6;
|
||||
const DEG = Math.PI / 180;
|
||||
@@ -121,7 +123,7 @@ export const roomCommand: Command = {
|
||||
: ["point", "option"],
|
||||
options: (s): CmdOption[] => {
|
||||
const st = s as RoomCmdState;
|
||||
const modeOpt: CmdOption = { ...MODE, value: st.mode };
|
||||
const modeOpt: CmdOption = { ...MODE, value: t(`cmd.room.mode.${st.mode}` as TranslationKey) };
|
||||
if (st.phase !== "draw") return [modeOpt];
|
||||
return st.points.length >= 3 ? [modeOpt, CLOSE, UNDO] : [modeOpt, UNDO];
|
||||
},
|
||||
|
||||
@@ -34,6 +34,8 @@ import type {
|
||||
Vec2,
|
||||
} from "../types";
|
||||
import { createMutation, createPreview, xy } from "../createCore";
|
||||
import { t } from "../../i18n";
|
||||
import type { TranslationKey } from "../../i18n";
|
||||
|
||||
/** Default-Laufbreite (Meter). */
|
||||
const DEF_WIDTH = 1.0;
|
||||
@@ -209,10 +211,11 @@ export const stairCommand: Command = {
|
||||
options: (s): CmdOption[] => {
|
||||
const st = s as StairCmdState;
|
||||
return [
|
||||
{ ...SHAPE, value: st.shape },
|
||||
{ ...UPDOWN, value: st.up ? "up" : "down" },
|
||||
{ ...REFERENZ, value: st.referenz },
|
||||
{ ...TREAD_MODE, value: st.treadMode },
|
||||
// [287] Werte übersetzt (vorher „Grundform=straight“, „Auf/Ab=up“, „Trittmass=without“).
|
||||
{ ...SHAPE, value: t(`objinfo.stair.shape.${st.shape}` as TranslationKey) },
|
||||
{ ...UPDOWN, value: t(st.up ? "cmd.stair.updown.up" : "cmd.stair.updown.down") },
|
||||
{ ...REFERENZ, value: t(`objinfo.stair.referenz.${st.referenz}` as TranslationKey) },
|
||||
{ ...TREAD_MODE, value: t(`cmd.stair.treadMode.${st.treadMode}` as TranslationKey) },
|
||||
];
|
||||
},
|
||||
|
||||
|
||||
@@ -292,6 +292,14 @@ export const wallCommand: Command = {
|
||||
return [ns, { draft: draftOf(ctx, ns) }];
|
||||
}
|
||||
const seg: Seg = !s.arc ? 0 : (s.pendingThrough ?? 1);
|
||||
// [287] Schliesst der Klick den Zug am Startpunkt (≥ 3 Wände), ist der Ring fertig: sofort anlegen.
|
||||
// Vorher blieb der Befehl offen, und das gewohnte Esc-Esc zum Beenden verwarf alle Wände.
|
||||
if (s.points.length >= 3 && segLen(s.points[0], pt) < EPS) {
|
||||
return [
|
||||
{ phase: "start", lastPoint: null, thickOverride: to, single, ...modeOf(s) } as WallIdle,
|
||||
{ draft: null, done: true, commit: appendWalls([...s.points, s.points[0]], ctx, to, [...s.segs, seg], s.ext) },
|
||||
];
|
||||
}
|
||||
const ns: WallDrawing = {
|
||||
...s,
|
||||
points: [...s.points, pt],
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/** [287] Wandzug: Klick auf den Startpunkt schliesst den Ring und beendet den Befehl. */
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { wallCommand } from "./wall";
|
||||
import type { CommandContext, CommandResult, Project, Vec2 } from "../types";
|
||||
|
||||
function project(): Project {
|
||||
return {
|
||||
id: "t",
|
||||
name: "T",
|
||||
lineStyles: [],
|
||||
hatches: [],
|
||||
components: [{ id: "c", name: "C", color: "#ccc", hatchId: "none", joinPriority: 10 }],
|
||||
wallTypes: [{ id: "aw", name: "AW", layers: [{ componentId: "c", thickness: 0.2 }] }],
|
||||
drawingLevels: [
|
||||
{ id: "eg", name: "EG", kind: "floor", visible: true, locked: false, floorHeight: 2.6, cutHeight: 1.0, baseElevation: 0 },
|
||||
],
|
||||
layers: [{ code: "20", name: "Wände", color: "#0a0a0a", lw: 0.5, visible: true, locked: false }],
|
||||
walls: [],
|
||||
openings: [],
|
||||
ceilings: [],
|
||||
stairs: [],
|
||||
rooms: [],
|
||||
drawings2d: [],
|
||||
context: [],
|
||||
} as unknown as Project;
|
||||
}
|
||||
|
||||
function makeCtx(): CommandContext {
|
||||
const p = project();
|
||||
return {
|
||||
project: p,
|
||||
level: p.drawingLevels[0],
|
||||
defaultCategoryCode: "20",
|
||||
activeWallTypeId: "aw",
|
||||
lastPoint: null,
|
||||
} as unknown as CommandContext;
|
||||
}
|
||||
|
||||
const sq: Vec2[] = [
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 4, y: 0 },
|
||||
{ x: 4, y: 3 },
|
||||
{ x: 0, y: 3 },
|
||||
];
|
||||
|
||||
function feed(pts: Vec2[]) {
|
||||
const ctx = makeCtx();
|
||||
let s = wallCommand.init();
|
||||
let last: CommandResult | null = null;
|
||||
for (const pt of pts) [s, last] = wallCommand.onInput(s, { kind: "point", point: pt }, ctx);
|
||||
return { s, last: last! };
|
||||
}
|
||||
|
||||
describe("wallCommand — Ring schliessen ([287])", () => {
|
||||
it("Klick auf den Startpunkt legt den Ring an und beendet den Zug", () => {
|
||||
const { s, last } = feed([...sq, sq[0]]);
|
||||
expect(last.done).toBe(true);
|
||||
expect(last.commit).toBeDefined();
|
||||
expect(wallCommand.prompt(s)).toBe("cmd.wall.start");
|
||||
expect(last.commit!(project()).walls).toHaveLength(4);
|
||||
});
|
||||
|
||||
it("zwei Wände ergeben noch keinen Ring", () => {
|
||||
const { last } = feed([sq[0], sq[1], sq[0]]);
|
||||
expect(last.done).toBeFalsy();
|
||||
});
|
||||
});
|
||||
@@ -310,6 +310,17 @@ export const de = {
|
||||
"tool.snap": "Fang",
|
||||
"tool.snap.hint": "Fang an Endpunkten/Raster; Shift = Ortho, Ctrl = Fang aus",
|
||||
"snap.enabled": "Fang aktiv",
|
||||
"snap.tip.endpoint": "Endpunkt",
|
||||
"snap.tip.midpoint": "Mitte",
|
||||
"snap.tip.intersection": "Schnittpunkt",
|
||||
"snap.tip.center": "Zentrum",
|
||||
"snap.tip.quadrant": "Quadrant",
|
||||
"snap.tip.onEdge": "Auf Kante",
|
||||
"snap.tip.perpendicular": "Senkrecht",
|
||||
"snap.tip.tangent": "Tangente",
|
||||
"snap.tip.parallel": "Parallel",
|
||||
"snap.tip.extension": "Verlängerung",
|
||||
"snap.tip.divide": "Teilpunkt",
|
||||
"snap.endpoint": "Endpunkt",
|
||||
"snap.midpoint": "Mittelpunkt",
|
||||
"snap.center": "Kreismitte/Quadranten (0/90/180/270°)",
|
||||
@@ -2367,6 +2378,10 @@ export const de = {
|
||||
"cmd.stair.run": "Laufrichtung / Ende ( Grundform · Auf/Ab ):",
|
||||
"cmd.stair.shape": "Grundform",
|
||||
"cmd.stair.updown": "Auf/Ab",
|
||||
"cmd.stair.updown.up": "Auf",
|
||||
"cmd.stair.updown.down": "Ab",
|
||||
"cmd.stair.treadMode.with": "mit",
|
||||
"cmd.stair.treadMode.without": "ohne",
|
||||
"cmd.stair.stepsField": "Stufen",
|
||||
"cmd.stair.riseField": "Steighöhe",
|
||||
"cmd.stair.referenz": "Referenz",
|
||||
@@ -3587,6 +3602,8 @@ export const de = {
|
||||
// ── Raum-Befehl ─────────────────────────────────────────────────────────────
|
||||
"cmd.room.label": "Raum",
|
||||
"cmd.room.mode": "Modus",
|
||||
"cmd.room.mode.inside": "Klick in Raum",
|
||||
"cmd.room.mode.manual": "Umriss",
|
||||
"cmd.room.inside": "Klick in Raum setzen:",
|
||||
"cmd.room.first": "Ersten Raumpunkt setzen:",
|
||||
"cmd.room.next": "Nächsten Punkt setzen ( Enter/Start schliesst ):",
|
||||
|
||||
@@ -308,6 +308,17 @@ export const en: Record<TranslationKey, string> = {
|
||||
"tool.snap": "Snap",
|
||||
"tool.snap.hint": "Snap to endpoints/grid; Shift = ortho, Ctrl = snap off",
|
||||
"snap.enabled": "Snap on",
|
||||
"snap.tip.endpoint": "Endpoint",
|
||||
"snap.tip.midpoint": "Midpoint",
|
||||
"snap.tip.intersection": "Intersection",
|
||||
"snap.tip.center": "Centre",
|
||||
"snap.tip.quadrant": "Quadrant",
|
||||
"snap.tip.onEdge": "On edge",
|
||||
"snap.tip.perpendicular": "Perpendicular",
|
||||
"snap.tip.tangent": "Tangent",
|
||||
"snap.tip.parallel": "Parallel",
|
||||
"snap.tip.extension": "Extension",
|
||||
"snap.tip.divide": "Division point",
|
||||
"snap.endpoint": "Endpoint",
|
||||
"snap.midpoint": "Midpoint",
|
||||
"snap.center": "Circle center/quadrants (0/90/180/270°)",
|
||||
@@ -2356,6 +2367,10 @@ export const en: Record<TranslationKey, string> = {
|
||||
"cmd.stair.run": "Run direction / end ( Shape · Up/Down ):",
|
||||
"cmd.stair.shape": "Shape",
|
||||
"cmd.stair.updown": "Up/Down",
|
||||
"cmd.stair.updown.up": "Up",
|
||||
"cmd.stair.updown.down": "Down",
|
||||
"cmd.stair.treadMode.with": "with",
|
||||
"cmd.stair.treadMode.without": "without",
|
||||
"cmd.stair.stepsField": "Steps",
|
||||
"cmd.stair.riseField": "Rise",
|
||||
"cmd.stair.referenz": "Reference",
|
||||
@@ -3574,6 +3589,8 @@ export const en: Record<TranslationKey, string> = {
|
||||
// Room command.
|
||||
"cmd.room.label": "Room",
|
||||
"cmd.room.mode": "Mode",
|
||||
"cmd.room.mode.inside": "Click in room",
|
||||
"cmd.room.mode.manual": "Outline",
|
||||
"cmd.room.inside": "Click inside room:",
|
||||
"cmd.room.first": "Set first room point:",
|
||||
"cmd.room.next": "Set next point ( Enter/Start closes ):",
|
||||
|
||||
@@ -64,6 +64,7 @@ export function useCommandLineBinding(opts: {
|
||||
? {
|
||||
fields: engineView.fields.map((f) => ({
|
||||
id: f.id,
|
||||
labelKey: f.labelKey,
|
||||
value: f.value,
|
||||
locked: f.locked,
|
||||
active: f.active,
|
||||
|
||||
+39
-10
@@ -1334,17 +1334,30 @@ body {
|
||||
monospace-Texteingabe rechts; das Autocomplete-Dropdown öffnet nach oben. */
|
||||
.cmdline {
|
||||
position: relative;
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 0 0 26px;
|
||||
height: 26px;
|
||||
padding: 0 12px;
|
||||
border-top: 1px solid var(--line);
|
||||
background: var(--input);
|
||||
z-index: 20;
|
||||
font-size: 12px;
|
||||
user-select: none;
|
||||
}
|
||||
/* [287] Die Zeile hängt unten an der festen 26-px-Leiste und wächst bei Bedarf NACH OBEN über die Zeichenfläche
|
||||
(Treppe: 4 Optionen + 3 Felder passen bei 1280 px nicht in eine Zeile; vorher liefen Felder und Eingabe rechts aus
|
||||
dem Bild). Die Zeichenfläche behält ihre Grösse, der Zoom springt nicht. */
|
||||
.cmdline-row {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
min-height: 26px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 3px 10px;
|
||||
padding: 2px 12px;
|
||||
border-top: 1px solid var(--line);
|
||||
background: var(--input);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.cmdline-prompt {
|
||||
flex: 0 0 auto;
|
||||
font-weight: 600;
|
||||
@@ -1353,9 +1366,15 @@ body {
|
||||
}
|
||||
.cmdline-options {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 3px 6px;
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
.cmdline-option {
|
||||
flex: 0 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.cmdline-option {
|
||||
appearance: none;
|
||||
@@ -1409,9 +1428,11 @@ body {
|
||||
hervorgehoben (Akzent-Rand). Wert „—" = ungelockt (folgt der Maus). */
|
||||
.cmdline-fields {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex: 0 0 auto;
|
||||
gap: 3px 6px;
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
.cmdline-field {
|
||||
display: inline-flex;
|
||||
@@ -2735,6 +2756,14 @@ body {
|
||||
stroke: #ffcc44;
|
||||
stroke-width: 1.5;
|
||||
}
|
||||
.plan-svg .snap-tip {
|
||||
fill: var(--ink);
|
||||
stroke: var(--bg);
|
||||
paint-order: stroke;
|
||||
stroke-linejoin: round;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
.plan-svg .snap-glyph.snap-fill {
|
||||
fill: #ffcc44;
|
||||
}
|
||||
|
||||
@@ -54,4 +54,19 @@ describe("hudSegments — Cursor-HUD-Formatierung (2D + 3D gemeinsam)", () => {
|
||||
);
|
||||
expect(segs).toEqual([{ text: "L: 2.5m", active: true, locked: false }]);
|
||||
});
|
||||
|
||||
it("[287] beschriftet Felder ohne Länge/Winkel mit ihrer Bezeichnung statt der Feld-ID (Öffnung: Abstand/Brüstung)", () => {
|
||||
const segs = hudSegments(
|
||||
{ at: { x: 0, y: 0 }, text: "x" },
|
||||
{
|
||||
fields: [
|
||||
{ id: "pos", labelKey: "cmd.field.offset", value: 2.877, locked: false, active: true },
|
||||
{ id: "width", labelKey: "cmd.field.width", value: 1.2, locked: false, active: false },
|
||||
{ id: "sill", labelKey: "cmd.opening.sillField", value: 0.9, locked: false, active: false },
|
||||
],
|
||||
typed: "",
|
||||
},
|
||||
);
|
||||
expect(segs.map((x) => x.text)).toEqual(["Abstand: 2.877m", "Breite: 1.200m", "Brüstung: 0.900m"]);
|
||||
});
|
||||
});
|
||||
+18
-4
@@ -7,6 +7,8 @@
|
||||
|
||||
import type { ToolDraft } from "./types";
|
||||
import { NON_LENGTH_FIELDS } from "../commands/parseInput";
|
||||
import { t } from "../i18n";
|
||||
import type { TranslationKey } from "../i18n";
|
||||
import { MODEL_UNITS, dyToDisplay, fmtDisplay, lengthToDisplay, type DisplayUnits } from "./displayUnits";
|
||||
|
||||
/** Ein Segment des Cursor-HUDs (z. B. "L: 3.000m"), + Tab-Zyklus-Zustand. */
|
||||
@@ -18,7 +20,7 @@ export interface HudSeg {
|
||||
|
||||
/** Tab-Feld-Zyklus-Zustand der Befehlszeile (s. `ui/CommandLine.tsx`). */
|
||||
export interface HudFieldsState {
|
||||
fields: { id: string; value: number | null; locked: boolean; active: boolean }[];
|
||||
fields: { id: string; labelKey?: string; value: number | null; locked: boolean; active: boolean }[];
|
||||
typed: string;
|
||||
}
|
||||
|
||||
@@ -48,12 +50,24 @@ export function hudSegments(
|
||||
: id === "height"
|
||||
? (hud.dy ?? null)
|
||||
: null;
|
||||
const labelFor = (id: string): string =>
|
||||
id === "length" ? "L" : id === "angle" ? "W" : id === "width" ? "Δx" : id === "height" ? "Δy" : id;
|
||||
// [287] Länge/Winkel kurz (L/W, VW-Stil), Breite/Höhe nur mit Δx/Δy, wenn der Entwurf dx/dy liefert (Rechteck);
|
||||
// alle übrigen Felder (Abstand, Brüstung, Radius, Dicke …) mit ihrer übersetzten Bezeichnung statt der Feld-ID.
|
||||
const labelFor = (id: string, labelKey?: string): string =>
|
||||
id === "length"
|
||||
? "L"
|
||||
: id === "angle"
|
||||
? "W"
|
||||
: (id === "width" || id === "height") && hud.dx != null
|
||||
? id === "width"
|
||||
? "Δx"
|
||||
: "Δy"
|
||||
: labelKey
|
||||
? t(labelKey as TranslationKey)
|
||||
: id;
|
||||
const segs: HudSeg[] = [];
|
||||
if (hudFields && hudFields.fields.length > 0) {
|
||||
for (const f of hudFields.fields) {
|
||||
const label = labelFor(f.id);
|
||||
const label = labelFor(f.id, f.labelKey);
|
||||
const isLength = !NON_LENGTH_FIELDS.has(f.id);
|
||||
const unit = f.id === "angle" ? "°" : isLength ? u : "";
|
||||
const typedHere = f.active && hudFields.typed.trim() !== "";
|
||||
|
||||
@@ -177,6 +177,7 @@ export const CommandLine = memo(forwardRef<CommandLineHandle, CommandLineProps>(
|
||||
|
||||
return (
|
||||
<div className="cmdline" role="group" aria-label={t("cmd.aria")} data-steps={steps ?? 0}>
|
||||
<div className="cmdline-row">
|
||||
{suggestions.length > 0 && (
|
||||
<ul className="cmdline-suggest" role="listbox">
|
||||
{suggestions.map((s) => (
|
||||
@@ -256,6 +257,7 @@ export const CommandLine = memo(forwardRef<CommandLineHandle, CommandLineProps>(
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
onKeyDown={onKeyDown}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -6,6 +6,8 @@ import type { Vec2 } from "../../../model/types";
|
||||
import type { SnapResult, ToolDraft } from "../../../tools/types";
|
||||
import { hudSegments, type HudFieldsState } from "../../../tools/hudFormat";
|
||||
import { MODEL_UNITS, type DisplayUnits } from "../../../tools/displayUnits";
|
||||
import { t } from "../../../i18n";
|
||||
import type { TranslationKey } from "../../../i18n";
|
||||
|
||||
/**
|
||||
* Zeichnet die Werkzeug-Vorschau: Vorschau-Formen (gestrichelte Akzentlinien /
|
||||
@@ -85,7 +87,7 @@ export function DraftOverlay({
|
||||
)}
|
||||
{/* Snap-Marker + optionale Ortho-Hilfslinie. */}
|
||||
{draft.snap && (
|
||||
<SnapMarker snap={draft.snap} toScreen={toScreen} size={markSize} color={snapColor} />
|
||||
<SnapMarker snap={draft.snap} toScreen={toScreen} size={markSize} color={snapColor} vbPerPx={vbPerPx} />
|
||||
)}
|
||||
{/* Maß-/Winkel-HUD am Cursor (VW-Stil `L: … W: …`, oder einfacher Text). */}
|
||||
{draft.hud && <DraftHud hud={draft.hud} toScreen={toScreen} vbPerPx={vbPerPx} hudFields={hudFields} units={units} />}
|
||||
@@ -261,14 +263,18 @@ function AngleGuide({
|
||||
}
|
||||
|
||||
/** Marker-Glyph je Snap-Art + (bei ortho) eine gestrichelte Hilfslinie. */
|
||||
const SNAP_TIP_KINDS = new Set(["endpoint", "midpoint", "intersection", "center", "quadrant", "onEdge", "perpendicular", "tangent", "parallel", "extension", "divide"]);
|
||||
|
||||
function SnapMarker({
|
||||
snap,
|
||||
toScreen,
|
||||
size,
|
||||
color,
|
||||
vbPerPx,
|
||||
}: {
|
||||
snap: SnapResult;
|
||||
toScreen: (v: Vec2) => Vec2;
|
||||
vbPerPx: number;
|
||||
size: number;
|
||||
/** Farbe des Snap-Glyphs (einstellbar, Default = Akzent „Sora"). */
|
||||
color: string;
|
||||
@@ -281,8 +287,15 @@ function SnapMarker({
|
||||
const glyphStyle = { stroke: color };
|
||||
const helperStyle = { stroke: color };
|
||||
const fillStyle = { stroke: color, fill: color };
|
||||
// [287] Fangart als Kurztext am Marker (Archicad/VW-Art): sonst bleibt unklar, woran der Zeiger gerade hängt.
|
||||
const tip = SNAP_TIP_KINDS.has(snap.kind) ? t(`snap.tip.${snap.kind}` as TranslationKey) : null;
|
||||
return (
|
||||
<g className="snap-marker" data-snap-kind={snap.kind}>
|
||||
{tip && (
|
||||
<text className="snap-tip" x={s.x + 9 * vbPerPx} y={s.y - 7 * vbPerPx} fontSize={11 * vbPerPx} strokeWidth={3 * vbPerPx}>
|
||||
{tip}
|
||||
</text>
|
||||
)}
|
||||
{(snap.kind === "ortho" || snap.kind === "extension") && snap.refA && (
|
||||
<line
|
||||
className="snap-helper-line"
|
||||
|
||||
Reference in new issue
Block a user