[36][34][38] Merge: View Range je Geschoss, Ansichtsvorlagen, assoziative Bemassung
Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
29 files changed
+1281
-40
No files matched your search
@@ -52,6 +52,7 @@ import {
|
||||
ColumnSection,
|
||||
SectionLineSection,
|
||||
DetailRefSection,
|
||||
DimRefsSection,
|
||||
} from "./ObjectInfoPanel";
|
||||
import { SurfacePatternPlacement } from "./SurfacePatternPlacement";
|
||||
|
||||
@@ -793,6 +794,7 @@ export function AttributesPanel() {
|
||||
{sel.extrudedSolid && <ExtrudedSolidSection solid={sel.extrudedSolid} host={host} />}
|
||||
{sel.column && <ColumnSection column={sel.column} host={host} />}
|
||||
{sel.detailRef && <DetailRefSection detailRef={sel.detailRef} drawingId={sel.id} host={host} />}
|
||||
{sel.dimRefs && <DimRefsSection refs={sel.dimRefs} drawingId={sel.id} host={host} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import { t } from "../i18n";
|
||||
import type { TranslationKey } from "../i18n";
|
||||
import { flattenCategories, formatM } from "../model/types";
|
||||
import type {
|
||||
DimRef,
|
||||
Dormer,
|
||||
DormerKind,
|
||||
DrawingLevel,
|
||||
@@ -586,6 +587,44 @@ export function SectionLineSection({
|
||||
);
|
||||
}
|
||||
|
||||
// ── Assoziative Bemassung ([38]) ────────────────────────────────────────────
|
||||
// Je Punkt: frei, angehängt (Merkmal + Element) oder Bezug verloren; „Bemassung lösen" entfernt alle.
|
||||
export function DimRefsSection({
|
||||
refs,
|
||||
drawingId,
|
||||
host,
|
||||
}: {
|
||||
refs: (DimRef | null)[];
|
||||
drawingId: string;
|
||||
host: ReturnType<typeof usePanelHost>;
|
||||
}) {
|
||||
const lost = refs.some((r) => r?.lost);
|
||||
return (
|
||||
<>
|
||||
<div className="objinfo-sep" />
|
||||
<div className="objinfo-section-label">{t("objinfo.dimRefs.section")}</div>
|
||||
{refs.map((r, i) => (
|
||||
<div className="objinfo-field" key={i} data-testid="dim-ref">
|
||||
<span className="objinfo-flabel">{t("objinfo.dimRefs.point", { n: i + 1 })}</span>
|
||||
<span className="objinfo-fval">
|
||||
{!r
|
||||
? t("objinfo.dimRefs.free")
|
||||
: r.lost
|
||||
? t("objinfo.dimRefs.lost", { id: r.id })
|
||||
: `${t(`objinfo.dimRefs.feature.${r.feature}` as TranslationKey)} · ${r.id}${r.id2 ? ` / ${r.id2}` : ""}`}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
{lost && <div className="objinfo-measure-hint">{t("objinfo.dimRefs.lostHint")}</div>}
|
||||
<div className="objinfo-field">
|
||||
<button type="button" className="objinfo-btn" onClick={() => host.onDetachDimension(drawingId)}>
|
||||
{t("cmd.dimdetach.label")}
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// ── Detail-/Schnitt-Verweis-Attribut-Abschnitt ──────────────────────────────
|
||||
// Bezeichner (obere Zeile) + Blattverknüpfung (Dropdown der Project.layouts,
|
||||
// „kein Verweis" löst sie); ohne Verknüpfung zusätzlich ein manueller
|
||||
|
||||
@@ -285,6 +285,8 @@ export interface PanelHostValue {
|
||||
onSetDetailRefSheetLayout: (drawingId: string, sheetLayoutId: string | undefined) => void;
|
||||
/** Manueller Blattname-Platzhalter, nur relevant OHNE Blattverknüpfung. */
|
||||
onSetDetailRefSheetLabel: (drawingId: string, sheetLabel: string) => void;
|
||||
/** „Bemassung lösen" ([38]): Bezüge der Bemassung entfernen, Punkte bleiben. */
|
||||
onDetachDimension: (drawingId: string) => void;
|
||||
onSetHatchPlacement: (
|
||||
drawingId: string,
|
||||
patch: { angleDeg?: number | null; scale?: number | null; origin?: Vec2 | null },
|
||||
|
||||
Reference in new issue
Block a user