[140] Tusche als Standard: Schwarz-Weiss behält Grautöne, Schraffur, Schatten und Luftbilder; Ansicht ohne Materialfarben; grob: Türen mit Bogen, Fenster zwei Striche
This commit is contained in:
9 files changed
+192
-48
No files matched your search
+12
-6
@@ -5,10 +5,11 @@
|
||||
// dossier-cli <projekt.obp> info
|
||||
// dossier-cli <projekt.obp> validate
|
||||
// dossier-cli <projekt.obp> migrate [--out neu.obp]
|
||||
// dossier-cli <projekt.obp> plan [--level EG] [--ceiling] [--scale 100] [--sketch] [--hatch] [--format svg|json] [--out eg.svg]
|
||||
// dossier-cli <projekt.obp> plan [--level EG] [--ceiling] [--scale 100] [--sketch] [--hatch] [--color] [--format svg|json] [--out eg.svg]
|
||||
// json = render2d-Szene (planToRenderScene)
|
||||
// dossier-cli <projekt.obp> section <Name> [--sketch] [--hatch] [--out schnitt.svg] (--format json: render2d-Szene)
|
||||
// dossier-cli <projekt.obp> elevation <Name> [--sketch] [--hatch] [--out ansicht.svg] (--sketch: Skizzenstil [67])
|
||||
// dossier-cli <projekt.obp> section <Name> [--sketch] [--hatch] [--color] [--out schnitt.svg] (--format json: render2d-Szene)
|
||||
// dossier-cli <projekt.obp> elevation <Name> [--sketch] [--hatch] [--color] [--out ansicht.svg] (--sketch: Skizzenstil [67])
|
||||
// --color: Darstellung „Farbig" statt Tusche (Standard, [140])
|
||||
// dossier-cli <projekt.obp> ifc [--ebkph] [--ebenen] (IFC mit eBKP-H-Hauptgruppen bzw. Modell-Ebenen als Klassifikation)
|
||||
// --schema 4|2x3: IFC4 (Standard) oder IFC2x3 (Coordination View 2.0)
|
||||
// dossier-cli <projekt.obp> dxf [--binary] [--scale 100] [--dim-unit cm] [--layout]|dwg|ifc|step|obj|stl|glb|gltf|schedule [--openings|--elements] [--format json|csv|svg|pdf]|kennzahlen [--sia416] [--ivhb] [--format json|csv|svg|pdf] [--agsf m2] [--gruenflaeche m2] [--agf-basis gf|ngf|nf] [--untergeschosse]|raumprogramm [--import tabelle] [--sheet name|nr] [--mode replace|append] [--tolerance %] [--generate] [--format json|csv|svg|pdf] [--save projekt.obp]|sun [--level EG] [--out datei]
|
||||
@@ -446,6 +447,11 @@ async function importAny(path: string, args: Args): Promise<Project> {
|
||||
return fail(`Eingabeformat nicht unterstützt: .${ext} (obp, dxf, dwg, ifc, pdf, obj, stl, gltf, glb, ply)`);
|
||||
}
|
||||
|
||||
/** [140] Darstellung wie der App-Standard „Tusche" (Schwarz-Weiss); `--color` = „Farbig". */
|
||||
function inkArg(args: Args): boolean {
|
||||
return !(args.flags.has("color") && args.flags.get("color") !== "false");
|
||||
}
|
||||
|
||||
/** `convert <eingabe> <ausgabe>`: Eingabe nach Endung lesen, Ausgabe nach Endung schreiben, dann `--cmd` ausführen. */
|
||||
async function convert(input: string | undefined, output: string | undefined, args: Args): Promise<number> {
|
||||
if (!input || !output) {
|
||||
@@ -606,7 +612,7 @@ async function execute(project: Project, file: string, command: string, rest: st
|
||||
if (!own) planProject = { ...project, drawingLevels: [...project.drawingLevels, lvl] };
|
||||
}
|
||||
// Massstab geht in die Plan-Erzeugung ein (Bemassung in Papier-mm, Strichstärken nach Massstab).
|
||||
const plan = generatePlan(withSketch(planProject, lvl.id, args), lvl.id, allCodes, undefined, "mittel", false, false, true, scale);
|
||||
const plan = generatePlan(withSketch(planProject, lvl.id, args), lvl.id, allCodes, undefined, "mittel", false, inkArg(args), true, scale);
|
||||
if (args.flags.get("format") === "json") {
|
||||
out(args, JSON.stringify(planToRenderScene(plan, scale)), `${lvl.name}.scene.json`);
|
||||
return 0;
|
||||
@@ -628,9 +634,9 @@ async function execute(project: Project, file: string, command: string, rest: st
|
||||
const o = await computeSection(sp, lvl);
|
||||
if (!o) fail("keine gültige Schnittlinie");
|
||||
// Wie die App: verdeckte Kanten nach der Ebene, geschnittene Fenster/Türen.
|
||||
plan = generateSectionPlan(o, false, { visibleCodes: allCodes, hiddenLines: lvl.hiddenLines, openings: true, scaleDenominator: scale });
|
||||
plan = generateSectionPlan(o, inkArg(args), { visibleCodes: allCodes, hiddenLines: lvl.hiddenLines, openings: true, scaleDenominator: scale });
|
||||
} else {
|
||||
plan = generateElevationPlan(sp, lvl, { scaleDenominator: scale });
|
||||
plan = generateElevationPlan(sp, lvl, { scaleDenominator: scale, mono: inkArg(args) });
|
||||
if (!plan) fail("keine gültige Ansichtslinie");
|
||||
}
|
||||
if (args.flags.get("format") === "json") {
|
||||
|
||||
@@ -243,11 +243,11 @@ export function generatePlan(
|
||||
/**
|
||||
* Kompakte Linien-Unterlage statt dauerhafter 'line'-Primitive (s.
|
||||
* {@link UnderlayGroup}) — NUR für die interaktive GPU-Ansicht. Aus bei
|
||||
* Export/mono (reiner Schwarz-Weiss-Plan ohne Unterlage).
|
||||
* Export/Druck.
|
||||
*/
|
||||
compactUnderlay = false,
|
||||
): Plan {
|
||||
const compact = compactUnderlay && !mono && !forPrint;
|
||||
const compact = compactUnderlay && !forPrint;
|
||||
// Blatt-Ebene eines Layouts (Papier 1:1): ohne projektglobale Zutaten (Kontext, Luftbilder,
|
||||
// Schnittlinien, Schatten, Baurecht) — die gehören zum Modell, nicht aufs Papier.
|
||||
if (project.drawingLevels.some((l) => l.id === floorId && l.layoutId)) includeGlobal = false;
|
||||
@@ -275,12 +275,12 @@ export function generatePlan(
|
||||
// Kompakte Linien-Unterlage (s. {@link UnderlayGroup}): die Linien einfacher Zeichnungen fehlen
|
||||
// im Puffer und entstehen erst bei Bedarf, PRO KATEGORIE gruppiert — das Ein-/Ausblenden einer
|
||||
// Ebene entfernt dann nur deren Gruppe, die Chunks aller anderen Ebenen bleiben gültig.
|
||||
const underlay = compact ? underlayGroups(project, dom, scaleDenominator) : [];
|
||||
const underlay = compact ? underlayGroups(project, dom, scaleDenominator, mono) : [];
|
||||
|
||||
// Georeferenzierte Luftbilder als Hintergrund-Ebenen (nur interaktive Ansicht,
|
||||
// nicht Teil der Vektor-Primitive) — im Mono-Modus ausgeblendet (reiner S/W-Plan).
|
||||
// nicht Teil der Vektor-Primitive) — auch in Schwarz-Weiss, dem Standard ([140]).
|
||||
// Projektglobal (nicht je Geschoss), s. `includeGlobal` oben.
|
||||
const backgroundImages: PlanImage[] = !includeGlobal || mono
|
||||
const backgroundImages: PlanImage[] = !includeGlobal
|
||||
? []
|
||||
: (project.context ?? [])
|
||||
.filter((o): o is Extract<ContextObject, { type: "image" }> => o.type === "image")
|
||||
@@ -599,7 +599,7 @@ function readPlanMulti(
|
||||
* Domäne der 2D-Zeichnungen): je (gedimmt, Ebene) die Zeichnungen, deren Linien der Plan-Puffer
|
||||
* nicht enthält. `build` holt die Linien einer Teilmenge bei Bedarf (`drawingLines`).
|
||||
*/
|
||||
function underlayGroups(project: Project, dom: DomainPrims, scaleDenominator: number): UnderlayGroup[] {
|
||||
function underlayGroups(project: Project, dom: DomainPrims, scaleDenominator: number, mono: boolean): UnderlayGroup[] {
|
||||
const bytes = documentFor(project).queryBin("drawingUnderlay", [1], dom.args);
|
||||
if (bytes.byteLength % 8 !== 0) throw new Error("drawingUnderlay: unerwartete Antwort");
|
||||
const f = new Float64Array(bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength));
|
||||
@@ -614,7 +614,7 @@ function underlayGroups(project: Project, dom: DomainPrims, scaleDenominator: nu
|
||||
return index.get(d);
|
||||
};
|
||||
// Alles, wovon `build` abhängt: ändert sich eine davon, werden die GPU-Chunks neu erzeugt.
|
||||
const ctx = [project.lineStyles, project.hatches, layersStyleSig(project.layers), scaleDenominator, project.overrideRules, project.scaleLineWeights];
|
||||
const ctx = [project.lineStyles, project.hatches, layersStyleSig(project.layers), scaleDenominator, project.overrideRules, project.scaleLineWeights, mono];
|
||||
const out: UnderlayGroup[] = [];
|
||||
let k = 1;
|
||||
for (let g = 0; g < f[0]; g++) {
|
||||
@@ -624,7 +624,8 @@ function underlayGroups(project: Project, dom: DomainPrims, scaleDenominator: nu
|
||||
for (let i = 0; i < n; i++) drawings[i] = all[f[k + 2 + i]];
|
||||
k += 2 + n;
|
||||
const buildBuf = (list: Drawing2D[]): DecodedPlanBuf => {
|
||||
const args = [scaleDenominator, catGreyed ? 1 : 0];
|
||||
// Schalter: Bit 1 = gedimmt, Bit 2 = Schwarz-Weiss ([140]).
|
||||
const args = [scaleDenominator, (catGreyed ? 1 : 0) + (mono ? 2 : 0)];
|
||||
for (const d of list) {
|
||||
const i = indexOf(d);
|
||||
if (i !== undefined) args.push(i);
|
||||
|
||||
@@ -41,8 +41,8 @@ export interface ViewSlice {
|
||||
// nicht im Projekt) und der Abstand je Geschoss in Metern.
|
||||
explode3d: boolean;
|
||||
explode3dGap: number;
|
||||
// Farb-Modus des Grundrisses: "color" = Kategorie-/Element-Farben (heute),
|
||||
// "mono" = reiner Schwarz-Weiss-Plan (Tinte, keine Farb-/Schraffurfarben).
|
||||
// Farb-Modus von Grundriss/Schnitt/Ansicht: "mono" = Tusche (Standard, [140]: Schwarz/Grau, bunte
|
||||
// Farben werden Tinte bzw. Papier, Grautöne wie Schatten bleiben), "color" = „Farbig" (Materialfarben).
|
||||
planColorMode: "color" | "mono";
|
||||
// Wand-Achslinien im Grundriss.
|
||||
referenceLines: boolean;
|
||||
@@ -97,7 +97,7 @@ export function createViewSlice(api: StoreApi<ViewSlice>): ViewSlice {
|
||||
grid3dVisible: true,
|
||||
explode3d: false,
|
||||
explode3dGap: 3,
|
||||
planColorMode: "color",
|
||||
planColorMode: "mono",
|
||||
referenceLines: false,
|
||||
lineMode: "display",
|
||||
scaleDenominator: 100,
|
||||
|
||||
Reference in new issue
Block a user