961b3c0396
Stable working state after a long iteration session. The plugin now supports:
- Multi-Surface-Select für alle Element-Typen (Türen/Fenster/Treppen/Tragwerk)
- Wand-Z-Drag → unbound mode (UK/OK-Override, Wand vom Geschoss entkoppelt)
- Wand-Z-Drag nimmt verknüpfte Öffnungen mit (Brüstung += delta_z via Idle-Pfad)
- Öffnungs-XY-Drag snapt direktional auf Wand-Tangente
- Öffnungs-Z-Drag passt Brüstung an (Fenster sofort sync, Tür deferred)
- Wand-Delete kaskadiert Öffnungen (deferred via Idle, robust gegen _Rotate/_Move)
- Source-Cascade beim Öffnungs-Delete (deferred analog Wand-Kaskade)
- Listener-Cleanup robust gegen _reset_panels.py Reload (Refs in
_dossier_runtime_event_refs gespeichert, vor Re-Install deregistriert)
- _count_same_id_type filtert IsDeleted (verhindert Source-Duplikat-Bug bei Move)
- Frontend: Brüstungs-Slider für Tür ("Schwelle"), Flügel-Block nur bei Fenster
Plus aus früherer Phase dieser Session:
- Dossier-Launcher Auto-Load via Rhinos StartupCommands-XML
- Default-Pfad zeigt auf gebundeltes startup.py (out-of-the-box für neue User)
- Splash-Window beim Plugin-Load mit native macOS rounded corners
- Diverse Launcher-Verbesserungen (Brüstungs-Default, tauri.conf, capabilities)
Known issue: bei Multi-Select-Move mit vielen Sub-Volumen kann sporadisch
"Unable to transform" auftreten (Rhinos Move-Operation kollidiert mit Wand-
Regen). Tür-spezifischer Defer-Pfad mildert das, Fenster läuft sync.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
164 lines
5.4 KiB
Python
164 lines
5.4 KiB
Python
#! python 3
|
|
"""
|
|
inspect_section.py
|
|
Schreibt ALLE Eigenschaften der SectionStyle der aktuellen Ebene ins Log,
|
|
ohne dass irgendein Panel-Setup gebraucht wird.
|
|
|
|
Aufruf:
|
|
_-RunPythonScript "/Users/karim/STUDIO/DOSSIER/rhino/inspect_section.py"
|
|
"""
|
|
import Rhino
|
|
|
|
|
|
def dump(label, obj):
|
|
print("--- {} ({})".format(label, type(obj).__name__ if obj is not None else "None"))
|
|
if obj is None:
|
|
return
|
|
for name in dir(obj):
|
|
if name.startswith("_"):
|
|
continue
|
|
try:
|
|
v = getattr(obj, name)
|
|
except Exception as ex:
|
|
print(" {} -> err: {}".format(name, ex))
|
|
continue
|
|
if callable(v):
|
|
continue
|
|
try:
|
|
print(" {} = {!r}".format(name, v))
|
|
except Exception:
|
|
try:
|
|
print(" {} = (unprintable)".format(name))
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
doc = Rhino.RhinoDoc.ActiveDoc
|
|
layer = doc.Layers.CurrentLayer
|
|
print("============================================")
|
|
print("Aktive Ebene:")
|
|
print(" Name =", layer.Name)
|
|
try: print(" Id =", layer.Id)
|
|
except Exception: pass
|
|
|
|
print("\n--- Layer-Properties die mit 'Section' anfangen ---")
|
|
for n in dir(layer):
|
|
if n.startswith("_"):
|
|
continue
|
|
if "section" in n.lower() or "hatch" in n.lower() or "fill" in n.lower():
|
|
try:
|
|
v = getattr(layer, n)
|
|
if callable(v):
|
|
continue
|
|
print(" layer.{} = {!r}".format(n, v))
|
|
except Exception as ex:
|
|
print(" layer.{} -> err: {}".format(n, ex))
|
|
|
|
# layer.SectionStyle dumpen wenn vorhanden
|
|
try:
|
|
if hasattr(layer, "SectionStyle"):
|
|
dump("layer.SectionStyle", layer.SectionStyle)
|
|
except Exception as ex:
|
|
print(" layer.SectionStyle err:", ex)
|
|
|
|
# Via doc.SectionStyles + layer.SectionStyleId
|
|
try:
|
|
if hasattr(layer, "SectionStyleId"):
|
|
sid = layer.SectionStyleId
|
|
print("\n layer.SectionStyleId =", sid)
|
|
for tname in ("SectionStyles", "SectionAttributes"):
|
|
if hasattr(doc, tname):
|
|
tbl = getattr(doc, tname)
|
|
print(" doc.{} =".format(tname), tbl, "Count:",
|
|
getattr(tbl, "Count", "?"))
|
|
try:
|
|
ss = tbl.FindId(sid)
|
|
dump("doc.{}.FindId({})".format(tname, sid), ss)
|
|
except Exception as ex:
|
|
print(" FindId err:", ex)
|
|
except Exception as ex:
|
|
print("SectionStyleId-Zweig err:", ex)
|
|
|
|
print("\n--- Doc-Tabellen (alles was 'Section' enthaelt) ---")
|
|
for n in dir(doc):
|
|
if n.startswith("_"): continue
|
|
if "section" in n.lower():
|
|
try:
|
|
v = getattr(doc, n)
|
|
if callable(v): continue
|
|
print(" doc.{} = {!r} (count={})".format(
|
|
n, v, getattr(v, "Count", "?")))
|
|
except Exception as ex:
|
|
print(" doc.{} -> err: {}".format(n, ex))
|
|
|
|
print("\n--- Layer UserDictionary ---")
|
|
try:
|
|
ud = layer.UserDictionary
|
|
cnt = ud.Count
|
|
print(" Count:", cnt)
|
|
for key in ud.Keys:
|
|
try:
|
|
v = ud[key]
|
|
print(" [{}] = {!r} (type={})".format(key, v, type(v).__name__))
|
|
except Exception as ex:
|
|
print(" [{}] err: {}".format(key, ex))
|
|
except Exception as ex:
|
|
print(" UserDictionary err:", ex)
|
|
|
|
print("\n--- Layer UserStrings (NameValueCollection) ---")
|
|
try:
|
|
nvc = layer.GetUserStrings()
|
|
print(" Count:", nvc.Count)
|
|
for k in nvc.AllKeys:
|
|
print(" [{}] = {!r}".format(k, nvc[k]))
|
|
except Exception as ex:
|
|
print(" GetUserStrings err:", ex)
|
|
# Fallback: ueber Count + GetUserString
|
|
try:
|
|
# Manche Rhino-Versionen haben GetUserStringKeys() oder iterieren anders
|
|
if hasattr(layer, "GetUserStringKeys"):
|
|
keys = layer.GetUserStringKeys()
|
|
print(" GetUserStringKeys ->", list(keys))
|
|
except Exception as ex:
|
|
print(" GetUserStringKeys err:", ex)
|
|
|
|
print("\n--- Layer UserData (Custom .NET Blobs) ---")
|
|
try:
|
|
udl = layer.UserData
|
|
print(" Count:", udl.Count if udl else "None")
|
|
if udl:
|
|
for i in range(udl.Count):
|
|
ud_item = udl[i]
|
|
print(" UserData[{}]:".format(i))
|
|
for prop in ("Description", "Name", "Id", "DataCRC", "InstanceId"):
|
|
try:
|
|
if hasattr(ud_item, prop):
|
|
print(" {} = {!r}".format(prop, getattr(ud_item, prop)))
|
|
except Exception as ex:
|
|
print(" {} err: {}".format(prop, ex))
|
|
print(" type:", type(ud_item).__name__)
|
|
print(" full type:", type(ud_item).__module__ + "." + type(ud_item).__name__)
|
|
# Dump alle public Attrs
|
|
for a in sorted(dir(ud_item)):
|
|
if a.startswith("_"): continue
|
|
try:
|
|
v = getattr(ud_item, a)
|
|
if callable(v): continue
|
|
print(" .{} = {!r}".format(a, v))
|
|
except Exception:
|
|
pass
|
|
except Exception as ex:
|
|
print(" UserData err:", ex)
|
|
|
|
print("\n--- Layer-Properties vollstaendig (alphabetisch) ---")
|
|
for n in sorted(dir(layer)):
|
|
if n.startswith("_"): continue
|
|
try:
|
|
v = getattr(layer, n)
|
|
if callable(v): continue
|
|
print(" layer.{} = {!r}".format(n, v))
|
|
except Exception as ex:
|
|
print(" layer.{} -> err: {}".format(n, ex))
|
|
|
|
print("============================================")
|