13a5e1eb7a
Lizenz: - AGPL-3.0 LICENSE-File im Repo-Root (GNU Volltext) - SPDX-Header + Copyright in allen Source-Files (Python/JSX/JS/Rust) - license-Feld in package.json + Cargo.toml - About-App komplett neu: Dual-Lizenz-Block (AGPL + Commercial), openbureau-Branding, Version-Pills, made-in-Switzerland-Footer UI-Restyle (3 Wellen) — alle Dialoge + Satellites + Panel-Sidebars auf gemeinsamen Pill-Stil aus BarControls (BarToggle/BarButton/BarCombo): - Welle 1: GeschossDialog/Settings, AusschnittSettings, LayoutDialog - Welle 2: ConfirmDeleteEbene, Kamera, MasseSettings, Osm, Swisstopo, TextEditor, AusschnittLayerDialog, LayerCombinations - Welle 3: LayoutsApp, MassstabApp, WerkzeugeApp, OverridesApp, ZeichnungsebenenApp; Werkzeuge mit ElementeApp-PillGroup-Layout GeschossDialog Header-Refactor: +Geschoss/+Zeichnung in Toolbar oben, move-Pfeile-Spalte breiter (kein Overlap mit G-Haken) Ausschnitte Rows als Pills, kein Outer-Border ums Suchfeld Section-Style komplett neu (gestaltung.py + GestaltungApp.jsx): - ObjectSectionAttributesSource.FromObject (richtiger Enum-Name fuer Mac) - HatchPatternPrintColor + BoundaryPrintColor mit-setzen (Display = Print) - BoundaryColor nur bei explizitem User-Override, sonst Rhino-Default - background_color_hex Parameter (BackgroundFillMode=SolidColor) - Readback aus GetCustomSectionStyle statt direkt aus Attributes - UI: Schnittkante > Section Style > Solid-Fill mit proper SectionHead - 'Boundary' (3D Pen) -> 'Background' weil sich's wie Section-Hintergrund verhaelt Plan-Mode 'Dossier Plan' via Template: - rhino/templates/dossier_plan.ini wird direkt geladen - Fallback auf Technical-Clone + ini-Patch wenn Template fehlt - Auto-Cleanup von Orphan-Modes vor Import (Name- oder Guid-Match) - ClipSectionUsage=1 + TechnicalMask=15 als bekannte Soll-Werte - Bei Template-Pfad keine ini-Patches (1:1 wie User exportiert) - Sanity-Print listet alle registrierten Modes nach Anlegen Bridge-Unification: 4 Settings-Apps (Ebenen/Project/Geschoss*Dialog) benutzen jetzt chunkende send() statt eigene bridgeSend ohne Chunk- Logik -> grosse Payloads (Hatch-Refs etc.) kommen nicht mehr truncated bei Python an (loeste 'JSON-Fehler char 990'-Regression in Ebenen- Settings) Library-Imports robust: 'import library' jetzt Top-Level in elemente.py + rhinopanel.py (statt Lazy in Methoden) -> 'No module named library'- Crashes weg auch wenn sys.path zwischendurch resettet wird Tools fuer Display-Mode-Maintenance: - _clean_display_modes.py (loescht alle Custom-Modes, Built-ins bleiben) - _inspect_plan_mode.py / _inspect_obj_section.py / _inspect_obj_boundary.py (Diagnose-Skripte fuer SectionStyle-Property-Reverse-Engineering) - _reset_rhino_settings.sh (Backup + Nuke der Rhino-Settings als letzte Bastion gegen korrupte Display-Modes)
113 lines
3.9 KiB
Python
113 lines
3.9 KiB
Python
#! python3
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# Copyright (C) 2026 Karim Gabriele Varano
|
|
"""Dumpt ALLE Section-/Hatch-relevanten Properties des selektierten Objekts.
|
|
So sehen wir was Rhino's eigene Section-Style-UI tatsaechlich setzt vs.
|
|
was unser Plugin-Code setzt.
|
|
|
|
Vorgehen:
|
|
1. Ein 3D-Objekt selektieren (Wand, Box, ...)
|
|
2. In Rhinos Properties-Panel manuell SectionStyle → Custom mit spezifischen
|
|
Werten setzen (z.B. Pattern Color=Gruen, Pattern Rotation=20, Pattern
|
|
Scale=2.4, Boundary Color=Rot, Boundary Width Scale=6) → Apply
|
|
3. _RunPythonScript /Users/karim/STUDIO/DOSSIER/rhino/_inspect_obj_section.py
|
|
4. Output an Claude
|
|
"""
|
|
import Rhino
|
|
|
|
|
|
def _fmt(v):
|
|
if v is None: return "None"
|
|
s = str(v)
|
|
if len(s) > 80: s = s[:77] + "..."
|
|
return s
|
|
|
|
|
|
def _dump_group(css, prefix, title):
|
|
"""Dumpt Properties auf css deren Name mit `prefix` (case-insens) anfaengt."""
|
|
print("--- {} ---".format(title))
|
|
p_lower = prefix.lower()
|
|
found = False
|
|
for n in sorted(dir(css)):
|
|
if n.startswith("_"): continue
|
|
if p_lower not in n.lower(): continue
|
|
try:
|
|
v = getattr(css, n)
|
|
if callable(v): continue
|
|
found = True
|
|
print(" {:32s} = {}".format(n, _fmt(v)))
|
|
except Exception as ex:
|
|
print(" {:32s} = <unreadable: {}>".format(n, ex))
|
|
if not found:
|
|
print(" (nichts)")
|
|
|
|
|
|
doc = Rhino.RhinoDoc.ActiveDoc
|
|
objs = list(doc.Objects.GetSelectedObjects(False, False))
|
|
if not objs:
|
|
print("[INSPECT] Bitte ein Objekt selektieren")
|
|
else:
|
|
obj = objs[0]
|
|
a = obj.Attributes
|
|
print("[INSPECT] Object: {} (Id={})".format(type(obj).__name__, obj.Id))
|
|
|
|
# SectionAttributesSource (FromLayer / FromObject)
|
|
print("")
|
|
print("=== Attributes ===")
|
|
try:
|
|
print(" SectionAttributesSource =", a.SectionAttributesSource)
|
|
except Exception as ex:
|
|
print(" SectionAttributesSource err:", ex)
|
|
try:
|
|
print(" HatchBackgroundFillColor =", a.HatchBackgroundFillColor)
|
|
except Exception: pass
|
|
try:
|
|
print(" HatchBoundaryVisible =", a.HatchBoundaryVisible)
|
|
except Exception: pass
|
|
|
|
# Custom SectionStyle aus Object
|
|
print("")
|
|
print("=== Object.GetCustomSectionStyle() ===")
|
|
css = None
|
|
if hasattr(a, "GetCustomSectionStyle"):
|
|
try:
|
|
css = a.GetCustomSectionStyle()
|
|
except Exception as ex:
|
|
print(" err:", ex)
|
|
|
|
if css is None:
|
|
print(" None (kein Custom-SectionStyle gesetzt)")
|
|
else:
|
|
print(" Type:", type(css).__name__)
|
|
print("")
|
|
# Gruppierte Property-Dumps damit Mapping zu Rhino-UI klar wird
|
|
_dump_group(css, "Hatch", "Hatch (Pattern, Color, Scale, Rotation)")
|
|
print("")
|
|
_dump_group(css, "Boundary", "Boundary (Visible, Color, Width)")
|
|
print("")
|
|
_dump_group(css, "Background", "Background (FillColor, FillMode)")
|
|
print("")
|
|
# Section-spezifisch (SectionFillRule etc.)
|
|
print("--- Misc Section ---")
|
|
for n in ("SectionFillRule", "Name", "Id", "HasUserData", "Index"):
|
|
if hasattr(css, n):
|
|
try: print(" {:32s} = {}".format(n, _fmt(getattr(css, n))))
|
|
except Exception: pass
|
|
|
|
# Layer-Default SectionStyle als Vergleich
|
|
print("")
|
|
print("=== Layer.GetCustomSectionStyle (Layer-Default) ===")
|
|
try:
|
|
lyr = doc.Layers[a.LayerIndex]
|
|
print(" Layer:", lyr.FullPath, "Color:", lyr.Color)
|
|
if hasattr(lyr, "GetCustomSectionStyle"):
|
|
l_css = lyr.GetCustomSectionStyle()
|
|
if l_css is None:
|
|
print(" Layer hat KEIN Custom-SectionStyle")
|
|
else:
|
|
_dump_group(l_css, "Hatch", "Layer.Hatch")
|
|
_dump_group(l_css, "Boundary", "Layer.Boundary")
|
|
_dump_group(l_css, "Background", "Layer.Background")
|
|
except Exception as ex:
|
|
print(" err:", ex)
|