[149] Baum als eigenes Objekt: Modell, Werkzeug, Plan/Schnitt/Ansicht/3D, Schatten, IFC

Rust-Modell `Tree` (Stamm-/Kronendurchmesser, Kronenansatz, Höhe, Form rund/oval/säulenförmig/
kegelförmig, Bestand bestehend/neu/zu fällen, Laub/Nadel, Art) und `Project.trees` (KNOWN_KEYS,
Typen neu erzeugt). Geometrie `core/src/tree.rs` (Kronenprofil je Form, Fuss auf dem Gelände).
Grundriss-Planzeichen (Wellen-/Zackenkranz, Stamm, neu rot, zu fällen gelb gestrichelt und
gekreuzt), Silhouette in Schnitt/Ansicht, 3D-Stamm + Krone (wenige Polygone), Schatten nach
eigener Höhe/Krone in sun.rs (Kreise der Ebene 13 bleiben Fallback), IFC als
IfcGeographicElement (IFC2x3: IfcBuildingElementProxy) mit Mengen. Werkzeug „Baum“, Befehl
„Kreise in Bäume umwandeln“, Objekt-Info, Griffe, Auswahl in 2D/3D, Verschieben/Kopieren/
Löschen/Zwischenablage mit Undo. Musterhaus komplex unverändert.
This commit is contained in:
Claude committed 2026-11-06 21:55:45 +00:00
1 parent a269c00614
commit a98a4281ac
51 files changed
+1869 -38

No files matched your search

+2 -1
View File
@@ -8,7 +8,7 @@ import { flattenCategories } from "../model/types";
/** Art eines auswählbaren Objekts an einer Klickstelle (Reihenfolge = Standard-Priorität). */
export type PickKind =
| "section" | "opening" | "wall" | "column" | "drawing" | "solid"
| "ceiling" | "stair" | "room" | "roof" | "site" | "context";
| "tree" | "ceiling" | "stair" | "room" | "roof" | "site" | "context";
type WithCategory = { id: string; categoryCode?: string };
@@ -25,6 +25,7 @@ function collection(project: Project, kind: PickKind): readonly WithCategory[] {
case "column": return p.columns ?? [];
case "context": return p.context ?? [];
case "solid": return p.extrudedSolids ?? [];
case "tree": return p.trees ?? [];
case "section":
case "site": return [];
}
+6
View File
@@ -104,6 +104,12 @@ export interface PickColumnMesh {
columnId: string;
}
/** [149] Baum für den Raycast: WORLD-Dreiecke von Stamm und Krone (x, Höhe, y). */
export interface PickTreeMesh {
tris: ReadonlyArray<readonly [Vec3, Vec3, Vec3]>;
treeId: string;
}
/**
* [137] Freier Körper (`extrudedSolids`, Loft/Rotation/Abzug/B-Rep) für den Raycast: WORLD-Dreiecke
* (x, Höhe, y). Der Kern liefert das Prisma über dem Umriss; sobald das truck-Netz geladen ist, ersetzt
+6 -2
View File
@@ -44,7 +44,7 @@ import type { Project, Vec2 } from "../model/types";
import type { DetailLevel } from "../model/viewTypes";
import { documentFor } from "../core/document";
import { coreEpoch } from "../engine/coreWasm";
import type { PickOpening, PickRoof, PickStair, PickContextMesh, PickColumnMesh, PickSolidMesh, PickOpeningMesh, PickDrawingSeg, PickStairMesh, PickDrawingMesh } from "./pickTypes";
import type { PickOpening, PickRoof, PickStair, PickContextMesh, PickColumnMesh, PickSolidMesh, PickOpeningMesh, PickDrawingSeg, PickStairMesh, PickDrawingMesh, PickTreeMesh } from "./pickTypes";
import {
type RMesh,
type RModel3d,
@@ -334,6 +334,8 @@ export function pickGeometry(
drawings: PickDrawingSeg[];
stairMeshes: PickStairMesh[];
drawingMeshes: PickDrawingMesh[];
/** [149] Bäume (Stamm + Krone). */
trees: PickTreeMesh[];
} {
const g = documentFor(project).query("pickGeometry", [explodeGap(explode)]) as ReturnType<typeof pickGeometry>;
// [137] Freie Körper: das geladene truck-Netz (Loft, Rotation, Verjüngung, Rundung) statt der Prisma-Näherung des Kerns.
@@ -389,8 +391,10 @@ export function selectionHighlightLines(
/** [137] Stützen und freie Körper (Prisma-Umriss). */
columnIds: string[] = [],
solidIds: string[] = [],
/** [149] Bäume (Kronen-Zylinder vom Fuss bis zur Spitze). */
treeIds: string[] = [],
): Float32Array {
const sel = { walls: wallIds, ceilings: ceilingIds, openings: openingIds, stairs: stairIds, roofs: roofIds, context: contextObjectIds, columns: columnIds, solids: solidIds };
const sel = { walls: wallIds, ceilings: ceilingIds, openings: openingIds, stairs: stairIds, roofs: roofIds, context: contextObjectIds, columns: columnIds, solids: solidIds, trees: treeIds };
if (Object.values(sel).every((l) => l.length === 0)) return new Float32Array(0);
// Gerechnet im Kern (`highlight3d.rs`); Antwort f32-LE.
const b = documentFor(project).queryBin("selectionHighlight", [], JSON.stringify({ ...sel, rgb, explode: explodeGap(explode) }));