18d6d98e07
- C#-Plugin "DOSSIER" mit 23 nativen Commands (dWall, dDoor, ..., dSection)
- Native Command-Namen + Autocomplete + saubere History
- Idle-Defer + RhinoCode-API → kein _-RunPythonScript-Echo
- Yak-Paket via build.sh, Install in ~/Library/.../packages/8.0/
- Launcher (Tauri):
- dossier_init Tauri-Command + Setup-Tab in Settings
- Yak-Install + StartupCommands-XML + Window-Layout in einem Schritt
- clean-rhino.sh fuer reproduzierbare Resets
- check_dossier_initialized triggert Auto-Open-Setup beim ersten Start
- Wand-Architektur:
- Chain-Logik DEAKTIVIERT → jede Wand baut eigenes Volume (individuell
anwaehlbar, einzeln loeschbar)
- Polyline-Wand: jedes Segment = eigene Wand
- Smart-Split fuer wand_axis/decke/dach/raum/aussparung/traeger
- Auto-Group axis+volume → kein ChooseOne-Dialog, Delete loescht beides
- Stale-Mitre-Fix: Joint-Cache wird vor jedem Wand-Regen invalidiert
- T-Junction-Tolerance auf 1mm (war 1cm, lieferte falsche T-Mitres)
- Wand-Stile:
- Schema in dossier_project_settings.wand_styles (Material + Prio +
Default-Dicke + Referenz, oder Layered mit Schichten)
- dWall-Command Stil-Picker
- ProjectSettingsDialog: Sidebar-Layout (Pill-Selection) +
Wandstile-Tab mit Liste/Editor
- _wand_chain_compat benutzt style_id
- Prio-Dominanz: hoehere Prio gewinnt Eckverbindung, niedrigere wird
T-mitered (siehe _resolve_corner_miter)
- Cmd+G fuer Group (Geschoss-Up auf Alias 'gu')
- Welcome + Cheatsheet borderless mit X/Back-Buttons
- BeginCommand-Hook fuer Gestaltung-Panel-Auto-Open
- panel_base: Python.NET-Enum-Fix fuer Material-Render
58 lines
2.3 KiB
Python
58 lines
2.3 KiB
Python
#! python3
|
|
# -*- coding: utf-8 -*-
|
|
# Wrapper fuer dSection: interaktiver Schnitt-Pick (2 Punkte + Blickrichtung).
|
|
# Defaults kommen aus Project-Settings.defaults; nach erfolgreicher
|
|
# Erstellung wird der neue Schnitt als aktive Zeichnungs-Ebene gesetzt.
|
|
import sys, os
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
|
import Rhino
|
|
import scriptcontext as sc
|
|
|
|
doc = Rhino.RhinoDoc.ActiveDoc
|
|
if doc is None:
|
|
print("[SECTION] kein aktives Dokument")
|
|
else:
|
|
try:
|
|
import schnitte
|
|
# Defaults aus Project-Settings; Fallback auf hartkodierte Werte.
|
|
defaults = {
|
|
"depthBack": 8.0, "heightMin": -1.0, "heightMax": 12.0,
|
|
"cutAtLine": True, "namePrefix": "S",
|
|
}
|
|
try:
|
|
import rhinopanel
|
|
ps = rhinopanel.load_project_settings(doc)
|
|
d = (ps or {}).get("defaults", {})
|
|
defaults["depthBack"] = float(d.get("schnittDepthBack", 8.0))
|
|
defaults["heightMin"] = float(d.get("schnittHeightMin", -1.0))
|
|
defaults["heightMax"] = float(d.get("schnittHeightMax", 12.0))
|
|
except Exception as ex:
|
|
print("[SECTION] defaults from project-settings:", ex)
|
|
|
|
sid = schnitte.pick_schnitt_interactive(doc, defaults=defaults)
|
|
if not sid:
|
|
print("[SECTION] abgebrochen")
|
|
else:
|
|
# Broadcast neue Zeichnungs-Ebene an Panels + auto-aktivieren
|
|
try:
|
|
eb = sc.sticky.get("ebenen_bridge")
|
|
if eb is not None:
|
|
eb._send_state()
|
|
except Exception as ex:
|
|
print("[SECTION] broadcast:", ex)
|
|
try:
|
|
import json
|
|
zraw = doc.Strings.GetValue("dossier_zeichnungsebenen") or "[]"
|
|
z_list = json.loads(zraw)
|
|
new_z = next((x for x in z_list
|
|
if isinstance(x, dict) and x.get("id") == sid), None)
|
|
if new_z is not None:
|
|
eb = sc.sticky.get("ebenen_bridge")
|
|
if eb is not None:
|
|
eb._set_active_zeichnungsebene(new_z)
|
|
print("[SECTION] erstellt: {}".format(sid))
|
|
except Exception as ex:
|
|
print("[SECTION] auto-activate:", ex)
|
|
except Exception as ex:
|
|
print("[SECTION] error:", ex)
|