#! python3 # SPDX-License-Identifier: AGPL-3.0-or-later # Copyright (C) 2026 Karim Gabriele Varano """Boundary/Hatch-Inspector — zeigt was Rhino setzt wenn du via Properties-Panel die Section-Boundary aenderst. Vorgehen: 1. Objekt selektieren 2. In Rhinos Properties → Section Style → Custom → Boundary verstellen (Farbe ändern, Visible toggeln, Width setzen) 3. _RunPythonScript /Users/karim/STUDIO/DOSSIER/rhino/_inspect_obj_boundary.py 4. Output schicken — speziell die Boundary-Properties """ import Rhino doc = Rhino.RhinoDoc.ActiveDoc objs = list(doc.Objects.GetSelectedObjects(False, False)) if not objs: print("[INSPECT] Bitte Objekt selektieren") else: obj = objs[0] a = obj.Attributes print("[INSPECT] Object {}".format(str(obj.Id)[:8])) print("") print("=== Attributes.SectionAttributesSource ===") try: print(" =", a.SectionAttributesSource) except Exception as ex: print(" err:", ex) print("") print("=== Attributes.GetCustomSectionStyle() — alle Props ===") try: css = a.GetCustomSectionStyle() if css is None: print(" None (kein Custom-SectionStyle)") else: for n in sorted(dir(css)): if n.startswith("_"): continue try: v = getattr(css, n) if callable(v): continue sv = str(v) if len(sv) > 80: sv = sv[:77] + "..." print(" {} = {}".format(n, sv)) except Exception as ex: print(" {} ".format(n, ex)) except Exception as ex: print(" err:", ex) print("") print("=== Layer.GetCustomSectionStyle (Layer-Default) ===") try: lyr = doc.Layers[a.LayerIndex] print(" Layer:", lyr.FullPath) if hasattr(lyr, "GetCustomSectionStyle"): css = lyr.GetCustomSectionStyle() if css is None: print(" Layer hat KEIN Custom-SectionStyle") else: for n in sorted(dir(css)): if n.startswith("_"): continue try: v = getattr(css, n) if callable(v): continue sv = str(v) if len(sv) > 80: sv = sv[:77] + "..." print(" {} = {}".format(n, sv)) except Exception: pass except Exception as ex: print(" err:", ex)