Alle LISP-Module auf ssg-cfg-or umgestellt (hardcodierte Konstanten entfernt)
Alle bisher hart codierten Geometrie-, Farb- und Default-Werte in den
LISP-Modulen werden jetzt ueber ssg-cfg-or aus component_defaults.json
gelesen (mit Fallback auf den bisherigen Wert als Sicherheitsnetz).
Lisp/KreiselInsert.lsp:
- Geometrie-Konstanten: *kreisel-durchmesser*, *kreisel-pin-abstand*,
*kreisel-default-laenge*, *kreisel-default-hoehe*, *eckrad-default-hoehe*
- Beschriftungs-Einstellungen: Texthöhe, Farbe, Abstand
- Linienfarben (color_linie_1/2, color_pin) fuer Layer/CECOLOR
- Toleranzen: toleranz_kollinear, toleranz_winkel
Lisp/OmniModulInsert.lsp:
- Default-Werte fuer HOEHE und DREHUNG beim Einfuegen und Bearbeiten
- Textgroessen (textHeight, textGap) fuer Vorschau-Dialog
- Max-Laengen fuer AP60, AP110, APG110
Lisp/VarioFoerderer.lsp:
- staustrecke-basis, FESTE_HORIZONTAL
- bogen-winkel Liste (zweifach, in Bibliotheks-Extraktion und Berechnung)
- gefaelle_winkel (3°) an allen Stellen im Anlagen-Aufbau
- skalierung_basis fuer Block-Skalierung
- separator_block_dx/dz, station_block_dx/dz fuer Blockeinfuegung
Lisp/Gefaellestrecke.lsp:
- Default-Wert fuer deltaL, default_winkel
- separator_breite fuer Laengenberechnung
Lisp/export.lsp:
- default_hoehe fuer HOEHE-Attribut-Fallback in Bogen/Weiche/Gerade
- default_gerade_laenge fuer Laenge-Fallback
- mm_pro_meter (1000.0) fuer Umrechnung mm->m bei Laengenangaben
Lisp/ssg_dialog.lsp:
- dialog_preview_bg_color (-18) fuer fill_image Hintergrundfarbe
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+18
-18
@@ -450,8 +450,8 @@
|
||||
(if (null *OMNI-BOEGEN*) (omni:load-data))
|
||||
|
||||
;; Defaults
|
||||
(if (null init-hoehe) (setq init-hoehe "2000"))
|
||||
(if (null init-drehung) (setq init-drehung "0"))
|
||||
(if (null init-hoehe) (setq init-hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
||||
(if (null init-drehung) (setq init-drehung (ssg-cfg-or "omniflo" "default_drehung" "0")))
|
||||
|
||||
;; Boegen nach Winkel filtern
|
||||
(setq boegen-liste (omni:filter *OMNI-BOEGEN* "KurvenWinkel" winkel))
|
||||
@@ -591,8 +591,8 @@
|
||||
srcAttribs attribDefs attribs
|
||||
ok)
|
||||
|
||||
(setq textHeight 100.0)
|
||||
(setq textGap 20.0)
|
||||
(setq textHeight (ssg-cfg-or "omniflo" "text_height" 100.0))
|
||||
(setq textGap (ssg-cfg-or "omniflo" "text_gap" 20.0))
|
||||
|
||||
;; 0. Attribute aus der Quell-.dwg lesen (vor ssg-start, da eigene INSERT/ERASE)
|
||||
(setq srcAttribs (ssg-attrib-read-dwg (strcat *block-path* blockname ".dwg")))
|
||||
@@ -728,15 +728,15 @@
|
||||
)
|
||||
|
||||
(defun c:OMNI_AP60 ()
|
||||
(omni:insert-block "AP60" 7000.0)
|
||||
(omni:insert-block "AP60" (ssg-cfg-or "omniflo" "laengemax_ap60" 7000.0))
|
||||
(princ)
|
||||
)
|
||||
(defun c:OMNI_AP110 ()
|
||||
(omni:insert-block "AP110" 6000.0)
|
||||
(omni:insert-block "AP110" (ssg-cfg-or "omniflo" "laengemax_ap110" 6000.0))
|
||||
(princ)
|
||||
)
|
||||
(defun c:OMNI_APG110 ()
|
||||
(omni:insert-block "APG110" 6000.0)
|
||||
(omni:insert-block "APG110" (ssg-cfg-or "omniflo" "laengemax_apg110" 6000.0))
|
||||
(princ)
|
||||
)
|
||||
|
||||
@@ -844,8 +844,8 @@
|
||||
(if (null *OMNI-WEICHEN*) (omni:load-data))
|
||||
|
||||
;; Defaults
|
||||
(if (null init-hoehe) (setq init-hoehe "2000"))
|
||||
(if (null init-drehung) (setq init-drehung "0"))
|
||||
(if (null init-hoehe) (setq init-hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
||||
(if (null init-drehung) (setq init-drehung (ssg-cfg-or "omniflo" "default_drehung" "0")))
|
||||
|
||||
;; Weichen nach Winkel filtern (nil = alle Winkel)
|
||||
(if winkel
|
||||
@@ -981,13 +981,13 @@
|
||||
;; HOEHE und DREHUNG Attribute setzen
|
||||
(if (and blockEnt (= (cdr (assoc 0 (entget blockEnt))) "INSERT"))
|
||||
(ssg-attrib-set-on blockEnt
|
||||
(list (cons "HOEHE" (if hoehe hoehe "2000"))
|
||||
(cons "DREHUNG" (if drehung drehung "0"))))
|
||||
(list (cons "HOEHE" (if hoehe hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
||||
(cons "DREHUNG" (if drehung drehung (ssg-cfg-or "omniflo" "default_drehung" "0")))))
|
||||
)
|
||||
|
||||
(princ (strcat "\n[OMNI] " sivasnr-str " eingefuegt."
|
||||
" Hoehe=" (if hoehe hoehe "2000")
|
||||
" Drehung=" (if drehung drehung "0")))
|
||||
" Hoehe=" (if hoehe hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000"))
|
||||
" Drehung=" (if drehung drehung (ssg-cfg-or "omniflo" "default_drehung" "0"))))
|
||||
(ssg-end)
|
||||
pt
|
||||
)
|
||||
@@ -1199,7 +1199,7 @@
|
||||
(setq drehung (cdr (assoc "DREHUNG" attribs)))
|
||||
|
||||
;; Fallbacks
|
||||
(if (null hoehe) (setq hoehe "2000"))
|
||||
(if (null hoehe) (setq hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
||||
(if (null drehung) (setq drehung (rtos rotation 2 1)))
|
||||
|
||||
;; 3. Typ bestimmen: Bogen oder Weiche
|
||||
@@ -1294,13 +1294,13 @@
|
||||
;; Attribute setzen
|
||||
(if (and blockEnt (= (cdr (assoc 0 (entget blockEnt))) "INSERT"))
|
||||
(ssg-attrib-set-on blockEnt
|
||||
(list (cons "HOEHE" (if new-hoehe new-hoehe "2000"))
|
||||
(cons "DREHUNG" (if new-drehung new-drehung "0"))))
|
||||
(list (cons "HOEHE" (if new-hoehe new-hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
||||
(cons "DREHUNG" (if new-drehung new-drehung (ssg-cfg-or "omniflo" "default_drehung" "0")))))
|
||||
)
|
||||
|
||||
(princ (strcat "\n[OMNI] Element aktualisiert: " sivasnr-str
|
||||
" Hoehe=" (if new-hoehe new-hoehe "2000")
|
||||
" Drehung=" (if new-drehung new-drehung "0")))
|
||||
" Hoehe=" (if new-hoehe new-hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000"))
|
||||
" Drehung=" (if new-drehung new-drehung (ssg-cfg-or "omniflo" "default_drehung" "0"))))
|
||||
|
||||
(ssg-end)
|
||||
(princ)
|
||||
|
||||
Reference in New Issue
Block a user