Mass-Style Preset (Raum-Rundung + Dim-Format) + Rundung als Dropdown
Frontend: - RaumProperties Rundung: 5er-Button-Reihe → Dropdown mit "Aus Mass-Style" als erstem Eintrag (leer = Default aus aktivem Preset uebernehmen) - Dach-Typ + Mansarde-Variante: text-only Button-Reihen → Dropdowns - Mass-Style-Section neu im DimensionenApp ganz oben: - Picker fuer aktives Preset - + (neu mit aktuellen Werten als Vorlage) / Loeschen - Inline-Editor: Name, Raum-Rundung, Mass-Dezimalstellen, Mass-Einheit Backend (rhino/mass_style.py — neu): - doc.Strings["dossier_mass_styles"]: JSON-Liste der Presets - doc.Strings["dossier_mass_style_active"]: aktive Preset-ID - list_presets/save_preset/delete_preset/get_active_id/set_active_id - Convenience: raum_rundung_default(doc), dim_dezimalstellen_default(doc) - Default-Presets bei erster Initialisierung: 1:50 / 1:100 / 1:500 elemente.py: - _read_meta: raum_rundung leer wenn UserString fehlt (vorher gezwungen "0.1") - _resolve_raum_rundung(meta, doc): per-Raum-Override > Mass-Style-Default - _make_raum_stamp_text + state-send nutzen Resolver - State sendet rundung (raw, kann "" sein) + rundungEffective + areaFmt damit React-Panel "Aus Mass-Style" anzeigen kann dimensionen.py: - Bridge-Endpoints MASS_STYLE_SET_ACTIVE / SAVE / DELETE - _broadcast_raum_regen: bei Preset-Wechsel alle Raeume queuen → Stempel- Flaechen kommen mit neuer Default-Rundung - _compute_state liefert massStyles + massStyleActive + signature update NOCH NICHT verdrahtet: Mass-Linien-Formatierung (dimDezimalstellen, dimEinheit) — Datenmodell ist da, Anwendung auf Rhino-Dimension-Renderer folgt in einem naechsten Schritt. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+26
-48
@@ -848,21 +848,17 @@ function RaumProperties({ raum, geschosse, onUpdate, onDelete, hatchPatterns })
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<span style={{ fontSize: 10, color: 'var(--text-muted)', width: 60 }}>Rundung</span>
|
||||
<div style={{ flex: 1, display: 'flex', gap: 2 }}>
|
||||
{RAUM_RUNDUNGEN.map(r => (
|
||||
<button key={r}
|
||||
onClick={() => onUpdate({ rundung: r })}
|
||||
className={raum.rundung === r ? 'btn-contained' : 'btn-outlined'}
|
||||
style={{ flex: 1, padding: '3px 4px', fontSize: 10 }}
|
||||
title={r === 'exakt' ? '2 Nachkommastellen, ohne Rundung'
|
||||
: r === '0.01' ? 'auf 0.01 m²'
|
||||
: r === '0.1' ? 'auf 0.1 m²'
|
||||
: r === '0.5' ? 'auf 0.5 m²'
|
||||
: 'auf ganze m²'}>
|
||||
{r}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<select value={raum.rundung || ''}
|
||||
onChange={(e) => onUpdate({ rundung: e.target.value })}
|
||||
style={{ flex: 1, fontSize: 11 }}
|
||||
title="Rundung der Flächenangabe. Leer = Default aus Mass-Style.">
|
||||
<option value="">Aus Mass-Style</option>
|
||||
<option value="exakt">Exakt (2 Nachkommastellen)</option>
|
||||
<option value="0.01">auf 0.01 m²</option>
|
||||
<option value="0.1">auf 0.1 m²</option>
|
||||
<option value="0.5">auf 0.5 m²</option>
|
||||
<option value="1">auf 1 m²</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
@@ -1279,24 +1275,14 @@ function DachProperties({ dach, geschosse, onUpdate, onDelete }) {
|
||||
{/* Dach-Typ */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<span style={{ fontSize: 10, color: 'var(--text-muted)', width: 50 }}>Typ</span>
|
||||
<div style={{ flex: 1, display: 'flex', gap: 2 }}>
|
||||
{[
|
||||
{ code: 'pult', label: 'Pult' },
|
||||
{ code: 'sattel', label: 'Sattel' },
|
||||
{ code: 'walm', label: 'Walm' },
|
||||
{ code: 'mansarde', label: 'Mansarde' },
|
||||
].map(o => (
|
||||
<button key={o.code}
|
||||
onClick={() => onUpdate({ dachTyp: o.code })}
|
||||
className={dachTyp === o.code ? 'btn-contained' : 'btn-outlined'}
|
||||
style={{ flex: 1, padding: '3px 4px', fontSize: 9 }}
|
||||
title={o.code === 'pult'
|
||||
? 'Geneigte Fläche, Traufe = 1. Kante'
|
||||
: 'Erfordert Rechteck-Outline (4 Ecken)'}>
|
||||
{o.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<select value={dachTyp}
|
||||
onChange={(e) => onUpdate({ dachTyp: e.target.value })}
|
||||
style={{ flex: 1, fontSize: 11 }}>
|
||||
<option value="pult">Pult — Geneigte Fläche, Traufe = 1. Kante</option>
|
||||
<option value="sattel">Sattel — Rechteck-Outline (4 Ecken)</option>
|
||||
<option value="walm">Walm — Rechteck-Outline (4 Ecken)</option>
|
||||
<option value="mansarde">Mansarde — Rechteck-Outline (4 Ecken)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
@@ -1359,21 +1345,13 @@ function DachProperties({ dach, geschosse, onUpdate, onDelete }) {
|
||||
<>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<span style={{ fontSize: 10, color: 'var(--text-muted)', width: 50 }}>Variante</span>
|
||||
<div style={{ flex: 1, display: 'flex', gap: 2 }}>
|
||||
{[
|
||||
{ code: 'walm', label: 'Walm', hint: 'Knick auf allen 4 Seiten (Pariser Stil)' },
|
||||
{ code: 'giebel', label: 'Giebel', hint: 'Knick nur an langen Seiten, Schmalseiten als Giebelwand (DACH-Standard)' },
|
||||
{ code: 'walm_giebel', label: 'W-G', hint: 'Unten Walm (Knick rundum), oben Giebel mit First über voller Länge' },
|
||||
].map(o => (
|
||||
<button key={o.code}
|
||||
onClick={() => onUpdate({ dachVariante: o.code })}
|
||||
className={(dach.dachVariante || 'walm') === o.code ? 'btn-contained' : 'btn-outlined'}
|
||||
style={{ flex: 1, padding: '3px 6px', fontSize: 10 }}
|
||||
title={o.hint}>
|
||||
{o.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<select value={dach.dachVariante || 'walm'}
|
||||
onChange={(e) => onUpdate({ dachVariante: e.target.value })}
|
||||
style={{ flex: 1, fontSize: 11 }}>
|
||||
<option value="walm">Walm — Knick auf allen 4 Seiten (Pariser Stil)</option>
|
||||
<option value="giebel">Giebel — Knick nur an langen Seiten (DACH-Standard)</option>
|
||||
<option value="walm_giebel">Walm + Giebel — Unten Walm, oben Giebel</option>
|
||||
</select>
|
||||
</div>
|
||||
<MansardeFields dach={dach} onUpdate={onUpdate} />
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user