[ADD] Funktionen und Menü zum Hinzufügen von Omniflo TEF Bauteilen integriert
This commit is contained in:
+22
-10
@@ -872,7 +872,7 @@
|
||||
;; hoehe = Hoehe in mm als String (wird als HOEHE-Attribut gesetzt)
|
||||
;; drehung = Drehwinkel in Grad als String (Block-Rotation)
|
||||
;; Rueckgabe: Einfuegepunkt oder nil bei Abbruch
|
||||
(defun omni:insert-dxf (sivasnr-str hoehe drehung / dxf-pfad omniflo-pfad pt angleDeg blockEnt attribs layer-name)
|
||||
(defun omni:insert-dxf (sivasnr-str hoehe drehung / dxf-pfad omniflo-pfad pt angleDeg winkel-rad drehung-anzeige blockEnt attribs layer-name)
|
||||
(setq omniflo-pfad (getenv "DXFM_OMNIFLO"))
|
||||
(if (null omniflo-pfad)
|
||||
(progn
|
||||
@@ -895,8 +895,18 @@
|
||||
(setvar "ATTREQ" 0)
|
||||
(setvar "ATTDIA" 0)
|
||||
|
||||
;; Drehwinkel aus Dialog verwenden
|
||||
(setq angleDeg (if drehung (atof drehung) 0.0))
|
||||
;; Drehwinkel aus Dialog uebernehmen, sonst interaktiv am Einfuegepunkt abfragen
|
||||
(if drehung
|
||||
(progn
|
||||
(setq angleDeg (atof drehung))
|
||||
(setq drehung-anzeige drehung)
|
||||
)
|
||||
(progn
|
||||
(setq winkel-rad (getangle pt (ssg-text "omni-prompt-drehwinkel")))
|
||||
(setq angleDeg (if winkel-rad (* winkel-rad (/ 180.0 pi)) 0.0))
|
||||
(setq drehung-anzeige (rtos angleDeg 2 1))
|
||||
)
|
||||
)
|
||||
|
||||
;; Hoehe als Z-Koordinate auf den Einfuegepunkt anwenden
|
||||
(if (and hoehe (/= hoehe ""))
|
||||
@@ -916,7 +926,7 @@
|
||||
;; HOEHE und DREHUNG Attribute setzen
|
||||
(ssg-attrib-set-on blockEnt
|
||||
(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")))))
|
||||
(cons "DREHUNG" drehung-anzeige)))
|
||||
|
||||
;; Layer aus LAYER-Attribut lesen und Block verschieben
|
||||
(setq attribs (ssg-attrib-read blockEnt))
|
||||
@@ -940,7 +950,7 @@
|
||||
(list
|
||||
sivasnr-str
|
||||
(if hoehe hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000"))
|
||||
(if drehung drehung (ssg-cfg-or "omniflo" "default_drehung" "0"))
|
||||
drehung-anzeige
|
||||
(if layer-name (strcat " Layer=" layer-name) "")
|
||||
)))
|
||||
(ssg-end)
|
||||
@@ -1271,28 +1281,30 @@
|
||||
|
||||
|
||||
;; --- Omniflo / TEF Elemente ---
|
||||
;; Feste TEF-Bauteile ohne Sivas-Auswahl: Datei liegt direkt unter DXFM_OMNIFLO,
|
||||
;; wird per omni:insert-dxf am gewaehlten Einfuegepunkt ohne Drehung eingefuegt.
|
||||
(defun c:OMNI_TEF_UmlenkR ()
|
||||
(princ "\n[DUMMY] Umlenkspannst. rechts fuer TEF links")
|
||||
(omni:insert-dxf "Umlenkspannst_TEF_rechts" nil nil)
|
||||
(princ)
|
||||
)
|
||||
|
||||
(defun c:OMNI_TEF_UmlenkL ()
|
||||
(princ "\n[DUMMY] Umlenkspannst. links fuer TEF rechts")
|
||||
(omni:insert-dxf "Umlenkspannst_TEF_links" nil nil)
|
||||
(princ)
|
||||
)
|
||||
|
||||
(defun c:OMNI_TEF_AntriebL ()
|
||||
(princ "\n[DUMMY] Antriebst. links fuer TEF links")
|
||||
(omni:insert-dxf "0_B10010" nil nil)
|
||||
(princ)
|
||||
)
|
||||
|
||||
(defun c:OMNI_TEF_AntriebR ()
|
||||
(princ "\n[DUMMY] Antriebst. rechts fuer TEF rechts")
|
||||
(omni:insert-dxf "0_B10020" nil nil)
|
||||
(princ)
|
||||
)
|
||||
|
||||
(defun c:OMNI_TEF_Gerade ()
|
||||
(princ "\n[DUMMY] TEF Gerade")
|
||||
(omni:insert-dxf "0_B10030" nil nil)
|
||||
(princ)
|
||||
)
|
||||
|
||||
|
||||
+4268
-2294
File diff suppressed because it is too large
Load Diff
+6831
-4857
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -226,6 +226,7 @@
|
||||
"omni-info-bogen-prompt": "\nSivasId des Bogens eingeben: ",
|
||||
"omni-info-weiche-prompt": "\nSivasId der Weiche eingeben: ",
|
||||
"omni-insert-keine-attribute": "\n[OMNI] Keine Attribute im Quell-Block gefunden.",
|
||||
"omni-prompt-drehwinkel": "\nDrehwinkel angeben: ",
|
||||
"omni-prompt-einfuegepunkt": "\nEinfuegepunkt waehlen: ",
|
||||
"omni-prompt-endpunkt-fahrstrecke": "\nEndpunkt der Fahrstrecke waehlen: ",
|
||||
"omni-weiche-dialog-ladefehler": "Weichen-Dialog konnte nicht geladen werden.",
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
"omni-info-bogen-prompt": "\nEnter Sivas ID of the arc: ",
|
||||
"omni-info-weiche-prompt": "\nEnter Sivas ID of the switch: ",
|
||||
"omni-insert-keine-attribute": "\n[OMNI] No attributes found on source block.",
|
||||
"omni-prompt-drehwinkel": "\nSpecify rotation angle: ",
|
||||
"omni-prompt-einfuegepunkt": "\nSelect insertion point: ",
|
||||
"omni-prompt-endpunkt-fahrstrecke": "\nSelect end point of the travel path: ",
|
||||
"omni-weiche-dialog-ladefehler": "Switch dialog could not be loaded.",
|
||||
|
||||
+7
-5
@@ -72,11 +72,13 @@
|
||||
[Delta 1400/700 M]^C^C(ssg-ensure "OmniModulInsert") OMNI_WKomb_Delta
|
||||
[<-Star 1400/1400 M]^C^C(ssg-ensure "OmniModulInsert") OMNI_WKomb_Star
|
||||
[->TEF Elemente]
|
||||
[~Umlenkspannst. rechts fuer TEF links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkR
|
||||
[~Umlenkspannst. links fuer TEF rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkL
|
||||
[~Antriebst. links fuer TEF links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebL
|
||||
[~Antriebst. rechts fuer TEF rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebR
|
||||
[<-~TEF Gerade]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_Gerade
|
||||
[TEF Antriebst. rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebR
|
||||
[TEF Umlenkspannst. rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkR
|
||||
[--]
|
||||
[TEF Antriebst. links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebL
|
||||
[TEF Umlenkspannst. links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkL
|
||||
[--]
|
||||
[<-TEF Gerade]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_Gerade
|
||||
[~KettenFoerderer]^C^C(ssg-ensure "OmniModulInsert") OMNI_KettenFoerderer
|
||||
[->Verbinder]
|
||||
[~TV W-W kpl]^C^C(ssg-ensure "OmniModulInsert") OMNI_TV_W_W
|
||||
|
||||
Reference in New Issue
Block a user