[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)
|
;; hoehe = Hoehe in mm als String (wird als HOEHE-Attribut gesetzt)
|
||||||
;; drehung = Drehwinkel in Grad als String (Block-Rotation)
|
;; drehung = Drehwinkel in Grad als String (Block-Rotation)
|
||||||
;; Rueckgabe: Einfuegepunkt oder nil bei Abbruch
|
;; 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"))
|
(setq omniflo-pfad (getenv "DXFM_OMNIFLO"))
|
||||||
(if (null omniflo-pfad)
|
(if (null omniflo-pfad)
|
||||||
(progn
|
(progn
|
||||||
@@ -895,8 +895,18 @@
|
|||||||
(setvar "ATTREQ" 0)
|
(setvar "ATTREQ" 0)
|
||||||
(setvar "ATTDIA" 0)
|
(setvar "ATTDIA" 0)
|
||||||
|
|
||||||
;; Drehwinkel aus Dialog verwenden
|
;; Drehwinkel aus Dialog uebernehmen, sonst interaktiv am Einfuegepunkt abfragen
|
||||||
(setq angleDeg (if drehung (atof drehung) 0.0))
|
(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
|
;; Hoehe als Z-Koordinate auf den Einfuegepunkt anwenden
|
||||||
(if (and hoehe (/= hoehe ""))
|
(if (and hoehe (/= hoehe ""))
|
||||||
@@ -916,7 +926,7 @@
|
|||||||
;; HOEHE und DREHUNG Attribute setzen
|
;; HOEHE und DREHUNG Attribute setzen
|
||||||
(ssg-attrib-set-on blockEnt
|
(ssg-attrib-set-on blockEnt
|
||||||
(list (cons "HOEHE" (if hoehe hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000")))
|
(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
|
;; Layer aus LAYER-Attribut lesen und Block verschieben
|
||||||
(setq attribs (ssg-attrib-read blockEnt))
|
(setq attribs (ssg-attrib-read blockEnt))
|
||||||
@@ -940,7 +950,7 @@
|
|||||||
(list
|
(list
|
||||||
sivasnr-str
|
sivasnr-str
|
||||||
(if hoehe hoehe (ssg-cfg-or "omniflo" "default_hoehe" "2000"))
|
(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) "")
|
(if layer-name (strcat " Layer=" layer-name) "")
|
||||||
)))
|
)))
|
||||||
(ssg-end)
|
(ssg-end)
|
||||||
@@ -1271,28 +1281,30 @@
|
|||||||
|
|
||||||
|
|
||||||
;; --- Omniflo / TEF Elemente ---
|
;; --- 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 ()
|
(defun c:OMNI_TEF_UmlenkR ()
|
||||||
(princ "\n[DUMMY] Umlenkspannst. rechts fuer TEF links")
|
(omni:insert-dxf "Umlenkspannst_TEF_rechts" nil nil)
|
||||||
(princ)
|
(princ)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_TEF_UmlenkL ()
|
(defun c:OMNI_TEF_UmlenkL ()
|
||||||
(princ "\n[DUMMY] Umlenkspannst. links fuer TEF rechts")
|
(omni:insert-dxf "Umlenkspannst_TEF_links" nil nil)
|
||||||
(princ)
|
(princ)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_TEF_AntriebL ()
|
(defun c:OMNI_TEF_AntriebL ()
|
||||||
(princ "\n[DUMMY] Antriebst. links fuer TEF links")
|
(omni:insert-dxf "0_B10010" nil nil)
|
||||||
(princ)
|
(princ)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_TEF_AntriebR ()
|
(defun c:OMNI_TEF_AntriebR ()
|
||||||
(princ "\n[DUMMY] Antriebst. rechts fuer TEF rechts")
|
(omni:insert-dxf "0_B10020" nil nil)
|
||||||
(princ)
|
(princ)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_TEF_Gerade ()
|
(defun c:OMNI_TEF_Gerade ()
|
||||||
(princ "\n[DUMMY] TEF Gerade")
|
(omni:insert-dxf "0_B10030" nil nil)
|
||||||
(princ)
|
(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-bogen-prompt": "\nSivasId des Bogens eingeben: ",
|
||||||
"omni-info-weiche-prompt": "\nSivasId der Weiche eingeben: ",
|
"omni-info-weiche-prompt": "\nSivasId der Weiche eingeben: ",
|
||||||
"omni-insert-keine-attribute": "\n[OMNI] Keine Attribute im Quell-Block gefunden.",
|
"omni-insert-keine-attribute": "\n[OMNI] Keine Attribute im Quell-Block gefunden.",
|
||||||
|
"omni-prompt-drehwinkel": "\nDrehwinkel angeben: ",
|
||||||
"omni-prompt-einfuegepunkt": "\nEinfuegepunkt waehlen: ",
|
"omni-prompt-einfuegepunkt": "\nEinfuegepunkt waehlen: ",
|
||||||
"omni-prompt-endpunkt-fahrstrecke": "\nEndpunkt der Fahrstrecke waehlen: ",
|
"omni-prompt-endpunkt-fahrstrecke": "\nEndpunkt der Fahrstrecke waehlen: ",
|
||||||
"omni-weiche-dialog-ladefehler": "Weichen-Dialog konnte nicht geladen werden.",
|
"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-bogen-prompt": "\nEnter Sivas ID of the arc: ",
|
||||||
"omni-info-weiche-prompt": "\nEnter Sivas ID of the switch: ",
|
"omni-info-weiche-prompt": "\nEnter Sivas ID of the switch: ",
|
||||||
"omni-insert-keine-attribute": "\n[OMNI] No attributes found on source block.",
|
"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-einfuegepunkt": "\nSelect insertion point: ",
|
||||||
"omni-prompt-endpunkt-fahrstrecke": "\nSelect end point of the travel path: ",
|
"omni-prompt-endpunkt-fahrstrecke": "\nSelect end point of the travel path: ",
|
||||||
"omni-weiche-dialog-ladefehler": "Switch dialog could not be loaded.",
|
"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
|
[Delta 1400/700 M]^C^C(ssg-ensure "OmniModulInsert") OMNI_WKomb_Delta
|
||||||
[<-Star 1400/1400 M]^C^C(ssg-ensure "OmniModulInsert") OMNI_WKomb_Star
|
[<-Star 1400/1400 M]^C^C(ssg-ensure "OmniModulInsert") OMNI_WKomb_Star
|
||||||
[->TEF Elemente]
|
[->TEF Elemente]
|
||||||
[~Umlenkspannst. rechts fuer TEF links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkR
|
[TEF Antriebst. rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebR
|
||||||
[~Umlenkspannst. links fuer TEF rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkL
|
[TEF Umlenkspannst. rechts]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_UmlenkR
|
||||||
[~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 Antriebst. links]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_AntriebL
|
||||||
[<-~TEF Gerade]^C^C(ssg-ensure "OmniModulInsert") OMNI_TEF_Gerade
|
[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
|
[~KettenFoerderer]^C^C(ssg-ensure "OmniModulInsert") OMNI_KettenFoerderer
|
||||||
[->Verbinder]
|
[->Verbinder]
|
||||||
[~TV W-W kpl]^C^C(ssg-ensure "OmniModulInsert") OMNI_TV_W_W
|
[~TV W-W kpl]^C^C(ssg-ensure "OmniModulInsert") OMNI_TV_W_W
|
||||||
|
|||||||
Reference in New Issue
Block a user