AGPL-3.0 Dual-Lizenz + Pill-Stil-UI + Section-Style-Overhaul + Plan-Mode-Template
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)
This commit is contained in:
+25
-19
@@ -1,5 +1,7 @@
|
||||
#! python 3
|
||||
# -*- coding: utf-8 -*-
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (C) 2026 Karim Gabriele Varano
|
||||
"""
|
||||
layer_builder.py
|
||||
Layer-Struktur:
|
||||
@@ -157,6 +159,9 @@ def _apply_section_style(doc, layer, section_cfg, layer_color):
|
||||
pat = (section_cfg.get("hatchPattern") or "None").strip()
|
||||
show = bool(section_cfg.get("boundaryShow", True))
|
||||
diag = "[SS:{}]".format(layer.Name if layer else "?")
|
||||
# DEBUG: zeigt was an section_cfg ankommt (zur Diagnose des Hatch-Bugs)
|
||||
print(diag, "section_cfg.hatchPattern='{}' scale={} rot={}".format(
|
||||
pat, section_cfg.get("hatchScale"), section_cfg.get("hatchRotation")))
|
||||
|
||||
# Wenn weder Hatch noch Boundary → Custom-Style entfernen
|
||||
if pat == "None" and not show:
|
||||
@@ -194,17 +199,20 @@ def _apply_section_style(doc, layer, section_cfg, layer_color):
|
||||
rot_deg = float(section_cfg.get("hatchRotation") or 0)
|
||||
_try_set(style, ("HatchRotation", "HatchAngle"), math.radians(rot_deg))
|
||||
|
||||
# Hatch-Color: explizit ColorFromObject setzen damit der eigene Wert greift
|
||||
# Hatch-Color: explizit setzen — wenn User keine Override-Farbe angegeben
|
||||
# hat, nehmen wir die Layer-Farbe als Default (sonst rendert Rhino sonst
|
||||
# schwarz). Section-Style hat keine ByLayer-Option, also Farbwert
|
||||
# explizit reinkopieren.
|
||||
hatch_color = section_cfg.get("hatchColor")
|
||||
if hatch_color:
|
||||
col = _color(hatch_color)
|
||||
set_color = _try_set(style, ("HatchColor", "FillColor"), col)
|
||||
# Source auf "FromObject" — sonst nutzt Rhino den Layer-Color
|
||||
src_from_object = _enum_int(
|
||||
(("DocObjects", "ObjectColorSource"), "ColorFromObject"))
|
||||
if src_from_object is not None:
|
||||
_try_set(style, ("HatchColorSource", "FillColorSource"), src_from_object)
|
||||
print(diag, "HatchColor via {}".format(set_color))
|
||||
elif layer_color is not None:
|
||||
col = _color(layer_color) if isinstance(layer_color, str) else layer_color
|
||||
else:
|
||||
col = None
|
||||
if col is not None:
|
||||
set_color = _try_set(style, ("HatchPatternColor", "HatchColor", "FillColor"), col)
|
||||
print(diag, "HatchColor via {} (default=layer)".format(set_color))
|
||||
|
||||
# Background (viewport=0/transparent vs object=1)
|
||||
bg = section_cfg.get("background")
|
||||
@@ -226,20 +234,18 @@ def _apply_section_style(doc, layer, section_cfg, layer_color):
|
||||
print(diag, "BoundaryVisible={} via {}".format(show, set_show))
|
||||
|
||||
if show:
|
||||
# Boundary-Color: setze Color + Source auf FromObject
|
||||
# Boundary-Color: User-Override oder Layer-Farbe als Default
|
||||
bc = section_cfg.get("boundaryColor")
|
||||
if bc:
|
||||
col = _color(bc)
|
||||
bcol = _color(bc)
|
||||
elif layer_color is not None:
|
||||
bcol = _color(layer_color) if isinstance(layer_color, str) else layer_color
|
||||
else:
|
||||
bcol = None
|
||||
if bcol is not None:
|
||||
set_to = _try_set(style,
|
||||
("BoundaryColor", "OutlineColor", "EdgeColor"), col)
|
||||
src_from_object = _enum_int(
|
||||
(("DocObjects", "ObjectColorSource"), "ColorFromObject"))
|
||||
if src_from_object is not None:
|
||||
_try_set(style,
|
||||
("BoundaryColorSource", "OutlineColorSource",
|
||||
"EdgeColorSource"),
|
||||
src_from_object)
|
||||
print(diag, "BoundaryColor={} via {}".format(bc, set_to))
|
||||
("BoundaryColor", "OutlineColor", "EdgeColor"), bcol)
|
||||
print(diag, "BoundaryColor via {} (default=layer)".format(set_to))
|
||||
|
||||
# Width-Scale auf PlotWeight uebertragen (RW8 hat keine WidthScale direkt;
|
||||
# alternative Property-Namen probieren)
|
||||
|
||||
Reference in New Issue
Block a user