[77] Objekt-Info: Fläche geschlossener 2D-Formen (Bögen exakt, abzüglich Löcher)

This commit is contained in:
Claude committed 2026-11-05 04:30:23 +00:00
1 parent 9afa9204b4
commit c288dd31f1
7 files changed
+82 -3

No files matched your search

+2
View File
@@ -42,6 +42,8 @@ describe("deriveSelection (Kern)", () => {
expect(l.bbox).toEqual({ minX: 0, minY: -2, maxX: 3, maxY: 0 });
const r = deriveSelection(p, { drawings: ["r"] })!;
expect(r.closed).toBe(true);
expect(r.area).toBe(3);
expect(l.area).toBeUndefined();
expect(r.fillHatchId).toBe("h");
expect(r.effectiveHatchId).toBe("h");
expect(deriveSelection(p, { drawings: ["nix"] })).toBeNull();
+2
View File
@@ -457,6 +457,8 @@ export interface SelectionInfo {
effectiveHatchId?: string | null;
/** Ob die Form geschlossen ist (rect/circle/closed polyline) — nur Drawing2D. */
closed?: boolean;
/** Fläche in m² (geschlossene Form: rect/circle/ellipse/Polylinie inkl. Bögen, netto ohne Löcher) — nur Drawing2D. */
area?: number;
/**
* Ob das Element ein Bild ist (Drawing2D `{shape:"image"}`, Layout-
* Annotation `kind:"image"` ODER Kontext-Objekt `type:"image"`) — steuert