Merge branch 'worktree-agent-ab029230363ec44f6' into claude/practical-noether-1hb2s1
# Conflicts: # TODO.md # src-tauri/core/src/cmd_transform.rs # src/plan/__golden__/komplex-ansicht-ansicht-sued.txt # src/plan/__golden__/komplex-grundriss-eg-100.txt # src/plan/__golden__/komplex-grundriss-eg-50.txt # src/plan/__golden__/komplex-grundriss-og-50.txt # src/state/projectSlice.ts
This commit is contained in:
51 files changed
+1304
-231
No files matched your search
+14
-3
@@ -48,6 +48,8 @@ export type GripRequest =
|
||||
| { op: "ringInsert"; kind: RingKind; id: string; seg: number; pt: P }
|
||||
| { op: "ringDelete"; kind: RingKind; id: string; index: number }
|
||||
| { op: "ringTidy"; kind: RingKind; id: string; index: number; tol?: number }
|
||||
// [191] Bogen-Scheitel einer Umriss-Kante (Decke, Raum, Dach samt Höfen; `seg` wie bei `ringInsert`).
|
||||
| { op: "ringArc"; kind: "roof" | "ceiling" | "room"; id: string; seg: number; pt: P }
|
||||
// [151] Parameter-Griff einer Podesttreppe (Kern `grip_drag::stair_param_drag`).
|
||||
| { op: "stairParam"; id: string; index: number; pt: P }
|
||||
| { op: "excavationEdge"; id: string; a: number; b: number; delta: P }
|
||||
@@ -117,9 +119,18 @@ function edges(verts: readonly Vec2[], closed: boolean, bulge: readonly number[]
|
||||
return out;
|
||||
}
|
||||
|
||||
/** Geschlossener Ring → Kanten-Griffe mit Aussennormale (vom Eckpunkt-Mittel weg), inkl. Schlusskante. */
|
||||
export function ringEdges(verts: readonly Vec2[], owner: Owner): EdgeGrip[] {
|
||||
return edges(verts, true, null, owner);
|
||||
/**
|
||||
* Geschlossener Ring → Kanten-Griffe mit Aussennormale (vom Eckpunkt-Mittel weg), inkl. Schlusskante.
|
||||
* [191] `bulge` (je Kante): Bogenkanten haben keinen Kanten-Griff (sie haben ihren Scheitel-Griff).
|
||||
*/
|
||||
export function ringEdges(verts: readonly Vec2[], owner: Owner, bulge?: readonly number[]): EdgeGrip[] {
|
||||
return edges(verts, true, bulge ?? null, owner);
|
||||
}
|
||||
|
||||
/** [191] Scheitel (Bogenmitte) der Kante a → b mit `bulge`; gerade: Kantenmitte. */
|
||||
export function arcApex(a: Vec2, b: Vec2, bulge: number | undefined): Vec2 {
|
||||
const k = Number.isFinite(bulge) ? (bulge as number) / 2 : 0;
|
||||
return { x: (a.x + b.x) / 2 - (b.y - a.y) * k, y: (a.y + b.y) / 2 + (b.x - a.x) * k };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,6 +130,8 @@ export interface RoomAreaOptions {
|
||||
* dem SIA-416-Grenzwert, die nicht zur anrechenbaren Fläche zählen. Default 0.
|
||||
*/
|
||||
deduction?: number;
|
||||
/** [191] Bögen je Kante (`Room.boundaryBulge`): Fläche und Umfang exakt. */
|
||||
bulge?: readonly number[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +143,7 @@ export function evaluateRoom(
|
||||
category: SiaCategory,
|
||||
options: RoomAreaOptions = {},
|
||||
): RoomAreaResult {
|
||||
const r = core().room_evaluate(new FlatWriter().pts(polygon).done(), options.deduction ?? 0);
|
||||
const r = core().room_evaluate(new FlatWriter().pts(polygon).done(), options.deduction ?? 0, Float64Array.from(options.bulge ?? []));
|
||||
return {
|
||||
grossArea: r[0],
|
||||
netArea: r[1],
|
||||
|
||||
Reference in new issue
Block a user