[94][95][96] Standards: SIA-400-Baustoffe mit Ansichtsschraffur, Linientypen, „Standards laden“
- Kern standards.rs: 33 Baustoffe/Bekleidungen (Schnittschraffur, Füll-/Ansichtsfarbe, Textur, λ, Rohdichte, VKF-RF), Schraffuren, Linientypen, Wand-/Decken-/Dachaufbauten; merge_ops ergänzt nur Fehlendes - Kern surface_pattern.rs: Ansichtsschraffur (Lattung, Boden-Deckel, Läuferverband, Schindeln, Trapezblech, Naturstein polygonal, Plattenteilung), massstabsabhängig ausgedünnt; in Ansicht (Wände, Dächer) und Dachaufsicht; je Element drehbar/versetzbar - Modell: Component.lambda/density/fireClass/elevationColor/surfacePattern/standardId, Wall/Roof.surfacePatternAngle/Offset - render2d/Chunk-Pfad: Punkte im Strichmuster bleiben (Strichpunkt war Strichlinie), Bögen mit Punkten über den Strichpfad, Strichmuster skalieren mit dem Massstab; SVG runde Kappen bei Punkten - Neue Projekte mit Standards, Ressourcen-Manager „Standards laden“, Bauteil-Felder, Textur von ambientCG laden
This commit is contained in:
35 files changed
+1707
-33
No files matched your search
@@ -57,6 +57,7 @@ import {
|
||||
PEN_FALLBACK_COLOR,
|
||||
PEN_FALLBACK_WEIGHT,
|
||||
} from "../model/penSets";
|
||||
import { standardsMergeOps } from "../model/standards";
|
||||
import { reorderByIds } from "../model/reorder";
|
||||
import { transformMutation } from "../tools/transform";
|
||||
import type { CopyMode, TransformOp, TransformSelection } from "../tools/transform";
|
||||
@@ -182,6 +183,8 @@ export interface ProjectSlice {
|
||||
patchPenSetWeight: (setId: string, penId: string, weight: number) => void;
|
||||
/** Ersetzt `pens`/legt einen neuen Satz mit der 255er-CAD-Standardpalette an (s. `model/penSets.ts`). */
|
||||
seedStandardPenSet: () => void;
|
||||
/** Ergänzt die fehlenden SIA-400-Standards (Baustoffe, Schraffuren, Linientypen, Aufbauten; [94]–[96]). */
|
||||
loadStandards: () => void;
|
||||
|
||||
// ── Benutzerdefinierte Farbpaletten (s. model/types.ts::CustomPalette) ────
|
||||
addCustomPalette: () => void;
|
||||
@@ -1022,6 +1025,7 @@ export function createProjectSlice(
|
||||
}),
|
||||
|
||||
seedStandardPenSet: () => applyChange((p) => seedStandardPenSetOps(p)),
|
||||
loadStandards: () => applyChange((p) => standardsMergeOps(p)),
|
||||
|
||||
addCustomPalette: () =>
|
||||
applyChange(
|
||||
|
||||
@@ -787,6 +787,10 @@ export function usePanelHostBase(opts: {
|
||||
if (selection?.kind === "wall")
|
||||
updateWall(selection.id, { referenceOffset: offset ?? undefined });
|
||||
},
|
||||
onSetSurfacePatternPlacement: (patch) => {
|
||||
if (selection?.kind === "wall") updateWall(selection.id, patch, "surface-pattern");
|
||||
else if (selection?.kind === "roof") updateRoof(selection.id, patch, "surface-pattern");
|
||||
},
|
||||
onSetWallSliceTermination: (termination) => {
|
||||
if (selection?.kind === "wall")
|
||||
// "both" ist der Default ⇒ als undefined speichern (Alt-Projekt-Parität).
|
||||
|
||||
@@ -112,6 +112,7 @@ export function useProjectActions(
|
||||
const patchPenSetColor = useStore((s) => s.patchPenSetColor);
|
||||
const patchPenSetWeight = useStore((s) => s.patchPenSetWeight);
|
||||
const seedStandardPenSet = useStore((s) => s.seedStandardPenSet);
|
||||
const loadStandards = useStore((s) => s.loadStandards);
|
||||
const addCustomPalette = useStore((s) => s.addCustomPalette);
|
||||
const renameCustomPalette = useStore((s) => s.renameCustomPalette);
|
||||
const deleteCustomPalette = useStore((s) => s.deleteCustomPalette);
|
||||
@@ -419,6 +420,7 @@ export function useProjectActions(
|
||||
patchPenSetColor,
|
||||
patchPenSetWeight,
|
||||
seedStandardPenSet,
|
||||
loadStandards,
|
||||
addCustomPalette,
|
||||
renameCustomPalette,
|
||||
deleteCustomPalette,
|
||||
|
||||
@@ -39,6 +39,7 @@ import {
|
||||
import type { LockInfo } from "../native/projectFile";
|
||||
import { addRecentProject, removeRecentProject } from "./recentProjects";
|
||||
import { emptyProject, sampleProject } from "../model/sampleProject";
|
||||
import { withStandards } from "../model/standards";
|
||||
import type { Project } from "../model/types";
|
||||
import type { PlanViewHandle } from "../views/plan/PlanView";
|
||||
|
||||
@@ -366,8 +367,10 @@ export function useProjectFileActions(
|
||||
// `guardDiscard`: bei ungespeicherten Änderungen erst der Dialog, s. o.
|
||||
const onNewProject = () => guardDiscard(() => {
|
||||
releaseCurrentProjectLock();
|
||||
getState().loadProject(emptyProject);
|
||||
lastSavedProjectRef.current = emptyProject;
|
||||
// Neue Projekte bringen die SIA-400-Standards mit ([94]–[96]).
|
||||
const next = withStandards(emptyProject);
|
||||
getState().loadProject(next);
|
||||
lastSavedProjectRef.current = next;
|
||||
});
|
||||
|
||||
// Übernimmt ein neues, noch UNGESPEICHERTES Projekt aus Vorlagen-Inhalt
|
||||
@@ -390,7 +393,7 @@ export function useProjectFileActions(
|
||||
// Startzustand, s. state/projectSlice.ts).
|
||||
const onNewProjectFromSample = () => guardDiscard(() => {
|
||||
releaseCurrentProjectLock();
|
||||
const next = structuredClone(sampleProject);
|
||||
const next = withStandards(structuredClone(sampleProject));
|
||||
getState().loadProject(next);
|
||||
lastSavedProjectRef.current = next;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user