Uebersetzung aller Benutzermeldungen auf ssg-text/ssg-textf umgestellt
Vollstaendiger i18n-Rollout ueber alle Feature- und Kernmodule: alle benutzersichtbaren princ/prompt/getXXX/alert-Texte laufen jetzt ueber die zentrale Sprachtabelle in ssg_lang.lsp (Deutsch/Englisch, umschaltbar via SSG_SPRACHE). 403 Tabelleneintraege, 497 Aufrufstellen in 17 Dateien. Ausgeschlossen wie geplant: Debug-Ausgaben (dbg*), Lademeldungen, [DUMMY]-Platzhalter, [CFG]/[OMNI]-Diagnosemarker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+107
-116
@@ -31,7 +31,7 @@
|
||||
(strcat (substr *ssg-lisp-pfad* 1 (vl-string-search "/Lisp" *ssg-lisp-pfad*))
|
||||
"/data/ils/" *ki-dxfm-dim* "/"))
|
||||
(t
|
||||
(princ "\n[KreiselInsert] WARNUNG: Block-Pfad nicht ermittelbar!")
|
||||
(princ (ssg-text "kreisel-warn-blockpfad"))
|
||||
nil)
|
||||
)
|
||||
)
|
||||
@@ -58,7 +58,7 @@
|
||||
(defun ssg-cfg-or (sektion schluessel standard) standard)
|
||||
(defun ssg-cfg (sektion schluessel) nil)
|
||||
(defun ssg-load-config () nil)
|
||||
(princ "\n[KreiselInsert] WARNUNG: ssg_core.lsp nicht gefunden - Standardwerte.")
|
||||
(princ (ssg-text "kreisel-warn-core-fehlt"))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -122,7 +122,7 @@
|
||||
(progn
|
||||
;; Neuen Textstil mit Arial erstellen
|
||||
(command "_.STYLE" style-name "Arial" 0 1 0 "N" "N" "N")
|
||||
(princ (strcat "\n-> Textstil '" style-name "' mit Arial erstellt"))
|
||||
(princ (ssg-textf "kreisel-textstil-erstellt" (list style-name)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
(cons 11 insertPoint) ;; Ausrichtungspunkt
|
||||
))
|
||||
|
||||
(princ (strcat "\n-> Beschriftung: " textStr " (Höhe=" (rtos textHoehe 2 0) "mm, Arial, zentriert)"))
|
||||
(princ (ssg-textf "kreisel-beschriftung-erzeugt" (list textStr (rtos textHoehe 2 0))))
|
||||
textStr
|
||||
)
|
||||
|
||||
@@ -230,9 +230,9 @@
|
||||
|
||||
;; Kreiselart abfragen. Rueckgabe: "PIN" oder "STANDARD"
|
||||
(defun kreisel-ask-typ ( / typNum typ)
|
||||
(princ "\n[1] STANDARD (ohne PIN)")
|
||||
(princ "\n[2] PIN")
|
||||
(princ (strcat "\nBitte waehlen <" (if (= #Kreisel_Typ "PIN") "2" "1") ">: "))
|
||||
(princ (ssg-text "kreisel-typ-opt-standard"))
|
||||
(princ (ssg-text "kreisel-typ-opt-pin"))
|
||||
(princ (ssg-textf "kreisel-typ-prompt" (list (if (= #Kreisel_Typ "PIN") "2" "1"))))
|
||||
(setq typNum (getstring ""))
|
||||
(cond
|
||||
((= typNum "2") (setq typ "PIN"))
|
||||
@@ -337,7 +337,7 @@
|
||||
(progn
|
||||
(setq z-hoehe (caddr basePoint))
|
||||
(setq block-hoehe (rtos z-hoehe 2 0))
|
||||
(princ (strcat "\n-> Höhe aus Basispunkt übernommen: " block-hoehe))
|
||||
(princ (ssg-textf "kreisel-hoehe-aus-basispunkt" (list block-hoehe)))
|
||||
)
|
||||
(progn
|
||||
;; Höhe aus Attributen lesen
|
||||
@@ -454,12 +454,12 @@
|
||||
;; --- Block erzeugen (Entities werden aus Zeichnung entfernt) ---
|
||||
(if (> (sslength ss) 0)
|
||||
(command "_.-BLOCK" bname (list 0.0 0.0 0.0) ss "")
|
||||
(princ "\nFehler: Keine Entities zum Block erstellen!")
|
||||
(princ (ssg-text "kreisel-fehler-keine-entities"))
|
||||
)
|
||||
|
||||
(princ (strcat "\n-> Neue Blockdefinition: " bname))
|
||||
|
||||
(princ (ssg-textf "kreisel-neue-blockdef" (list bname)))
|
||||
)
|
||||
(princ (strcat "\n-> Verwende bestehende Blockdefinition: " bname))
|
||||
(princ (ssg-textf "kreisel-bestehende-blockdef" (list bname)))
|
||||
)
|
||||
|
||||
;; --- Block am Zielpunkt einfuegen (ohne Attribut-Dialog) ---
|
||||
@@ -495,8 +495,7 @@
|
||||
(if (atoms-family 1 '("ssg-id-generate"))
|
||||
(ssg-id-generate block-ent)
|
||||
)
|
||||
(princ (strcat "\n-> Kreisel #" (itoa kreisel-nummer) " eingefügt: " bname
|
||||
" (Höhe=" block-hoehe ")"))
|
||||
(princ (ssg-textf "kreisel-eingefuegt" (list (itoa kreisel-nummer) bname block-hoehe)))
|
||||
(entlast)
|
||||
)
|
||||
|
||||
@@ -514,19 +513,19 @@
|
||||
;; --------------------------------------------
|
||||
(defun c:KreiselInsert ( / pt abstand typ rotation rotStr hoehe
|
||||
selectedEnt blockAttribs oldOsmode)
|
||||
(ssg-start "Kreisel Modul einfuegen" '(("OSMODE") ("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-insert") '(("OSMODE") ("CECOLOR")))
|
||||
|
||||
;; Temporär Osnap für Blockerkennung setzen
|
||||
(setq oldOsmode (getvar "OSMODE"))
|
||||
(setvar "OSMODE" (logior oldOsmode 512)) ;; 512 = INS (Block-Einfügepunkt)
|
||||
|
||||
;; 1. Einfuegepunkt
|
||||
(setq pt (getpoint "\nBasispunkt (AN-Seite): "))
|
||||
(if (null pt)
|
||||
(progn
|
||||
(setq pt (getpoint (ssg-text "kreisel-prompt-basispunkt")))
|
||||
(if (null pt)
|
||||
(progn
|
||||
(setvar "OSMODE" oldOsmode)
|
||||
(ssg-end)
|
||||
(princ "\nBefehl abgebrochen.")
|
||||
(ssg-end)
|
||||
(princ (ssg-text "kreisel-abbruch-befehl"))
|
||||
(princ)
|
||||
(return)
|
||||
)
|
||||
@@ -546,41 +545,39 @@
|
||||
(setq blockAttribs (ssg-attrib-read selectedEnt))
|
||||
(assoc "HOEHE" blockAttribs))
|
||||
(setq hoehe (atof (cdr (assoc "HOEHE" blockAttribs))))
|
||||
(princ (strcat "\n-> Höhe von bestehendem Kreisel übernommen: " (rtos hoehe 2 0)))
|
||||
(princ (ssg-textf "kreisel-hoehe-von-bestehendem" (list (rtos hoehe 2 0))))
|
||||
)
|
||||
;; Fall 2: Punkt hat Z-Koordinate > 0
|
||||
((and (> (length pt) 2) (> (caddr pt) 0))
|
||||
(setq hoehe (caddr pt))
|
||||
(princ (strcat "\n-> Höhe aus 3D-Punkt übernommen: " (rtos hoehe 2 0)))
|
||||
(princ (ssg-textf "kreisel-hoehe-aus-3dpunkt" (list (rtos hoehe 2 0))))
|
||||
)
|
||||
;; Fall 3: Sonst separat abfragen
|
||||
(t
|
||||
(setq hoehe (getreal (strcat "\nHöhe (Z-Koordinate) <" (rtos *kreisel-default-hoehe* 2 0) ">: ")))
|
||||
(setq hoehe (getreal (ssg-textf "kreisel-prompt-hoehe-z" (list (rtos *kreisel-default-hoehe* 2 0)))))
|
||||
(if (null hoehe) (setq hoehe *kreisel-default-hoehe*))
|
||||
)
|
||||
)
|
||||
|
||||
;; 3. Abstand
|
||||
(initget 6)
|
||||
(setq abstand (getdist (list (car pt) (cadr pt))
|
||||
(strcat "\nAbstand (Tangentenlaenge) <"
|
||||
(rtos *kreisel-default-laenge* 2 0) ">: ")))
|
||||
(setq abstand (getdist (list (car pt) (cadr pt))
|
||||
(ssg-textf "kreisel-prompt-abstand" (list (rtos *kreisel-default-laenge* 2 0)))))
|
||||
(if (null abstand) (setq abstand *kreisel-default-laenge*))
|
||||
(princ (strcat "\n-> Abstand: " (rtos abstand 2 0) " mm"))
|
||||
|
||||
(princ (ssg-textf "kreisel-abstand-ausgabe" (list (rtos abstand 2 0))))
|
||||
|
||||
;; 4. Rotation
|
||||
(setq rotStr (getstring "\nRotation in Grad <0>: "))
|
||||
(setq rotStr (getstring (ssg-text "kreisel-prompt-rotation")))
|
||||
(if (= rotStr "")
|
||||
(setq rotation 0.0)
|
||||
(setq rotation (atof rotStr))
|
||||
)
|
||||
|
||||
|
||||
;; 5. Kreiselart
|
||||
(setq typ (kreisel-ask-typ))
|
||||
|
||||
(princ (strcat "\n-> Rotation: " (rtos rotation 2 1)
|
||||
" Höhe: " (rtos hoehe 2 0)
|
||||
" Kreiselart: " typ))
|
||||
(princ (ssg-textf "kreisel-insert-zusammenfassung"
|
||||
(list (rtos rotation 2 1) (rtos hoehe 2 0) typ)))
|
||||
|
||||
;; 6. Modul einfuegen
|
||||
(draw-module (list (car pt) (cadr pt) hoehe) abstand rotation
|
||||
@@ -590,7 +587,7 @@
|
||||
;; KEIN weiteres (setvar "OSMODE" ...) mehr nötig!
|
||||
;; ssg-end stellt nur CLAYER und CMDECHO wieder her, nicht OSMODE
|
||||
|
||||
(princ "\nKreisel Modul eingefuegt.")
|
||||
(princ (ssg-text "kreisel-insert-fertig"))
|
||||
(ssg-end)
|
||||
)
|
||||
|
||||
@@ -607,20 +604,20 @@
|
||||
;; -----------------------------------------------
|
||||
(defun c:KreiselConnect ( / ptStart ptEnd dx dy dist abstand rotation typ hoehe)
|
||||
|
||||
(ssg-start "Kreisel Smart Connect" '(("OSMODE") ("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-connect") '(("OSMODE") ("CECOLOR")))
|
||||
|
||||
(princ "\n--- Kreisel durch Linie definieren (AN -> SP) ---")
|
||||
(princ (ssg-text "kreisel-connect-header"))
|
||||
|
||||
;; 1. Startpunkt (aeusserster Punkt AN-Seite)
|
||||
(setq ptStart (getpoint "\nStartpunkt (AN-Seite aussen): "))
|
||||
(setq ptStart (getpoint (ssg-text "kreisel-prompt-startpunkt")))
|
||||
(if (null ptStart)
|
||||
(progn (ssg-end) (princ "\nAbgebrochen.") (princ) (exit))
|
||||
(progn (ssg-end) (princ (ssg-text "kreisel-abgebrochen")) (princ) (exit))
|
||||
)
|
||||
|
||||
;; 2. Endpunkt (aeusserster Punkt SP-Seite) mit Gummiband
|
||||
(setq ptEnd (getpoint ptStart "\nEndpunkt (SP-Seite aussen): "))
|
||||
(setq ptEnd (getpoint ptStart (ssg-text "kreisel-prompt-endpunkt")))
|
||||
(if (null ptEnd)
|
||||
(progn (ssg-end) (princ "\nAbgebrochen.") (princ) (exit))
|
||||
(progn (ssg-end) (princ (ssg-text "kreisel-abgebrochen")) (princ) (exit))
|
||||
)
|
||||
|
||||
;; 3. Geometrie berechnen
|
||||
@@ -631,8 +628,8 @@
|
||||
|
||||
(if (<= abstand 0.0)
|
||||
(progn
|
||||
(ssg-emsg (strcat "Distanz zu klein! ("
|
||||
(rtos dist 2 0) " < " (rtos *kreisel-durchmesser* 2 0) ")"))
|
||||
(ssg-emsg (ssg-textf "kreisel-emsg-distanz-klein"
|
||||
(list (rtos dist 2 0) (rtos *kreisel-durchmesser* 2 0))))
|
||||
(ssg-end)
|
||||
(exit)
|
||||
)
|
||||
@@ -648,26 +645,24 @@
|
||||
)
|
||||
(if (<= hoehe 0.0)
|
||||
(progn
|
||||
(setq hoehe (getreal (strcat "\nHoehe (Z-Koordinate) <" (rtos *kreisel-default-hoehe* 2 0) ">: ")))
|
||||
(setq hoehe (getreal (ssg-textf "kreisel-prompt-hoehe-z" (list (rtos *kreisel-default-hoehe* 2 0)))))
|
||||
(if (null hoehe) (setq hoehe *kreisel-default-hoehe*))
|
||||
)
|
||||
(princ (strcat "\n-> Hoehe aus Startpunkt uebernommen: " (rtos hoehe 2 0)))
|
||||
(princ (ssg-textf "kreisel-hoehe-aus-startpunkt" (list (rtos hoehe 2 0))))
|
||||
)
|
||||
|
||||
;; 6. Kreiselart abfragen
|
||||
(setq typ (kreisel-ask-typ))
|
||||
|
||||
(princ (strcat "\n-> Abstand: " (rtos abstand 2 0) " mm"
|
||||
" Rotation: " (rtos rotation 2 1) " Grad"
|
||||
" Hoehe: " (rtos hoehe 2 0)
|
||||
" Kreiselart: " typ))
|
||||
(princ (ssg-textf "kreisel-connect-zusammenfassung"
|
||||
(list (rtos abstand 2 0) (rtos rotation 2 1) (rtos hoehe 2 0) typ)))
|
||||
|
||||
;; 7. Modul einfuegen
|
||||
(draw-module (list (car ptStart) (cadr ptStart) hoehe) abstand rotation
|
||||
(list (cons "KREISELART" typ)
|
||||
(cons "HOEHE" (rtos hoehe 2 0))))
|
||||
|
||||
(princ "\nKreisel Connect erfolgreich!")
|
||||
(princ (ssg-text "kreisel-connect-erfolgreich"))
|
||||
(ssg-end)
|
||||
)
|
||||
|
||||
@@ -684,7 +679,7 @@
|
||||
;; hoehe : Hoehe in mm (oder nil fuer Z aus pt)
|
||||
;; Rueckgabe: Entity-Name des erzeugten Blocks oder nil
|
||||
(defun kreisel-insert-script (pt abstand rotation typ hoehe / z blockEnt)
|
||||
(ssg-start "Kreisel Script Insert" '(("OSMODE") ("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-script-insert") '(("OSMODE") ("CECOLOR")))
|
||||
(if (null typ) (setq typ "STANDARD"))
|
||||
(setq z (if hoehe hoehe
|
||||
(if (and pt (caddr pt)) (caddr pt) *kreisel-default-hoehe*)))
|
||||
@@ -703,14 +698,14 @@
|
||||
;; hoehe : Hoehe in mm (oder nil fuer Z aus ptStart)
|
||||
;; Rueckgabe: Entity-Name des erzeugten Blocks oder nil
|
||||
(defun kreisel-connect-script (ptStart ptEnd typ hoehe / dx dy dist abstand rotation z blockEnt)
|
||||
(ssg-start "Kreisel Script Connect" '(("OSMODE") ("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-script-connect") '(("OSMODE") ("CECOLOR")))
|
||||
(if (null typ) (setq typ "STANDARD"))
|
||||
(setq dx (- (car ptEnd) (car ptStart))
|
||||
dy (- (cadr ptEnd) (cadr ptStart)))
|
||||
(setq dist (sqrt (+ (* dx dx) (* dy dy))))
|
||||
(setq abstand (- dist *kreisel-durchmesser*))
|
||||
(if (<= abstand 0.0)
|
||||
(progn (princ (strcat "\n[Connect] Distanz zu klein: " (rtos dist 2 0)))
|
||||
(progn (princ (ssg-textf "kreisel-script-distanz-klein" (list (rtos dist 2 0))))
|
||||
(ssg-end) nil)
|
||||
(progn
|
||||
(setq rotation (* (/ 180.0 pi) (atan dy dx)))
|
||||
@@ -727,19 +722,19 @@
|
||||
|
||||
;; Neue Befehle für Beschriftungs-Einstellungen
|
||||
(defun c:KreiselLabelPos ( / dx dy)
|
||||
(setq dx (getreal (strcat "\nX-Abstand von AN8-Mitte <" (rtos *kreisel-beschriftung-abstand-x* 2 0) ">: ")))
|
||||
(setq dx (getreal (ssg-textf "kreisel-prompt-x-abstand" (list (rtos *kreisel-beschriftung-abstand-x* 2 0)))))
|
||||
(if dx (setq *kreisel-beschriftung-abstand-x* dx))
|
||||
(setq dy (getreal (strcat "\nY-Abstand von AN8-Mitte <" (rtos *kreisel-beschriftung-abstand-y* 2 0) ">: ")))
|
||||
(setq dy (getreal (ssg-textf "kreisel-prompt-y-abstand" (list (rtos *kreisel-beschriftung-abstand-y* 2 0)))))
|
||||
(if dy (setq *kreisel-beschriftung-abstand-y* dy))
|
||||
(princ (strcat "\nNeue Beschriftungsposition: X=" (rtos *kreisel-beschriftung-abstand-x* 2 0)
|
||||
" Y=" (rtos *kreisel-beschriftung-abstand-y* 2 0)))
|
||||
(princ (ssg-textf "kreisel-neue-beschriftungsposition"
|
||||
(list (rtos *kreisel-beschriftung-abstand-x* 2 0) (rtos *kreisel-beschriftung-abstand-y* 2 0))))
|
||||
(princ)
|
||||
)
|
||||
|
||||
(defun c:KreiselLabelHoehe ( / h)
|
||||
(setq h (getreal (strcat "\nTexthöhe <" (rtos *kreisel-beschriftung-hoehe* 2 0) ">: ")))
|
||||
(setq h (getreal (ssg-textf "kreisel-prompt-texthoehe" (list (rtos *kreisel-beschriftung-hoehe* 2 0)))))
|
||||
(if h (setq *kreisel-beschriftung-hoehe* h))
|
||||
(princ (strcat "\nNeue Texthöhe: " (rtos *kreisel-beschriftung-hoehe* 2 0)))
|
||||
(princ (ssg-textf "kreisel-neue-texthoehe" (list (rtos *kreisel-beschriftung-hoehe* 2 0))))
|
||||
(princ)
|
||||
)
|
||||
|
||||
@@ -753,17 +748,17 @@
|
||||
;; -----------------------------------------------
|
||||
(defun c:KreiselRedraw ( / sel ent ed attribs basePoint rotation newAbstand)
|
||||
|
||||
(ssg-start "Kreisel Neu Zeichnen" '(("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-redraw") '(("CECOLOR")))
|
||||
|
||||
;; 1. Bestehenden Kreisel-Block auswaehlen
|
||||
(setq sel (entsel "\nKreisel-Block auswaehlen: "))
|
||||
(setq sel (entsel (ssg-text "kreisel-prompt-block-auswaehlen")))
|
||||
(if (null sel) (exit))
|
||||
(setq ent (car sel))
|
||||
(setq ed (entget ent))
|
||||
|
||||
;; Pruefen ob INSERT
|
||||
(if (/= (cdr (assoc 0 ed)) "INSERT")
|
||||
(progn (ssg-emsg "Kein Block ausgewaehlt!") (exit))
|
||||
(progn (ssg-emsg (ssg-text "kreisel-emsg-kein-block")) (exit))
|
||||
)
|
||||
|
||||
;; 2. Bestehende Werte auslesen
|
||||
@@ -772,19 +767,20 @@
|
||||
(setq rotation (* (/ 180.0 pi) (cdr (assoc 50 ed))))
|
||||
|
||||
;; NEU - Höhe aus Attributen lesen und anzeigen:
|
||||
(princ (strcat "\n-> Bestehend: Abstand=" (cdr (assoc "ABSTAND" attribs))
|
||||
" Drehung=" (cdr (assoc "DREHUNG" attribs))
|
||||
" Höhe=" (cdr (assoc "HOEHE" attribs)) ;; <-- NEU
|
||||
" Art=" (cdr (assoc "KREISELART" attribs))))
|
||||
(princ (ssg-textf "kreisel-redraw-bestehend"
|
||||
(list (cdr (assoc "ABSTAND" attribs))
|
||||
(cdr (assoc "DREHUNG" attribs))
|
||||
(cdr (assoc "HOEHE" attribs))
|
||||
(cdr (assoc "KREISELART" attribs)))))
|
||||
|
||||
;; 3. Neuen Abstand abfragen (Enter = beibehalten)
|
||||
(initget 6)
|
||||
(setq newAbstand (getdist (strcat "\nNeuer Abstand <" (cdr (assoc "ABSTAND" attribs)) ">: ")))
|
||||
(setq newAbstand (getdist (ssg-textf "kreisel-prompt-neuer-abstand" (list (cdr (assoc "ABSTAND" attribs))))))
|
||||
(if (null newAbstand)
|
||||
(setq newAbstand (atof (cdr (assoc "ABSTAND" attribs))))
|
||||
)
|
||||
;; NEU - Neue Höhe abfragen:
|
||||
(setq newHoehe (getreal (strcat "\nNeue Höhe <" (cdr (assoc "HOEHE" attribs)) ">: ")))
|
||||
(setq newHoehe (getreal (ssg-textf "kreisel-prompt-neue-hoehe" (list (cdr (assoc "HOEHE" attribs))))))
|
||||
(if (null newHoehe)
|
||||
(setq newHoehe (atof (cdr (assoc "HOEHE" attribs))))
|
||||
)
|
||||
@@ -795,7 +791,7 @@
|
||||
(draw-module (list (car basePoint) (cadr basePoint) newHoehe)
|
||||
newAbstand rotation attribs)
|
||||
|
||||
(princ (strcat "\nKreisel neu gezeichnet. Abstand=" (rtos newAbstand 2 0)))
|
||||
(princ (ssg-textf "kreisel-redraw-fertig" (list (rtos newAbstand 2 0))))
|
||||
(ssg-end)
|
||||
)
|
||||
|
||||
@@ -804,17 +800,17 @@
|
||||
;; KreiselQuick: Schnell mit Defaults (horizontal)
|
||||
;; --------------------------------------------
|
||||
(defun c:KreiselQuick ( / pt)
|
||||
(ssg-start "Kreisel Schnell Einfuegen" '(("CECOLOR")))
|
||||
(setq pt (getpoint "\nBasispunkt (AN-Seite): "))
|
||||
(ssg-start (ssg-text "kreisel-start-quick") '(("CECOLOR")))
|
||||
(setq pt (getpoint (ssg-text "kreisel-prompt-basispunkt")))
|
||||
;; NEU - Höhe abfragen:
|
||||
(setq hoehe (getreal (strcat "\nHöhe (Z-Koordinate) <0>: ")))
|
||||
(setq hoehe (getreal (ssg-textf "kreisel-prompt-hoehe-z" (list "0"))))
|
||||
(if (null hoehe) (setq hoehe 0.0))
|
||||
(if pt
|
||||
;; NEU - Höhe im Aufruf übergeben:
|
||||
(draw-module (list (car pt) (cadr pt) hoehe) *kreisel-default-laenge* 0.0
|
||||
(draw-module (list (car pt) (cadr pt) hoehe) *kreisel-default-laenge* 0.0
|
||||
(list (cons "HOEHE" (rtos hoehe 2 0))))
|
||||
)
|
||||
(princ "\nSchnell Einfuegen fertig.")
|
||||
(princ (ssg-text "kreisel-quick-fertig"))
|
||||
(ssg-end)
|
||||
)
|
||||
|
||||
@@ -870,13 +866,13 @@
|
||||
(setq ent (ssname ss 0))
|
||||
)
|
||||
|
||||
(ssg-start "Kreisel bearbeiten" '(("OSMODE") ("CECOLOR") ("ATTREQ") ("ATTDIA")))
|
||||
(ssg-start (ssg-text "kreisel-start-edit") '(("OSMODE") ("CECOLOR") ("ATTREQ") ("ATTDIA")))
|
||||
(setvar "OSMODE" 0)
|
||||
|
||||
;; 1. Block auswaehlen (falls nicht vorselektiert)
|
||||
(if (null ent)
|
||||
(progn
|
||||
(setq sel (entsel "\nKreisel-Block auswaehlen: "))
|
||||
(setq sel (entsel (ssg-text "kreisel-prompt-block-auswaehlen")))
|
||||
(if sel (setq ent (car sel)))
|
||||
)
|
||||
)
|
||||
@@ -884,7 +880,7 @@
|
||||
|
||||
(setq ed (entget ent))
|
||||
(if (/= (cdr (assoc 0 ed)) "INSERT")
|
||||
(progn (ssg-emsg "Kein Block ausgewaehlt!") (ssg-end) (exit))
|
||||
(progn (ssg-emsg (ssg-text "kreisel-emsg-kein-block")) (ssg-end) (exit))
|
||||
)
|
||||
|
||||
;; 2. Bestehende Werte auslesen
|
||||
@@ -895,7 +891,7 @@
|
||||
;; Pruefen ob Block Kreisel-Attribute hat (mindestens ABSTAND)
|
||||
(if (null (assoc "ABSTAND" attribs))
|
||||
(progn
|
||||
(ssg-emsg "Kein Kreisel-Block! (Attribut ABSTAND fehlt)")
|
||||
(ssg-emsg (ssg-text "kreisel-emsg-kein-kreisel-block"))
|
||||
(ssg-end)
|
||||
(exit)
|
||||
)
|
||||
@@ -912,15 +908,14 @@
|
||||
(setq attribs (subst (cons "HOEHE" (rtos (if (caddr basePoint) (caddr basePoint) 0.0) 2 1))
|
||||
(assoc "HOEHE" attribs) attribs))
|
||||
|
||||
(princ (strcat "\n-> Bestehend: Abstand=" (cdr (assoc "ABSTAND" attribs))
|
||||
" Drehung=" (rtos rotation 2 1)
|
||||
" Art=" (cdr (assoc "KREISELART" attribs))))
|
||||
(princ (ssg-textf "kreisel-edit-bestehend"
|
||||
(list (cdr (assoc "ABSTAND" attribs)) (rtos rotation 2 1) (cdr (assoc "KREISELART" attribs)))))
|
||||
|
||||
;; 3. DCL-Dialog laden
|
||||
(setq dcl-pfad (strcat (getenv "DXFM_DCL") "/kreisel_edit.dcl"))
|
||||
(setq dat (load_dialog dcl-pfad))
|
||||
(if (not (new_dialog "kreisel_edit" dat))
|
||||
(progn (alert (strcat "Dialog nicht verfuegbar: " dcl-pfad)) (ssg-end) (exit))
|
||||
(progn (alert (ssg-textf "kreisel-edit-dialog-fehlt" (list dcl-pfad))) (ssg-end) (exit))
|
||||
)
|
||||
|
||||
;; Ausrichtungs-Labels fuer popup_list aufbauen
|
||||
@@ -999,13 +994,10 @@
|
||||
(draw-module (list (car basePoint) (cadr basePoint) (atof dlg-hoehe))
|
||||
newAbstand newRotation attribs)
|
||||
|
||||
(princ (strcat "\nKreisel aktualisiert: "
|
||||
"Name=" dlg-name
|
||||
" Abstand=" (rtos newAbstand 2 0)
|
||||
" Hoehe=" dlg-hoehe
|
||||
" Rotation=" (rtos newRotation 2 1)))
|
||||
(princ (ssg-textf "kreisel-edit-aktualisiert"
|
||||
(list dlg-name (rtos newAbstand 2 0) dlg-hoehe (rtos newRotation 2 1))))
|
||||
)
|
||||
(princ "\nAbgebrochen.")
|
||||
(princ (ssg-text "kreisel-abgebrochen"))
|
||||
)
|
||||
|
||||
(ssg-end)
|
||||
@@ -1016,13 +1008,13 @@
|
||||
;; KreiselParams: Aktuelle Parameter anzeigen
|
||||
;; --------------------------------------------
|
||||
(defun c:KreiselParams ()
|
||||
(princ "\n=== Kreisel Parameter ===")
|
||||
(princ (strcat "\nKreiselart: " #Kreisel_Typ))
|
||||
(princ (strcat "\nDurchmesser: " (rtos *kreisel-durchmesser* 2 0)))
|
||||
(princ (strcat "\nDefault-Laenge: " (rtos *kreisel-default-laenge* 2 0)))
|
||||
(princ (ssg-text "kreisel-params-header"))
|
||||
(princ (ssg-textf "kreisel-params-typ" (list #Kreisel_Typ)))
|
||||
(princ (ssg-textf "kreisel-params-durchmesser" (list (rtos *kreisel-durchmesser* 2 0))))
|
||||
(princ (ssg-textf "kreisel-params-default-laenge" (list (rtos *kreisel-default-laenge* 2 0))))
|
||||
;; NEU - Default-Höhe anzeigen:
|
||||
(princ (strcat "\nDefault-Höhe: " (rtos *kreisel-default-hoehe* 2 0)))
|
||||
(princ "\nAttribute im Block:")
|
||||
(princ (ssg-textf "kreisel-params-default-hoehe" (list (rtos *kreisel-default-hoehe* 2 0))))
|
||||
(princ (ssg-text "kreisel-params-attribute-header"))
|
||||
(foreach def *kreisel-attrib-defs*
|
||||
(princ (strcat "\n " (car def) " = " (cadr def)))
|
||||
)
|
||||
@@ -1045,12 +1037,12 @@
|
||||
(dbgf "c:ILS_Eckrad")
|
||||
|
||||
;; 1. Beruehrpunkt (Tangentenpunkt)
|
||||
(setq ptTangent (getpoint "\nBeruehrpunkt Eckrad (Tangente): "))
|
||||
(setq ptTangent (getpoint (ssg-text "kreisel-eckrad-beruehrpunkt")))
|
||||
(if (null ptTangent) (progn (dbgreturn nil) (exit)))
|
||||
(dbg 'ptTangent)
|
||||
|
||||
;; 2. Richtungspunkt (Gummiband vom Beruehrpunkt)
|
||||
(setq ptDir (getpoint ptTangent "\nRichtung zum Kreismittelpunkt: "))
|
||||
(setq ptDir (getpoint ptTangent (ssg-text "kreisel-eckrad-richtung")))
|
||||
(if (null ptDir) (progn (dbgreturn nil) (exit)))
|
||||
(dbg 'ptDir)
|
||||
|
||||
@@ -1061,7 +1053,7 @@
|
||||
|
||||
(if (<= dist (ssg-cfg-or "kreisel" "toleranz_min_distanz" 0.001))
|
||||
(progn
|
||||
(princ "\nFehler: Beruehr- und Richtungspunkt sind identisch!")
|
||||
(princ (ssg-text "kreisel-eckrad-fehler-identisch"))
|
||||
(dbgreturn nil)
|
||||
(exit)
|
||||
)
|
||||
@@ -1087,10 +1079,10 @@
|
||||
(if (and (> (length ptTangent) 2) (caddr ptTangent) (> (caddr ptTangent) 0))
|
||||
(progn
|
||||
(setq hoehe (caddr ptTangent))
|
||||
(princ (strcat "\n-> Hoehe aus 3D-Punkt uebernommen: " (rtos hoehe 2 0)))
|
||||
(princ (ssg-textf "kreisel-hoehe-aus-3dpunkt" (list (rtos hoehe 2 0))))
|
||||
)
|
||||
(progn
|
||||
(setq hoehe (getreal (strcat "\nHoehe (Z-Koordinate) <" (rtos *eckrad-default-hoehe* 2 0) ">: ")))
|
||||
(setq hoehe (getreal (ssg-textf "kreisel-prompt-hoehe-z" (list (rtos *eckrad-default-hoehe* 2 0)))))
|
||||
(if (null hoehe) (setq hoehe *eckrad-default-hoehe*))
|
||||
)
|
||||
)
|
||||
@@ -1118,7 +1110,7 @@
|
||||
(dbg 'pt)
|
||||
(dbg 'rotation)
|
||||
|
||||
(ssg-start "Eckrad einfuegen" '(("ATTREQ") ("ATTDIA") ("OSMODE") ("CECOLOR")))
|
||||
(ssg-start (ssg-text "kreisel-start-eckrad") '(("ATTREQ") ("ATTDIA") ("OSMODE") ("CECOLOR")))
|
||||
|
||||
;; Attribute vorbereiten
|
||||
(setq attribs (ssg-attrib-merge attribs *eckrad-attrib-defs*))
|
||||
@@ -1215,14 +1207,14 @@
|
||||
(dbgp (strcat "Blockdefinition erzeugt: " bname))
|
||||
)
|
||||
(progn
|
||||
(princ "\nFehler: Keine Entities zum Block erstellen!")
|
||||
(princ (ssg-text "kreisel-fehler-keine-entities"))
|
||||
(dbgp "FEHLER: Keine Entities fuer Block!")
|
||||
)
|
||||
)
|
||||
(princ (strcat "\n-> Neue Blockdefinition: " bname))
|
||||
(princ (ssg-textf "kreisel-neue-blockdef" (list bname)))
|
||||
)
|
||||
(progn
|
||||
(princ (strcat "\n-> Verwende bestehende Blockdefinition: " bname))
|
||||
(princ (ssg-textf "kreisel-bestehende-blockdef" (list bname)))
|
||||
(dbgp (strcat "Verwende bestehende Blockdefinition: " bname))
|
||||
)
|
||||
)
|
||||
@@ -1259,29 +1251,28 @@
|
||||
)
|
||||
(entupd block-ent)
|
||||
|
||||
(princ (strcat "\n-> Eckrad #" (itoa eckrad-nummer) " eingefuegt: " bname
|
||||
" bei " (rtos (car pt) 2 1) "," (rtos (cadr pt) 2 1)
|
||||
" Rotation=" (rtos rotation 2 1)
|
||||
" Hoehe=" block-hoehe))
|
||||
(princ (ssg-textf "kreisel-eckrad-eingefuegt"
|
||||
(list (itoa eckrad-nummer) bname (rtos (car pt) 2 1) (rtos (cadr pt) 2 1)
|
||||
(rtos rotation 2 1) block-hoehe)))
|
||||
(ssg-end)
|
||||
(dbgreturn (entlast))
|
||||
)
|
||||
|
||||
;; NEU: KreiselLabelSetup - Hier einfügen!
|
||||
(defun c:KreiselLabelSetup ( / hoehe farbe abstand schriftart)
|
||||
(setq hoehe (getreal (strcat "\nSchrifthöhe <" (rtos *kreisel-beschriftung-hoehe* 2 0) ">: ")))
|
||||
(setq hoehe (getreal (ssg-textf "kreisel-prompt-schrifthoehe" (list (rtos *kreisel-beschriftung-hoehe* 2 0)))))
|
||||
(if hoehe (setq *kreisel-beschriftung-hoehe* hoehe))
|
||||
|
||||
(setq farbe (getint (strcat "\nSchriftfarbe (1=Rot,2=Gelb,3=Grün,4=Cyan,5=Blau,6=Magenta,7=Weiß) <" (itoa *kreisel-beschriftung-farbe*) ">: ")))
|
||||
|
||||
(setq farbe (getint (ssg-textf "kreisel-prompt-schriftfarbe" (list (itoa *kreisel-beschriftung-farbe*)))))
|
||||
(if farbe (setq *kreisel-beschriftung-farbe* farbe))
|
||||
|
||||
(setq abstand (getreal (strcat "\nAbstand über Kreisel-Mitte <" (rtos *kreisel-beschriftung-abstand-oben* 2 0) ">: ")))
|
||||
|
||||
(setq abstand (getreal (ssg-textf "kreisel-prompt-abstand-oben" (list (rtos *kreisel-beschriftung-abstand-oben* 2 0)))))
|
||||
(if abstand (setq *kreisel-beschriftung-abstand-oben* abstand))
|
||||
|
||||
(princ (strcat "\nNeue Einstellungen: Höhe=" (rtos *kreisel-beschriftung-hoehe* 2 0)
|
||||
", Farbe=" (itoa *kreisel-beschriftung-farbe*)
|
||||
", Y-Versatz=" (rtos *kreisel-beschriftung-abstand-oben* 2 0)
|
||||
", Schriftart=Arial"))
|
||||
|
||||
(princ (ssg-textf "kreisel-labelsetup-fertig"
|
||||
(list (rtos *kreisel-beschriftung-hoehe* 2 0)
|
||||
(itoa *kreisel-beschriftung-farbe*)
|
||||
(rtos *kreisel-beschriftung-abstand-oben* 2 0))))
|
||||
(princ)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user