Linientypen + Schraffuren-Tabs in Project-Settings + Datei-Import

Project-Settings hat jetzt 4 Tabs:
- Voreinstellungen (kompakte InlineNumberField, gruppiert in Sections)
- Materialien (List/Detail, ohne Hatch)
- Linientypen (List/Detail mit SVG-Strich-Vorschau)
- Schraffuren (List/Detail mit echtem HatchLine-Renderer)

Backend (rhinopanel.py):
- _list_linetypes_full liefert Segmente {length, type: Line/Space/Dot}
  (Mac Rhino 8 GetSegment returnt (length, isLine: bool))
- _list_hatch_patterns_full liefert HatchLines mit angle/base/offset/dashes
  (hl.Dashes optional ueber 3 API-Variants)
- CRUD: RENAME / DELETE / LOAD_DEFAULTS
- File-Import: IMPORT_LINETYPE_FILE (.lin), IMPORT_HATCH_FILE (.pat)
  via Eto.OpenFileDialog → Linetypes.Load / HatchPatterns.LoadFromFile

Frontend (ProjectSettingsDialog.jsx):
- LinetypePreview: SVG mit tile-fenster (4 Repetitions), Line als <line>,
  Dot als <circle>, currentColor fuer Renderer-Robustheit
- HatchPreview: rendert pro HatchLine alle parallelen Linien mit Angle,
  Offset (Spacing + Stagger), Dashes als stroke-dasharray
- TABLES_UPDATED Message vom Backend re-rendert Listen
- Import-Pills im List-Footer

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 03:14:28 +02:00
parent 8d3b3af882
commit a597b58c93
3 changed files with 764 additions and 1 deletions
+10
View File
@@ -194,6 +194,16 @@ export function openLibrary() { send('OPEN_LIBRARY', {}) }
export function pickTextureFile(slot) {
send('PICK_TEXTURE_FILE', { slot: slot || 'diffuse' })
}
// Linetype-Tabelle (doc.Linetypes) verwalten — Antwort via
// TABLES_UPDATED-Message mit {linetypes, hatchPatternsFull}.
export function renameLinetype(index, name) { send('RENAME_LINETYPE', { index, name }) }
export function deleteLinetype(index) { send('DELETE_LINETYPE', { index }) }
export function loadLinetypeDefaults() { send('LOAD_LINETYPE_DEFAULTS', {}) }
export function importLinetypeFile() { send('IMPORT_LINETYPE_FILE', {}) }
// Hatch-Pattern-Tabelle (doc.HatchPatterns) verwalten
export function renameHatch(index, name) { send('RENAME_HATCH', { index, name }) }
export function deleteHatch(index) { send('DELETE_HATCH', { index }) }
export function importHatchFile() { send('IMPORT_HATCH_FILE', {}) }
// Schnitt/Ansicht — interaktiver 2-Punkt-Pick im Rhino-Viewport. Erzeugt
// eine neue Zeichnungsebene type=schnitt + 2D-Plan-Symbol + aktiviert sie.
// opts: { cutAtLine: bool, depthBack: m, heightMin: m, heightMax: m, namePrefix }