Motorseite (links/rechts) fuer Motor-/Umlenkstation im VF-Dialog waehlbar (Override vf-motorseite, MOTORSEITE-Attribut, Edit/Batch erhalten die Seite)
This commit is contained in:
+12
-1
@@ -244,6 +244,17 @@
|
||||
(make-frame-from-dir punkt (hz-winkel->xu hz winkel))
|
||||
)
|
||||
|
||||
;; ------------------------------------------------------------
|
||||
;; MOTORSEITE (Motor-/Umlenkstation links|rechts)
|
||||
;; ------------------------------------------------------------
|
||||
;; Wird vom Bau-Ablauf (Dialog/Edit) vor dem Einfuegen gesetzt und von
|
||||
;; vfs-vf-entry/vfs-vf-exit (bzw. Etage) beim Blocknamen gelesen. Analog zum
|
||||
;; Dimensions-Override *ssg-ils-dim*, damit die Seite nicht durch saemtliche
|
||||
;; Funktionssignaturen gefaedelt werden muss. Default "rechts".
|
||||
(if (not (boundp '*vf-motorseite*)) (setq *vf-motorseite* nil))
|
||||
(defun vf-motorseite-aktuell ( / )
|
||||
(if (member *vf-motorseite* '("links" "rechts")) *vf-motorseite* "rechts"))
|
||||
|
||||
;; ============================================================
|
||||
;; TEIL 5: KS_EIN/KS_AUS EXTRAKTION
|
||||
;; ============================================================
|
||||
@@ -1131,7 +1142,7 @@
|
||||
(cons "GF_WINKEL" (strcat (rtos (float (ssg-cfg-or "vario" "gefaelle_winkel" 3)) 2 1)
|
||||
"," (rtos (float (ssg-cfg-or "vario" "gefaelle_winkel" 3)) 2 1)))
|
||||
(cons "ANZAHL_VF" "1") ; ein VF-Koerper
|
||||
(cons "MOTORSEITE" "rechts")
|
||||
(cons "MOTORSEITE" (vf-motorseite-aktuell))
|
||||
(cons "L_VF_m" (rtos (/ L_VF 1000.0) 2 3))
|
||||
(cons "ANTRIEBFAHRTRICHTUNG" richtung)
|
||||
(cons "VF_WINKEL" (itoa best-winkel))
|
||||
|
||||
+2
-2
@@ -685,7 +685,7 @@
|
||||
;; 6. Umlenkstation (3 Grad geneigt)
|
||||
(princ (ssg-text "vfe-step6"))
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Vario_Umlenkstation_500mm" aktueller-punkt 3 500 0 cur-hz))
|
||||
(insert-rotated-block-with-ks (strcat "Vario_Umlenkstation_500mm_" (vf-motorseite-aktuell)) aktueller-punkt 3 500 0 cur-hz))
|
||||
|
||||
;; 7. 1. Vertikalbogen (3 Grad geneigt)
|
||||
(if (= richtung "Auf")
|
||||
@@ -756,7 +756,7 @@
|
||||
;; 10. Motorstation (3 Grad geneigt)
|
||||
(princ "\n\n10/15: Motorstation (500mm, 3 Grad geneigt)")
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Vario_Motorstation_500mm" aktueller-punkt 3 500 0 cur-hz))
|
||||
(insert-rotated-block-with-ks (strcat "Vario_Motorstation_500mm_" (vf-motorseite-aktuell)) aktueller-punkt 3 500 0 cur-hz))
|
||||
|
||||
;; 11. L_GF2 (3 Grad geneigt)
|
||||
(if (> L_GF2 0.1)
|
||||
|
||||
+39
-16
@@ -63,7 +63,8 @@
|
||||
(list "AS_Element_90_links" "AS_Element_90_rechts"
|
||||
"ES_Element_90_links" "ES_Element_90_rechts"
|
||||
"Staustrecke_SP_1000_mm" "Staustrecke_Separator_SP_300_mm"
|
||||
"Vario_Umlenkstation_500mm" "Vario_Motorstation_500mm")
|
||||
"Vario_Umlenkstation_500mm_links" "Vario_Umlenkstation_500mm_rechts"
|
||||
"Vario_Motorstation_500mm_links" "Vario_Motorstation_500mm_rechts")
|
||||
(mapcar (function (lambda (w) (strcat "Vario_Bogen_auf_" (itoa w)))) bogen-winkel)
|
||||
(mapcar (function (lambda (w) (strcat "Vario_Bogen_ab_" (itoa w)))) bogen-winkel)
|
||||
)
|
||||
@@ -495,7 +496,7 @@
|
||||
;; 3. Umlenkstation
|
||||
(princ (ssg-text "vfs-vf-eingang-umlenk"))
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Vario_Umlenkstation_500mm" aktueller-punkt
|
||||
(insert-rotated-block-with-ks (strcat "Vario_Umlenkstation_500mm_" (vf-motorseite-aktuell)) aktueller-punkt
|
||||
(ssg-cfg-or "vario" "gefaelle_winkel" 3)
|
||||
(ssg-cfg-or "vario" "station_block_dx" 500)
|
||||
(ssg-cfg-or "vario" "station_block_dz" 0) hz))
|
||||
@@ -632,7 +633,7 @@
|
||||
;; Motorstation
|
||||
(princ "\n\n[VF-Ausgang] Motorstation (500 mm, 3 Grad geneigt)")
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Vario_Motorstation_500mm" aktueller-punkt
|
||||
(insert-rotated-block-with-ks (strcat "Vario_Motorstation_500mm_" (vf-motorseite-aktuell)) aktueller-punkt
|
||||
(ssg-cfg-or "vario" "gefaelle_winkel" 3)
|
||||
(ssg-cfg-or "vario" "station_block_dx" 500)
|
||||
(ssg-cfg-or "vario" "station_block_dz" 0) hz))
|
||||
@@ -717,9 +718,9 @@
|
||||
;; geruest-einzelmodul geruest-typ) oder nil bei Abbruch.
|
||||
(defun vfs-dialog-eingabe-basis (prefill / dcl-pfad dat ergebnis
|
||||
dlg-deltal dlg-deltah dlg-richtung dlg-hoehe
|
||||
dlg-fahrtrichtung dlg-seite dlg-dimension
|
||||
dlg-fahrtrichtung dlg-seite dlg-motorseite dlg-dimension
|
||||
dlg-geruest-einzelmodul dlg-geruest-typ
|
||||
deltaL deltaH richtung hz seite z-start dim
|
||||
deltaL deltaH richtung hz seite z-start dim motorseite
|
||||
geruest-einzelmodul geruest-typ)
|
||||
(setq dcl-pfad (strcat (getenv "DXFM_DCL") "/variofoerderer.dcl"))
|
||||
(setq dat (load_dialog dcl-pfad))
|
||||
@@ -766,6 +767,14 @@
|
||||
(set_tile "seite"
|
||||
(if (and prefill (equal (cdr (assoc "seite" prefill)) "links")) "1" "0"))
|
||||
|
||||
;; Motorseite (Motor-/Umlenkstation links|rechts); Default rechts.
|
||||
(start_list "motorseite")
|
||||
(add_list (ssg-text "gf-dlg-rechts"))
|
||||
(add_list (ssg-text "gf-dlg-links"))
|
||||
(end_list)
|
||||
(set_tile "motorseite"
|
||||
(if (and prefill (equal (cdr (assoc "motorseite" prefill)) "links")) "1" "0"))
|
||||
|
||||
;; Darstellung 2D/3D: Vorbelegung aus prefill "dim" (Edit: erkannte
|
||||
;; Dimension des Blocks), sonst aktueller Modus (Neuanlage -> i.d.R. 3D).
|
||||
(start_list "dimension")
|
||||
@@ -791,6 +800,7 @@
|
||||
"(setq dlg-hoehe (get_tile \"einfuegehoehe\"))"
|
||||
"(setq dlg-fahrtrichtung (get_tile \"fahrtrichtung\"))"
|
||||
"(setq dlg-seite (get_tile \"seite\"))"
|
||||
"(setq dlg-motorseite (get_tile \"motorseite\"))"
|
||||
"(setq dlg-dimension (get_tile \"dimension\"))"
|
||||
"(setq dlg-geruest-einzelmodul (get_tile \"geruest_einzelmodul\"))"
|
||||
"(setq dlg-geruest-typ (get_tile \"geruest_typ\"))"
|
||||
@@ -814,10 +824,11 @@
|
||||
((= dlg-fahrtrichtung "3") 270.0)
|
||||
(t 0.0)))
|
||||
(setq seite (if (= dlg-seite "1") "links" "rechts"))
|
||||
(setq motorseite (if (= dlg-motorseite "1") "links" "rechts"))
|
||||
(setq dim (if (= dlg-dimension "1") "2D" "3D"))
|
||||
(setq geruest-einzelmodul dlg-geruest-einzelmodul)
|
||||
(setq geruest-typ (ssg-geruest-idx-to-typ (atoi dlg-geruest-typ)))
|
||||
(list deltaL deltaH richtung z-start hz seite dim geruest-einzelmodul geruest-typ)
|
||||
(list deltaL deltaH richtung z-start hz seite dim geruest-einzelmodul geruest-typ motorseite)
|
||||
)
|
||||
nil
|
||||
)
|
||||
@@ -1045,7 +1056,7 @@
|
||||
;; dann gemeinsame Berechnung/Winkel-Dialog/Einfuegung.
|
||||
(defun vfs-standard-dialog-ablauf (vf-nummer / eingabe deltaL deltaH richtung
|
||||
z-start hz seite startpunkt startpunkt-xy dim
|
||||
geruest-einzelmodul geruest-typ)
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq startpunkt-xy (getpoint (ssg-text "vfc-prompt-startpunkt-aus")))
|
||||
(if (null startpunkt-xy) (setq startpunkt-xy '(0 0 0)))
|
||||
|
||||
@@ -1061,13 +1072,16 @@
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe))
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt-xy) (cadr startpunkt-xy) z-start))
|
||||
;; Gewaehlte Dimension (2D/3D) fuer den Bau erzwingen (Override), danach zurueck.
|
||||
;; Gewaehlte Dimension (2D/3D) + Motorseite fuer den Bau erzwingen (Override), danach zurueck.
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(vfs-standard-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung startpunkt hz seite nil
|
||||
geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1079,7 +1093,7 @@
|
||||
(defun vf-konvertiere-ent (ent ziel-dim / ed bname xd attribs startpunkt hz
|
||||
deltaL deltaH richtung seite best-winkel L_GF_m-teile
|
||||
L_GF1 L_GF2 L_VF hoehe-von hoehe-bis lastEnt vf-insert vf-nummer
|
||||
geruest-einzelmodul geruest-typ)
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq ed (entget ent) bname (cdr (assoc 2 ed)))
|
||||
(setq xd (vfs-xdata-lesen ent))
|
||||
(if (and (wcmatch bname "VF_*") xd (= (car xd) "standard"))
|
||||
@@ -1096,14 +1110,16 @@
|
||||
(setq L_GF1 (* 1000.0 (atof (car L_GF_m-teile))))
|
||||
(setq L_GF2 (* 1000.0 (atof (cadr L_GF_m-teile))))
|
||||
(setq L_VF (* 1000.0 (atof (cond ((cdr (assoc "L_VF_m" attribs))) ("0.0")))))
|
||||
;; bestehende Geruest-Einstellungen erhalten
|
||||
;; bestehende Geruest-Einstellungen + Motorseite erhalten
|
||||
(setq geruest-einzelmodul (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("0")))
|
||||
(setq geruest-typ (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
(setq motorseite (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))
|
||||
(setq hoehe-von (caddr startpunkt))
|
||||
(setq hoehe-bis (cond ((= richtung "Auf") (+ hoehe-von deltaH))
|
||||
((= richtung "Ab") (- hoehe-von deltaH))
|
||||
(t hoehe-von)))
|
||||
(setq *ssg-ils-dim* ziel-dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(entdel ent)
|
||||
(setq lastEnt (vf-lastent-ohne-attribute))
|
||||
(variofoerderer-einfuegen deltaL deltaH richtung best-winkel L_GF1 L_GF2 L_VF startpunkt seite hz)
|
||||
@@ -1115,6 +1131,7 @@
|
||||
geruest-einzelmodul geruest-typ))
|
||||
(if vf-insert (vfs-xdata-schreiben vf-insert hz))
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
(if vf-insert T nil))
|
||||
nil))
|
||||
|
||||
@@ -1133,7 +1150,7 @@
|
||||
deltaL deltaH richtung z-start hz seite dim
|
||||
eingabe vf-nummer best-winkel-attr L_GF_m-teile
|
||||
prefill-basis prefill-winkel
|
||||
geruest-einzelmodul geruest-typ)
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
;; Implied Selection VOR ssg-start pruefen (ssg-start hebt Selektion auf)
|
||||
(setq ss (ssget "I"))
|
||||
(if (and ss (= (sslength ss) 1)
|
||||
@@ -1176,7 +1193,9 @@
|
||||
;; Dimension aus XDATA erkennen (Default 3D, falls Alt-Block ohne Eintrag)
|
||||
(cons "dim" (cond ((ssg-dim-xdata-lesen ent)) ("3D")))
|
||||
(cons "geruest-einzelmodul" (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("0")))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
;; Motorseite aus Attribut (Default rechts, falls Alt-Block ohne Eintrag)
|
||||
(cons "motorseite" (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis prefill-basis))
|
||||
(if (null eingabe)
|
||||
@@ -1190,7 +1209,8 @@
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe))
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt) (cadr startpunkt) z-start))
|
||||
|
||||
;; Vorbelegung Winkel/Verteilung: bestehenden Winkel vorschlagen, L_GF-
|
||||
@@ -1203,14 +1223,17 @@
|
||||
(cons "verteilung-idx" "3")
|
||||
(cons "lgf1" (* 1000.0 (atof (car L_GF_m-teile))))))
|
||||
|
||||
;; Gewaehlte Dimension (2D/3D) fuer den Neubau erzwingen (Override);
|
||||
;; vf-block-erstellen schreibt sie zugleich neu ins Dim-XDATA.
|
||||
;; Gewaehlte Dimension (2D/3D) + Motorseite fuer den Neubau erzwingen
|
||||
;; (Override); vf-block-erstellen schreibt beides zugleich neu (Dim-XDATA
|
||||
;; bzw. MOTORSEITE-Attribut).
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(entdel ent)
|
||||
(setq vf-nummer (vf-next-number))
|
||||
(vfs-standard-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung
|
||||
startpunkt hz seite prefill-winkel geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
(princ (ssg-textf "vfs-edit-neu-aufgebaut" (list bname)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -59,6 +59,11 @@ variofoerderer_basis : dialog {
|
||||
label = "Seite:";
|
||||
width = 16;
|
||||
}
|
||||
: popup_list {
|
||||
key = "motorseite";
|
||||
label = "Motorseite:";
|
||||
width = 16;
|
||||
}
|
||||
: popup_list {
|
||||
key = "dimension";
|
||||
label = "Darstellung (2D/3D):";
|
||||
|
||||
Reference in New Issue
Block a user