Rename all log tags to match English module names

[EBENEN] → [LAYERS], [EBENEN-BE] → [LAYERS-BE]
[ZEICHNUNGSEBENEN] → [DRAWING-LEVELS]
[GESTALTUNG] → [STYLES]
[OBERLEISTE] → [TOOLBAR]
[WERKZEUGE] → [TOOLS]
[DIMENSIONEN] → [DIMENSIONS]
[AUSSCHNITTE] → [VIEWPORTS]
[MASSSTAB] → [SCALE]
[SCHNITT] → [SECTION], [SCHNITT_GRIPS] → [SECTION-GRIPS]
[WAND_GRIPS] → [WALL-GRIPS], [TREPPE_GRIPS] → [STAIR-GRIPS]
[CURVE_DOTS] → [CURVE-DOTS]
[panel_base] → [CORE]
[ALIAS-LOADER] → [ALIASES]
[BEGIN-CMD] → [CMD-HOOK]
This commit is contained in:
2026-06-06 12:48:27 +02:00
parent 84ff943f92
commit b9a2124026
16 changed files with 471 additions and 471 deletions
+83 -83
View File
@@ -88,14 +88,14 @@ def _list_hatch_patterns_full(doc):
try: lines = hp.GetHatchLines()
except Exception: pass
if lines is None:
print("[EBENEN] hp[{}] '{}' HatchLines=None".format(
print("[LAYERS] hp[{}] '{}' HatchLines=None".format(
i, hp.Name))
else:
try: cnt = len(lines)
except Exception:
try: cnt = lines.Count
except Exception: cnt = -1
print("[EBENEN] hp[{}] '{}' HatchLines type={} count={}".format(
print("[LAYERS] hp[{}] '{}' HatchLines type={} count={}".format(
i, hp.Name, type(lines).__name__, cnt))
for hl in lines:
try:
@@ -132,9 +132,9 @@ def _list_hatch_patterns_full(doc):
}
hlines.append(entry)
except Exception as ex:
print("[EBENEN] hp[{}] hl FAIL:".format(i), ex)
print("[LAYERS] hp[{}] hl FAIL:".format(i), ex)
except Exception as ex:
print("[EBENEN] hp[{}] HatchLines outer FAIL:".format(i), ex)
print("[LAYERS] hp[{}] HatchLines outer FAIL:".format(i), ex)
out.append({
"index": i,
"name": hp.Name or "",
@@ -146,7 +146,7 @@ def _list_hatch_patterns_full(doc):
except Exception:
continue
except Exception as ex:
print("[EBENEN] _list_hatch_patterns_full:", ex)
print("[LAYERS] _list_hatch_patterns_full:", ex)
return out
@@ -198,7 +198,7 @@ def _list_linetypes_full(doc):
stype = "Space"
segs.append({"length": length, "type": stype})
except Exception as ex:
print("[EBENEN] lt[{}] GetSegment({}) FAIL: {}".format(
print("[LAYERS] lt[{}] GetSegment({}) FAIL: {}".format(
i, s, ex))
ref = 0
try: ref = int(lt.Reference)
@@ -211,10 +211,10 @@ def _list_linetypes_full(doc):
"isReference": (ref > 0),
})
except Exception as ex:
print("[EBENEN] linetype outer FAIL:", ex)
print("[LAYERS] linetype outer FAIL:", ex)
continue
except Exception as ex:
print("[EBENEN] _list_linetypes_full:", ex)
print("[LAYERS] _list_linetypes_full:", ex)
return out
@@ -242,7 +242,7 @@ def _read_launcher_schema():
and r.get("lw") is not None]
if clean: return clean
except Exception as ex:
print("[EBENEN] launcher-schema lesen ({}):".format(p), ex)
print("[LAYERS] launcher-schema lesen ({}):".format(p), ex)
return None
@@ -272,7 +272,7 @@ def _broadcast_state(doc=None, hatch_patterns=None):
"layerCombinationActive": get_active_comb_name(doc),
}
except Exception as ex:
print("[EBENEN] broadcast prepare:", ex)
print("[LAYERS] broadcast prepare:", ex)
return
for key in ("ebenen_bridge_ref", "zeichnungsebenen_bridge_ref"):
b = sc.sticky.get(key)
@@ -621,7 +621,7 @@ def store_layer_presets(doc, presets):
doc.Strings.SetString(_PRESETS_KEY,
json.dumps(presets, ensure_ascii=False))
except Exception as ex:
print("[EBENEN] store_layer_presets:", ex)
print("[LAYERS] store_layer_presets:", ex)
def get_active_comb_name(doc):
@@ -636,7 +636,7 @@ def set_active_comb_name(doc, name):
try:
doc.Strings.SetString(_ACTIVE_COMB_KEY, name or "")
except Exception as ex:
print("[EBENEN] set_active_comb_name:", ex)
print("[LAYERS] set_active_comb_name:", ex)
def list_layer_preset_names(doc):
@@ -653,7 +653,7 @@ def _notify_oberleiste_combs():
b._cached_combinations = None
b._send_state(force=True)
except Exception as ex:
print("[EBENEN] notify oberleiste combs:", ex)
print("[LAYERS] notify oberleiste combs:", ex)
def _notify_layer_combinations_editor():
@@ -663,7 +663,7 @@ def _notify_layer_combinations_editor():
b = sc.sticky.get("layer_combinations_bridge")
if b is not None: b._send_state()
except Exception as ex:
print("[EBENEN] notify layer-combinations editor:", ex)
print("[LAYERS] notify layer-combinations editor:", ex)
def apply_layer_preset_by_name(doc, name):
@@ -673,7 +673,7 @@ def apply_layer_preset_by_name(doc, name):
presets = load_layer_presets(doc)
preset = next((p for p in presets if p.get("name") == name), None)
if preset is None:
print("[EBENEN] apply_layer_preset_by_name: '{}' not found".format(name))
print("[LAYERS] apply_layer_preset_by_name: '{}' not found".format(name))
return False
payload = {
"layers": preset.get("layers") or [],
@@ -687,7 +687,7 @@ def apply_layer_preset_by_name(doc, name):
try:
eb._apply_combination(payload)
except Exception as ex:
print("[EBENEN] apply via bridge:", ex)
print("[LAYERS] apply via bridge:", ex)
return False
else:
# Fallback: direkt doc.Strings + doc.Layer setzen (kein Bridge offen)
@@ -725,7 +725,7 @@ def _apply_layer_preset_inline(doc, payload):
doc.Strings.SetString("dossier_ebenen", json.dumps(e_list, ensure_ascii=False))
doc.Strings.SetString("dossier_zeichnungsebenen", json.dumps(z_list, ensure_ascii=False))
except Exception as ex:
print("[EBENEN] inline preset-apply (eye-state):", ex)
print("[LAYERS] inline preset-apply (eye-state):", ex)
# Layer-ID-Pfad als Sekundaer (AUSSCHNITTE-Kompat)
layer_states = payload.get("layers") or []
if layer_states:
@@ -767,7 +767,7 @@ def save_current_as_layer_preset(doc, name):
"locked": bool(layer.IsLocked),
})
except Exception as ex:
print("[EBENEN] save_current_as_layer_preset enum:", ex)
print("[LAYERS] save_current_as_layer_preset enum:", ex)
# 2) Eye-States aus dossier_ebenen / dossier_zeichnungsebenen
pe_state, pz_state = [], []
try:
@@ -789,7 +789,7 @@ def save_current_as_layer_preset(doc, name):
"visible": bool(z.get("visible", True)),
})
except Exception as ex:
print("[EBENEN] save_current_as_layer_preset eye-states:", ex)
print("[LAYERS] save_current_as_layer_preset eye-states:", ex)
presets = load_layer_presets(doc)
new_data = {
"name": name,
@@ -806,7 +806,7 @@ def save_current_as_layer_preset(doc, name):
set_active_comb_name(doc, name)
_notify_oberleiste_combs()
_notify_layer_combinations_editor()
print("[EBENEN] '{}' gespeichert: {} Layer + {} Ebenen Eye-State".format(
print("[LAYERS] '{}' gespeichert: {} Layer + {} Ebenen Eye-State".format(
name, len(layers), len(pe_state)))
return True
@@ -820,7 +820,7 @@ def delete_layer_preset(doc, name):
set_active_comb_name(doc, None)
_notify_oberleiste_combs()
_notify_layer_combinations_editor()
print("[EBENEN] Kombination '{}' geloescht".format(name))
print("[LAYERS] Kombination '{}' geloescht".format(name))
return True
@@ -870,7 +870,7 @@ class EbenenBridge(panel_base.BaseBridge):
"hatchPatterns": _hatch_pattern_names(doc),
})
except Exception as ex:
print("[EBENEN] State-Sync:", ex)
print("[LAYERS] State-Sync:", ex)
else:
payload = {"hatchPatterns": _hatch_pattern_names(doc)}
# Falls der User im Launcher eigene Default-Ebenen definiert hat,
@@ -878,7 +878,7 @@ class EbenenBridge(panel_base.BaseBridge):
launcher_schema = _read_launcher_schema()
if launcher_schema:
payload["defaultEbenen"] = launcher_schema
print("[EBENEN] FIRST_RUN mit Launcher-Schema ({} Ebenen)".format(
print("[LAYERS] FIRST_RUN mit Launcher-Schema ({} Ebenen)".format(
len(launcher_schema)))
self.send("FIRST_RUN", payload)
@@ -894,7 +894,7 @@ class EbenenBridge(panel_base.BaseBridge):
if t == "READY":
self._on_ready()
elif t == "APPLY":
print("[EBENEN-BE] APPLY from mode={} payload-z={} payload-e={}".format(
print("[LAYERS-BE] APPLY from mode={} payload-z={} payload-e={}".format(
self._mode,
len(p.get("zeichnungsebenen") or []),
len(p.get("ebenen") or [])))
@@ -902,13 +902,13 @@ class EbenenBridge(panel_base.BaseBridge):
z_payload = p.get("zeichnungsebenen") or []
e_raw = doc.Strings.GetValue("dossier_ebenen")
e_payload = json.loads(e_raw) if e_raw else []
print("[EBENEN-BE] mode=zeichnungsebenen: e from doc.Strings n={}".format(len(e_payload)))
print("[LAYERS-BE] mode=zeichnungsebenen: e from doc.Strings n={}".format(len(e_payload)))
self._apply(z_payload, e_payload, save_z=True, save_e=False)
else:
e_payload = p.get("ebenen") or []
z_raw = doc.Strings.GetValue("dossier_zeichnungsebenen")
z_payload = json.loads(z_raw) if z_raw else []
print("[EBENEN-BE] mode=ebenen: z from doc.Strings n={}".format(len(z_payload)))
print("[LAYERS-BE] mode=ebenen: z from doc.Strings n={}".format(len(z_payload)))
self._apply(z_payload, e_payload, save_z=False, save_e=True)
elif t == "LAYER_STYLE":
layer_builder.update_layer_style(doc, p["code"], p.get("color"), p.get("lw"))
@@ -942,16 +942,16 @@ class EbenenBridge(panel_base.BaseBridge):
if new_z is not None:
self._set_active_zeichnungsebene(new_z)
except Exception as ex:
print("[SCHNITT] auto-activate:", ex)
print("[SECTION] auto-activate:", ex)
except Exception as ex:
print("[SCHNITT] CREATE_SCHNITT:", ex)
print("[SECTION] CREATE_SCHNITT:", ex)
elif t == "DELETE_SCHNITT":
try:
import schnitte
if schnitte.delete_schnitt_entry(doc, p.get("id") or ""):
_broadcast_state(doc)
except Exception as ex:
print("[SCHNITT] DELETE_SCHNITT:", ex)
print("[SECTION] DELETE_SCHNITT:", ex)
elif t == "SET_ACTIVE_LAYER":
code = p.get("code", "")
if code:
@@ -1015,21 +1015,21 @@ class EbenenBridge(panel_base.BaseBridge):
elif t == "OPEN_LAYER_COMBINATIONS_DIALOG":
try: open_layer_combinations_window()
except Exception as ex:
print("[EBENEN] open layer-combinations:", ex)
print("[LAYERS] open layer-combinations:", ex)
elif t == "OPEN_PROJECT_SETTINGS":
try: self._open_project_settings()
except Exception as ex:
print("[EBENEN] open project-settings:", ex)
print("[LAYERS] open project-settings:", ex)
elif t == "OPEN_LIBRARY":
try: self._open_library()
except Exception as ex:
print("[EBENEN] open library:", ex)
print("[LAYERS] open library:", ex)
elif t == "PICK_TEXTURE_FILE":
# Oeffnet macOS-File-Picker fuer Bild-Dateien. Antwort an
# Frontend via TEXTURE_PICKED-Message.
try: self._pick_texture_file(p)
except Exception as ex:
print("[EBENEN] pick texture:", ex)
print("[LAYERS] pick texture:", ex)
# ---- Helpers ----
@@ -1843,7 +1843,7 @@ class EbenenBridge(panel_base.BaseBridge):
path = dlg.FileName or ""
self.send("TEXTURE_PICKED", {"slot": slot, "path": path})
except Exception as ex:
print("[EBENEN] pick texture:", ex)
print("[LAYERS] pick texture:", ex)
self.send("TEXTURE_PICKED", {"slot": slot, "path": None})
def _open_library(self):
@@ -1913,7 +1913,7 @@ class EbenenBridge(panel_base.BaseBridge):
GeschossSettingsDialog. Save updated den Eintrag in doc.Strings +
triggert Cross-Panel-Sync."""
if not isinstance(geschoss, dict) or not geschoss.get("id"):
print("[EBENEN] open_geschoss_settings: kein Geschoss-Payload")
print("[LAYERS] open_geschoss_settings: kein Geschoss-Payload")
return
gid = geschoss["id"]
doc = Rhino.RhinoDoc.ActiveDoc
@@ -1935,16 +1935,16 @@ class EbenenBridge(panel_base.BaseBridge):
val = updated.pop("projectZeroMum")
val = float(val) if val is not None else 0.0
doc.Strings.SetString("dossier_project_zero_mum", str(val))
print("[EBENEN] project_zero_mum = {} m.ü.M".format(val))
print("[LAYERS] project_zero_mum = {} m.ü.M".format(val))
except Exception as ex:
print("[EBENEN] project_zero_mum save:", ex)
print("[LAYERS] project_zero_mum save:", ex)
z_raw = doc.Strings.GetValue("dossier_zeichnungsebenen")
if not z_raw:
print("[EBENEN] save_geschoss: kein z-Store"); return
print("[LAYERS] save_geschoss: kein z-Store"); return
try:
z_list = json.loads(z_raw)
except Exception as ex:
print("[EBENEN] save_geschoss JSON:", ex); return
print("[LAYERS] save_geschoss JSON:", ex); return
replaced = False
for i, z in enumerate(z_list):
if isinstance(z, dict) and z.get("id") == gid:
@@ -1952,7 +1952,7 @@ class EbenenBridge(panel_base.BaseBridge):
replaced = True
break
if not replaced:
print("[EBENEN] save_geschoss: id {} not found".format(gid))
print("[LAYERS] save_geschoss: id {} not found".format(gid))
return
# Build_layers + Save via _apply (durchlaeuft ohne save_e)
e_raw = doc.Strings.GetValue("dossier_ebenen")
@@ -1970,7 +1970,7 @@ class EbenenBridge(panel_base.BaseBridge):
import schnitte
schnitte.activate_schnitt(doc, updated)
except Exception as ex:
print("[SCHNITT] post-save reactivate:", ex)
print("[SECTION] post-save reactivate:", ex)
panel_base.open_satellite_window(
"geschoss_settings",
params=params,
@@ -1984,7 +1984,7 @@ class EbenenBridge(panel_base.BaseBridge):
die aktuelle Ebene live (SAVE_KEEP), Schliess-/Übernehmen-Knopf
persistiert + schliesst (SAVE)."""
if not isinstance(ebene, dict) or not ebene.get("code"):
print("[EBENEN] open_ebenen_settings: kein Ebene-Payload")
print("[LAYERS] open_ebenen_settings: kein Ebene-Payload")
return
bridge_holder = {"form": None}
apply_self = self
@@ -2035,7 +2035,7 @@ class EbenenBridge(panel_base.BaseBridge):
if not e_raw: return
try: e_list = json.loads(e_raw)
except Exception as ex:
print("[EBENEN] save_ebene JSON:", ex); return
print("[LAYERS] save_ebene JSON:", ex); return
# Rekursive Suche + Replace durch den Tree — Sub-Ebenen
# (children) liegen verschachtelt, nicht in der Top-Level-Liste.
def _replace_in_tree(lst, target_code, new_data):
@@ -2055,7 +2055,7 @@ class EbenenBridge(panel_base.BaseBridge):
return False
replaced = _replace_in_tree(e_list, orig_code, updated)
if not replaced:
print("[EBENEN] save_ebene: code {} not found".format(orig_code))
print("[LAYERS] save_ebene: code {} not found".format(orig_code))
return
z_raw = doc.Strings.GetValue("dossier_zeichnungsebenen")
try: z_list = json.loads(z_raw) if z_raw else []
@@ -2074,7 +2074,7 @@ class EbenenBridge(panel_base.BaseBridge):
"""Oeffnet den vollen GeschossDialog (Mehrfach-Editor) als
Satelliten-Fenster. Save schreibt die ganze z-Liste neu."""
if not isinstance(zeichnungsebenen, list):
print("[EBENEN] open_geschoss_dialog: keine Liste"); return
print("[LAYERS] open_geschoss_dialog: keine Liste"); return
def on_save(payload):
doc = Rhino.RhinoDoc.ActiveDoc
if doc is None: return
@@ -2092,7 +2092,7 @@ class EbenenBridge(panel_base.BaseBridge):
on_save=on_save)
def _apply(self, zeichnungsebenen, ebenen, save_z=True, save_e=True):
print("[EBENEN] _apply START z={} e={} (save_z={} save_e={})".format(
print("[LAYERS] _apply START z={} e={} (save_z={} save_e={})".format(
len(zeichnungsebenen) if zeichnungsebenen else 0,
len(ebenen) if ebenen else 0, save_z, save_e))
doc = Rhino.RhinoDoc.ActiveDoc
@@ -2147,19 +2147,19 @@ class EbenenBridge(panel_base.BaseBridge):
new_ids = _schn.schnitt_ids_in_list(zeichnungsebenen)
schnitte_removed = old_ids - new_ids
except Exception as ex:
print("[SCHNITT] cleanup detection:", ex)
print("[SECTION] cleanup detection:", ex)
_set_processing(True)
try:
print("[EBENEN] _apply: build_layers ...")
print("[LAYERS] _apply: build_layers ...")
layer_builder.build_layers(doc, zeichnungsebenen, ebenen)
print("[EBENEN] _apply: json.dumps ...")
print("[LAYERS] _apply: json.dumps ...")
# WICHTIG: ensure_ascii=False umgeht einen Bug in Rhinos eigener
# json/encoder.py die bei ASCII-escape s.decode('utf-8') aufruft
# und dabei mit 0xC4 (Umlaut) in den CP1252-Decoder lauft.
z_json = json.dumps(zeichnungsebenen, ensure_ascii=False)
e_json = json.dumps(ebenen, ensure_ascii=False)
print("[EBENEN] _apply: SetString ...")
print("[LAYERS] _apply: SetString ...")
if save_z:
doc.Strings.SetString("dossier_zeichnungsebenen", z_json)
if save_e:
@@ -2175,10 +2175,10 @@ class EbenenBridge(panel_base.BaseBridge):
for sid in schnitte_removed:
n_total += _schn.cleanup_schnitt_artifacts(
doc, sid, active_id=active_id)
print("[SCHNITT] {} Schnitt(e) geloescht, {} Symbol-Curves entfernt".format(
print("[SECTION] {} Schnitt(e) geloescht, {} Symbol-Curves entfernt".format(
len(schnitte_removed), n_total))
except Exception as ex:
print("[SCHNITT] artifact cleanup:", ex)
print("[SECTION] artifact cleanup:", ex)
# Smart-Elemente (Waende) regenerieren — Geschoss-Hoehen/OKFF
# haben sich evtl. geaendert, gebundene Waende muessen neu
# extrudiert werden. Best-effort, faengt jeden Fehler ab.
@@ -2187,17 +2187,17 @@ class EbenenBridge(panel_base.BaseBridge):
if elem_bridge is not None:
elem_bridge._regenerate_all()
except Exception as _ex:
print("[EBENEN] elemente regen:", _ex)
print("[LAYERS] elemente regen:", _ex)
n_with_fill = sum(1 for e in ebenen if isinstance(e, dict)
and isinstance(e.get("fill"), dict)
and e["fill"].get("pattern") not in (None, "None"))
print("[EBENEN] dossier_ebenen saved: {} layers, of which {} with fill, JSON-len={}".format(
print("[LAYERS] dossier_ebenen saved: {} layers, of which {} with fill, JSON-len={}".format(
len(ebenen), n_with_fill, len(e_json)))
re_read = doc.Strings.GetValue("dossier_ebenen")
print("[EBENEN] dossier_ebenen verified: len={}".format(len(re_read) if re_read else 0))
print("[EBENEN] _apply: cleanup_default_layers ...")
print("[LAYERS] dossier_ebenen verified: len={}".format(len(re_read) if re_read else 0))
print("[LAYERS] _apply: cleanup_default_layers ...")
layer_builder.cleanup_default_layers(doc)
print("[EBENEN] _apply: ensure_active_sublayer ...")
print("[LAYERS] _apply: ensure_active_sublayer ...")
self._ensure_active_sublayer()
# Existierende 'Nach Ebene'-Hatches an neue Pattern/Skala/Drehung
# angleichen — ABER nur wenn die Fill-Signatur sich tatsaechlich
@@ -2208,16 +2208,16 @@ class EbenenBridge(panel_base.BaseBridge):
if fill_changed:
gestaltung.refresh_layer_fills(doc)
else:
print("[EBENEN] _apply: fill signature unchanged -> no hatch refresh")
print("[LAYERS] _apply: fill signature unchanged -> no hatch refresh")
# Plot-Color Repair laeuft immer (no-op falls schon synchron)
gestaltung.repair_plot_colors(doc)
except Exception as ex:
print("[EBENEN] gestaltung sync:", ex)
print("[LAYERS] gestaltung sync:", ex)
finally:
_set_processing(False)
print("[EBENEN] _apply: update_clipping ...")
print("[LAYERS] _apply: update_clipping ...")
self._update_clipping()
print("[EBENEN] _apply: send APPLY_OK")
print("[LAYERS] _apply: send APPLY_OK")
self.send("APPLY_OK", {})
# Strukturelle Aenderung (neue/umbenannte/geloeschte Ebene) → aktives
# Preset passt nicht mehr exakt.
@@ -2225,7 +2225,7 @@ class EbenenBridge(panel_base.BaseBridge):
# Anderes Panel (Zeichnungsebenen/Ebenen) ueber den neuen State
# informieren — sonst hinkt es hinter der DOM-Persistenz her.
_broadcast_state(doc)
print("[EBENEN] _apply: DONE")
print("[LAYERS] _apply: DONE")
def _ensure_active_sublayer(self):
"""Setzt den aktiven Rhino-Layer auf den DOSSIER-Sublayer (Fallback: erste Z + 20_WAENDE)."""
@@ -2343,7 +2343,7 @@ class EbenenBridge(panel_base.BaseBridge):
any_changed = (_vis_lock_changed(z_full, merged_z)
or _vis_lock_changed(e_full, merged_e))
if has_new_structural:
print("[EBENEN] _apply_visibility: structural change pending → skip save (waiting for APPLY)")
print("[LAYERS] _apply_visibility: structural change pending → skip save (waiting for APPLY)")
else:
doc.Strings.SetString("dossier_zeichnungsebenen", json.dumps(merged_z, ensure_ascii=False))
doc.Strings.SetString("dossier_ebenen", json.dumps(merged_e, ensure_ascii=False))
@@ -2442,7 +2442,7 @@ class EbenenBridge(panel_base.BaseBridge):
if eb is not None: eb._notify_active_geschoss()
except Exception: pass
except Exception as ex:
print("[SCHNITT] activate fehler:", ex)
print("[SECTION] activate fehler:", ex)
return
# Geschoss-Pfad (default): falls vorher ein Schnitt aktiv war,
# dessen Clipping-Planes aufraeumen + Pre-Schnitt-View restoren.
@@ -2452,7 +2452,7 @@ class EbenenBridge(panel_base.BaseBridge):
if prev_was_schnitt:
schnitte.restore_pre_schnitt_view(doc)
except Exception as ex:
print("[SCHNITT] cleanup beim Wechsel auf Geschoss:", ex)
print("[SECTION] cleanup beim Wechsel auf Geschoss:", ex)
# Aktiven Sublayer auf die GLEICHE Ebene unter dem neuen Geschoss
# umschalten — wenn User auf "20 Wände" steht und das Geschoss
# wechselt, soll Rhino's aktiver Layer "1OG::20_Wände" werden statt
@@ -2495,12 +2495,12 @@ class EbenenBridge(panel_base.BaseBridge):
vp.SetConstructionPlane(new_plane)
updated += 1
except Exception as ex:
print("[EBENEN] CPlane fehler ({}): {}".format(vp.Name if vp else "?", ex))
print("[LAYERS] CPlane fehler ({}): {}".format(vp.Name if vp else "?", ex))
# KEIN doc.Views.Redraw() hier — die folgende SET_VISIBILITY-Round-
# trip (30 ms debounce in React) feuert ohnehin layer_builder
# .apply_visibility() das am Ende selbst redrawt. Sparen wir uns
# einen doppelten Full-Repaint pro Geschoss-Klick.
print("[EBENEN] CPlane Z={} on {} top-style view(s) set".format(okff, updated))
print("[LAYERS] CPlane Z={} on {} top-style view(s) set".format(okff, updated))
def _needs_clipping_update(self, doc, prev_active_id, new_z):
"""Liefert True wenn entweder das alte oder das neue Geschoss
@@ -2596,16 +2596,16 @@ class EbenenBridge(panel_base.BaseBridge):
doc = Rhino.RhinoDoc.ActiveDoc
z_id = doc.Strings.GetValue("dossier_active_id")
if not z_id:
print("[EBENEN] Keine aktive Zeichnungsebene")
print("[LAYERS] Keine aktive Zeichnungsebene")
return
parent_idx = layer_builder._find_top_by_id(doc, z_id)
if parent_idx < 0:
print("[EBENEN] Parent fuer aktive Zeichnungsebene not found")
print("[LAYERS] Parent fuer aktive Zeichnungsebene not found")
return
parent_id = doc.Layers[parent_idx].Id
sub_idx = layer_builder._find_sublayer_by_code(doc, parent_id, code)
if sub_idx < 0:
print("[EBENEN] Sublayer {} unter {} not found".format(code, doc.Layers[parent_idx].Name))
print("[LAYERS] Sublayer {} unter {} not found".format(code, doc.Layers[parent_idx].Name))
return
objs = list(doc.Objects.GetSelectedObjects(False, False))
moved = 0
@@ -2615,7 +2615,7 @@ class EbenenBridge(panel_base.BaseBridge):
if doc.Objects.ModifyAttributes(obj, attrs, True):
moved += 1
doc.Views.Redraw()
print("[EBENEN] {} Objekt(e) auf {} verschoben".format(moved, doc.Layers[sub_idx].FullPath))
print("[LAYERS] {} Objekt(e) auf {} verschoben".format(moved, doc.Layers[sub_idx].FullPath))
def _set_active_sublayer(self, code):
if not code:
@@ -2637,7 +2637,7 @@ class EbenenBridge(panel_base.BaseBridge):
if z_id:
layer_builder.set_active_sublayer(doc, z_id, code)
else:
print("[EBENEN] Aktive Zeichnungsebene unbekannt — Layer wird nicht set")
print("[LAYERS] Aktive Zeichnungsebene unbekannt — Layer wird nicht set")
def _remove_ebene_from_state(self, code):
doc = Rhino.RhinoDoc.ActiveDoc
@@ -2649,7 +2649,7 @@ class EbenenBridge(panel_base.BaseBridge):
doc.Strings.SetString("dossier_ebenen", json.dumps(ebenen, ensure_ascii=False))
_broadcast_state(doc)
except Exception as ex:
print("[EBENEN] remove:", ex)
print("[LAYERS] remove:", ex)
def _update_ebene_field(self, code, field, value):
doc = Rhino.RhinoDoc.ActiveDoc
@@ -2677,7 +2677,7 @@ class EbenenBridge(panel_base.BaseBridge):
doc.Strings.SetString("dossier_ebenen", json.dumps(ebenen, ensure_ascii=False))
_broadcast_state(doc)
except Exception as ex:
print("[EBENEN] update:", ex)
print("[LAYERS] update:", ex)
# ---- Ebenen-Kombinationen / Presets (geteilt mit AUSSCHNITTE) --------
@@ -2715,7 +2715,7 @@ class EbenenBridge(panel_base.BaseBridge):
})
layers_out.sort(key=lambda x: x["fullPath"])
except Exception as ex:
print("[EBENEN] _send_combination layers:", ex)
print("[LAYERS] _send_combination layers:", ex)
try:
presets = self._load_presets(doc)
except Exception:
@@ -2782,11 +2782,11 @@ class EbenenBridge(panel_base.BaseBridge):
})
try: doc.Views.Redraw()
except Exception: pass
print("[EBENEN] Eye-State-Preset angewandt: {} Ebenen, {} Zeichnungsebenen".format(
print("[LAYERS] Eye-State-Preset angewandt: {} Ebenen, {} Zeichnungsebenen".format(
len(pe_states or []), len(pz_states or [])))
return
except Exception as ex:
print("[EBENEN] _apply_combination eye-state:", ex)
print("[LAYERS] _apply_combination eye-state:", ex)
# Fall through zum Layer-ID-Pfad als Fallback
# --- Layer-ID-Pfad (alt / AUSSCHNITTE) ---
@@ -2876,12 +2876,12 @@ class EbenenBridge(panel_base.BaseBridge):
"ebenen": ebenen_list,
})
except Exception as ex:
print("[EBENEN] STATE_SYNC push:", ex)
print("[LAYERS] STATE_SYNC push:", ex)
except Exception as ex:
print("[EBENEN] _apply_combination sync:", ex)
print("[LAYERS] _apply_combination sync:", ex)
try: doc.Views.Redraw()
except Exception: pass
print("[EBENEN] Kombination angewandt: {} Layer".format(n))
print("[LAYERS] Kombination angewandt: {} Layer".format(n))
def _save_preset(self, name, layers):
name = (name or "").strip()
@@ -2905,7 +2905,7 @@ class EbenenBridge(panel_base.BaseBridge):
store_layer_presets(doc, presets)
_notify_oberleiste_combs()
_notify_layer_combinations_editor()
print("[EBENEN] Kombination '{}' gespeichert ({} Layer)".format(name, len(clean)))
print("[LAYERS] Kombination '{}' gespeichert ({} Layer)".format(name, len(clean)))
def _save_current_as_preset(self, name):
"""Speichert die aktuellen Eye-States (dossier_ebenen + dossier_zeichnungs-
@@ -3103,11 +3103,11 @@ def _install_layer_listener(bridge):
if updated:
_broadcast_state(doc)
except Exception as ex:
print("[EBENEN] Layer-Event:", ex)
print("[LAYERS] Layer-Event:", ex)
Rhino.RhinoDoc.LayerTableEvent += on_layer_event
sc.sticky["ebenen_layer_listener"] = True
print("[EBENEN] Layer-Listener active")
print("[LAYERS] Layer-Listener active")
panel_base.register_and_open("ebenen", "Ebenen", PANEL_GUID_STR, _ebenen_bridge_factory,